summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-07 18:53:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:12 -0500
commit3899f95e1f44a4dfe31b42119ad5e14304d8a4b4 (patch)
tree9e24fbdee158ae6262adf0f71993c79695df6a04 /source3/passdb
parentfc4abcf02857596c40110f2421facfb70f9be41d (diff)
downloadsamba-3899f95e1f44a4dfe31b42119ad5e14304d8a4b4.tar.gz
samba-3899f95e1f44a4dfe31b42119ad5e14304d8a4b4.tar.bz2
samba-3899f95e1f44a4dfe31b42119ad5e14304d8a4b4.zip
r16865: This is a proposal to fix bug 3915. Before sending patches around, this is
what svn is for. The idea is that we fall back to a pure unix user with S-1-22 SIDs in the token in case anything weird is going on with the 'force user'. Volker (This used to be commit 9ec5ccfe851ac8a1f88b88c8c8461a5cf75b4c57)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c3
-rw-r--r--source3/passdb/util_unixsids.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 38ca51eaa8..29b83e4faa 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1074,8 +1074,7 @@ void uid_to_sid(DOM_SID *psid, uid_t uid)
sid_append_rid(psid, algorithmic_pdb_uid_to_user_rid(uid));
goto done;
} else {
- sid_copy(psid, &global_sid_Unix_Users);
- sid_append_rid(psid, uid);
+ uid_to_unix_users_sid(psid, uid);
goto done;
}
diff --git a/source3/passdb/util_unixsids.c b/source3/passdb/util_unixsids.c
index 2a4818e3ae..d3f0999d6a 100644
--- a/source3/passdb/util_unixsids.c
+++ b/source3/passdb/util_unixsids.c
@@ -36,6 +36,12 @@ BOOL sid_check_is_in_unix_users(const DOM_SID *sid)
return sid_check_is_unix_users(&dom_sid);
}
+BOOL uid_to_unix_users_sid(uid_t uid, DOM_SID *sid)
+{
+ sid_copy(sid, &global_sid_Unix_Users);
+ return sid_append_rid(sid, uid);
+}
+
const char *unix_users_domain_name(void)
{
return "Unix User";