[Freeipa-devel] [PATCH] add inetUser objectclass, remove test-users ldif

Kevin McCarthy kmccarth at redhat.com
Thu Oct 11 19:21:19 UTC 2007


Kevin McCarthy wrote:
> This patch adds the inetUser objectclass.  It also pulls out the
> test-user ldif generation (instructions now say to use the command-line
> tools for this).

Revised patch adding inetUser to groups too.

-Kevin

-------------- next part --------------
# HG changeset patch
# User Kevin McCarthy <kmccarth at redhat.com>
# Date 1192130382 25200
# Node ID 6d5bbb4a6066cc37682506d33f9d5a5846ec666d
# Parent  a4f77437f2965144308df0dd1e48f86240adf4f1
Add inetUser objectclass.  Remove test-users ldif.

diff -r a4f77437f296 -r 6d5bbb4a6066 ipa-server/ipa-install/test/test-users-template.ldif
--- a/ipa-server/ipa-install/test/test-users-template.ldif	Thu Oct 11 11:25:19 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-# test, users, default, $REALM
-dn: uid=test,cn=users,cn=accounts,$SUFFIX
-changetype: add
-uidNumber: 1003
-uid: test
-gecos: test
-homeDirectory: /home/test
-loginShell: /bin/bash
-gidNumber: 1002
-objectclass: krbPrincipalAux
-objectclass: inetOrgPerson
-objectClass: posixAccount
-objectClass: account
-objectClass: top
-cn: Test User
-sn: User
-krbPrincipalName: test@$REALM
-
-dn: cn=ipausers,cn=groups,cn=accounts,$SUFFIX
-changetype: modify
-add: uniqueMember
-uniqueMember: uid=test,cn=users,cn=accounts,$SUFFIX
diff -r a4f77437f296 -r 6d5bbb4a6066 ipa-server/ipaserver/dsinstance.py
--- a/ipa-server/ipaserver/dsinstance.py	Thu Oct 11 11:25:19 2007 -0700
+++ b/ipa-server/ipaserver/dsinstance.py	Thu Oct 11 12:19:42 2007 -0700
@@ -97,7 +97,6 @@ class DsInstance:
             # TODO: roll back here?
             print "Failed to restart the ds instance"
         self.__add_default_layout()
-        self.__create_test_users()
 
     def config_dirname(self):
         if not self.serverid:
@@ -193,14 +192,6 @@ class DsInstance:
         except subprocess.CalledProcessError, e:
             print "Failed to add default ds layout", e
             logging.debug("Failed to add default ds layout %s" % e)
-        
-    def __create_test_users(self):
-        logging.debug("create test users ldif")
-        txt = template_file(SHARE_DIR + "test-users-template.ldif", self.sub_dict)
-        user_fd = open(SHARE_DIR+"test-users.ldif", "w")
-        user_fd.write(txt)
-        user_fd.close()
-        logging.debug("done creating test users ldif")
 
     def __certmap_conf(self):
         logging.debug("configuring certmap.conf for ds instance")
diff -r a4f77437f296 -r 6d5bbb4a6066 ipa-server/xmlrpc-server/funcs.py
--- a/ipa-server/xmlrpc-server/funcs.py	Thu Oct 11 11:25:19 2007 -0700
+++ b/ipa-server/xmlrpc-server/funcs.py	Thu Oct 11 12:19:42 2007 -0700
@@ -448,8 +448,9 @@ class IPAServer:
             del user['gn']
 
         # some required objectclasses
-        entry.setValues('objectClass', 'top', 'person', 'organizationalPerson', 'inetOrgPerson', 'posixAccount', 'krbPrincipalAux')
-    
+        entry.setValues('objectClass', 'top', 'person', 'organizationalPerson',
+                'inetOrgPerson', 'inetUser', 'posixAccount', 'krbPrincipalAux')
+
         # fill in our new entry with everything sent by the user
         for u in user:
             entry.setValues(u, user[u])
@@ -709,7 +710,8 @@ class IPAServer:
         entry = ipaserver.ipaldap.Entry(dn)
 
         # some required objectclasses
-        entry.setValues('objectClass', 'top', 'groupofuniquenames', 'posixGroup')
+        entry.setValues('objectClass', 'top', 'groupofuniquenames', 'posixGroup',
+                        'inetUser')
 
         # FIXME, need a gidNumber generator
         if group.get('gidnumber') is None:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4054 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20071011/d1914098/attachment.bin>


More information about the Freeipa-devel mailing list