summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
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";