URL: https://github.com/SSSD/sssd/pull/106
Title: #106: Add a new "files" provider

lslebodn commented:
"""
On (09/01/17 07:44), Jakub Hrozek wrote:
>jhrozek commented on this pull request.
>
>
>
>> +        contents = self._read_contents()
>+        kindex = self._get_named_line(key, contents)
>+        contents.pop(kindex)
>+        self._write_contents(contents)
>+
>+        contents = self._read_contents()
>+
>+
>+class PasswdOps(FilesOps):
>+    """
>+    A naive implementation of user operations
>+    """
>+    def __init__(self, file_name):
>+        super(PasswdOps, self).__init__(file_name)
>+
>+    def _pwd2line(self, name, uid, gid, passwd, gecos, dir, shell):
>
>I changed the dir name in pwd2line, but not in useradd or userdel. The reason 
>I kept them the same is that the user dictionaries expect `dir` as well and 
>using the user dictionaries can be nice as:
>```
>passwd_ops_setup.useradd(**user1)
>ent.assert_passwd_by_name("user1", user1)
>```
>
That will work if you change the constant user1 (dir -> dictionary)

LS

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/106#issuecomment-271324043
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to