The Samba-Bugzilla – Attachment 6399 Details for
Bug 4597
ldapsam:editposix needs rfc2307bis.schema support and inetorgperson
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rfc2307 patch for ldapsam:editposix
rfc2307bis.patch (text/plain), 4.83 KB, created by
oota toshiya
on 2011-04-12 07:21:28 UTC
(
hide
)
Description:
rfc2307 patch for ldapsam:editposix
Filename:
MIME Type:
Creator:
oota toshiya
Created:
2011-04-12 07:21:28 UTC
Size:
4.83 KB
patch
obsolete
>diff -urN source3/include/smbldap.h ../samba-3.5.6new/source3/include/smbldap.h >--- source3/include/smbldap.h 2010-10-08 01:41:16.000000000 +0900 >+++ ../samba-3.5.6new/source3/include/smbldap.h 2011-01-07 20:05:07.110632251 +0900 >@@ -46,6 +46,8 @@ > #define LDAP_OBJ_POSIXACCOUNT "posixAccount" > #define LDAP_OBJ_POSIXGROUP "posixGroup" > #define LDAP_OBJ_OU "organizationalUnit" >+#define LDAP_OBJ_NAMEDOBJECT "namedObject" /* structual objectclass (for SUSE)*/ >+#define LDAP_OBJ_GROUPOFNAMES "groupOfNames" /* structual objectclass */ > > /* some generic attributes that get reused a lot */ > >diff -urN source3/utils/net_sam.c ../samba-3.5.6new/source3/utils/net_sam.c >--- source3/utils/net_sam.c 2010-10-08 01:41:16.000000000 +0900 >+++ ../samba-3.5.6new/source3/utils/net_sam.c 2011-01-07 20:05:07.111634566 +0900 >@@ -1585,6 +1585,7 @@ > gid_t domadmins_gid = -1; > struct samu *samuser; > struct passwd *pwd; >+ const char *rfc2307bis_str = NULL; /* for lp_parm_string return value */ > > if (c->display_usage) { > d_printf( "%s\n" >@@ -1642,6 +1643,9 @@ > > d_printf(_("Checking for Domain Users group.\n")); > >+ rfc2307bis_str = lp_parm_const_string(-1,"ldapsam","editposix_rfc2307bis",NULL); /* get option */ >+ d_printf("ldapsam:editposix_rfc2307bis = %s\n",rfc2307bis_str); >+ > sid_compose(&gsid, get_global_sam_sid(), DOMAIN_GROUP_RID_USERS); > > if (!pdb_getgrsid(&gmap, gsid)) { >@@ -1675,6 +1679,14 @@ > > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_POSIXGROUP); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPMAP); >+ >+ if (rfc2307bis_str && strequal(rfc2307bis_str, "namedObject")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_NAMEDOBJECT); >+ } else if (strequal(rfc2307bis_str, "groupOfNames")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPOFNAMES); >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "member", dn); >+ } >+ > smbldap_set_mod(&mods, LDAP_MOD_ADD, "cn", uname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", wname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "gidNumber", gidstr); >@@ -1732,6 +1744,14 @@ > > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_POSIXGROUP); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPMAP); >+ >+ if (rfc2307bis_str && strequal(rfc2307bis_str, "namedObject")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_NAMEDOBJECT); >+ } else if (strequal(rfc2307bis_str, "groupOfNames")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPOFNAMES); >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "member", dn); >+ } >+ > smbldap_set_mod(&mods, LDAP_MOD_ADD, "cn", uname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", wname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "gidNumber", gidstr); >@@ -1966,6 +1986,14 @@ > > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_POSIXGROUP); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPMAP); >+ >+ if (rfc2307bis_str && strequal(rfc2307bis_str, "namedObject")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_NAMEDOBJECT); >+ } else if (strequal(rfc2307bis_str, "groupOfNames")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPOFNAMES); >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "member", dn); >+ } >+ > smbldap_set_mod(&mods, LDAP_MOD_ADD, "cn", uname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", wname); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "gidNumber", gidstr); > >diff -urN source3/passdb/pdb_ldap.c ../samba-3.5.6new/source3/passdb/pdb_ldap.c >--- source3/passdb/pdb_ldap.c 2010-10-08 01:41:16.000000000 +0900 >+++ ../samba-3.5.6new/source3/passdb/pdb_ldap.c 2011-04-04 17:53:26.601413853 +0900 >@@ -5597,6 +5597,7 @@ > char *groupname; > char *grouptype; > char *gidstr; >+ char *rfc2307bis_str = NULL; /* for lp_parm_string return value */ > const char *dn = NULL; > DOM_SID group_sid; > gid_t gid = -1; >@@ -5705,6 +5706,14 @@ > return NT_STATUS_NO_MEMORY; > } > >+ rfc2307bis_str = lp_parm_const_string(-1,"ldapsam","editposix_rfc2307bis",NULL); /* get option */ >+ DEBUG(0,("ldapsam:editposix_rfc2307bis = %s\n",rfc2307bis_str)); >+ if (rfc2307bis_str && strequal(rfc2307bis_str, "namedObject")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_NAMEDOBJECT); >+ } else if (strequal(rfc2307bis_str, "groupOfNames")) { >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPOFNAMES); >+ smbldap_set_mod(&mods, LDAP_MOD_ADD, "member", dn); >+ } > smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass", LDAP_OBJ_GROUPMAP); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaSid", groupsidstr); > smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaGroupType", grouptype);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4597
:
2708
|
5864
| 6399