summaryrefslogtreecommitdiffstats
path: root/source/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2001-11-09 22:15:33 +0000
committerVolker Lendecke <vlendec@samba.org>2001-11-09 22:15:33 +0000
commit7d70b30dbdf06de126b78879fc89708ca335f91e (patch)
treeea1e55ede293d857167ae83d1e6d1dd1ebd3deb1 /source/passdb
parentd4cafc076be99a66d0660f695995801b4f1d7bfd (diff)
downloadsamba-7d70b30dbdf06de126b78879fc89708ca335f91e.tar.gz
samba-7d70b30dbdf06de126b78879fc89708ca335f91e.tar.xz
samba-7d70b30dbdf06de126b78879fc89708ca335f91e.zip
As pdb_ldap.c does not compile in HEAD anyway, a not-compiled merge
from 2_2. Volker
Diffstat (limited to 'source/passdb')
-rw-r--r--source/passdb/pdb_ldap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index 9502fc5fe4e..62c3a1b4a27 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -439,9 +439,9 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass,
get_single_attribute(ldap_struct, entry, "description", acct_desc);
get_single_attribute(ldap_struct, entry, "userWorkstations", workstations);
get_single_attribute(ldap_struct, entry, "rid", temp);
- user_rid = (uint32)strtol(temp, NULL, 16);
+ user_rid = (uint32)strtol(temp, NULL, 10);
get_single_attribute(ldap_struct, entry, "primaryGroupID", temp);
- group_rid = (uint32)strtol(temp, NULL, 16);
+ group_rid = (uint32)strtol(temp, NULL, 10);
/* These values MAY be in LDAP, but they can also be retrieved through
@@ -577,9 +577,13 @@ static BOOL init_ldap_from_sam (LDAPMod *** mods, int ldap_state, const SAM_ACCO
make_a_mod(mods, ldap_state, "description", pdb_get_acct_desc(sampass));
make_a_mod(mods, ldap_state, "userWorkstations", pdb_get_workstations(sampass));
+ if ( !sampass->user_rid)
+ sampass->user_rid = pdb_uid_to_user_rid(pdb_get_uid(sampass));
slprintf(temp, sizeof(temp) - 1, "%i", sampass->user_rid);
make_a_mod(mods, ldap_state, "rid", temp);
+ if ( !sampass->group_rid)
+ sampass->group_rid = pdb_gid_to_group_rid(pdb_get_gid(sampass));
slprintf(temp, sizeof(temp) - 1, "%i", sampass->group_rid);
make_a_mod(mods, ldap_state, "primaryGroupID", temp);