summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-28 14:19:28 +0200
committerGünther Deschner <gd@samba.org>2010-05-31 15:30:59 +0200
commit3f24f8d2c69be1db28cb1ffb866d45b520d9544d (patch)
treeac6aa97ac2f0fb5e389147d04a48a237cf971634 /source3/auth
parenta7805811c432adb9b0e82039858269c2154521ae (diff)
downloadsamba-3f24f8d2c69be1db28cb1ffb866d45b520d9544d.tar.gz
samba-3f24f8d2c69be1db28cb1ffb866d45b520d9544d.tar.bz2
samba-3f24f8d2c69be1db28cb1ffb866d45b520d9544d.zip
s3-auth: add "system" bool flag to auth_serversupplied_info.
Guenther
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1f9bc7b6d7..74d8873f5c 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -765,16 +765,24 @@ static NTSTATUS make_new_server_info_system(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info)
{
struct passwd *pwd;
+ NTSTATUS status;
pwd = getpwuid_alloc(mem_ctx, sec_initial_uid());
if (pwd == NULL) {
return NT_STATUS_NO_MEMORY;
}
- return make_serverinfo_from_username(mem_ctx,
+ status = make_serverinfo_from_username(mem_ctx,
pwd->pw_name,
false,
server_info);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ (*server_info)->system = true;
+
+ return NT_STATUS_OK;
}
/****************************************************************************
@@ -829,6 +837,7 @@ struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
}
dst->guest = src->guest;
+ dst->system = src->system;
dst->utok.uid = src->utok.uid;
dst->utok.gid = src->utok.gid;
dst->utok.ngroups = src->utok.ngroups;