s3-auth: make_new_system_info_session() now does not query nss
authorAndrew Bartlett <abartlet@samba.org>
Wed, 13 Jun 2012 23:41:05 +0000 (09:41 +1000)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 19 Jun 2012 11:34:27 +0000 (13:34 +0200)
This is important in some situations where these queries might be
costly LDAP queries and is just not required for the system token.
This is because the system token should be just the NT
AUTHORITY\SYSTEM user and just enough unix info to allow the token to
be used.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun 19 13:34:28 CEST 2012 on sn-devel-104

source3/auth/auth_util.c

index b8f710c9efef0f8315f7363d4d5e071ddab9f70e..b38ee48d7f84ff615f8bfc8bb31a2e41c2ed69f2 100644 (file)
@@ -963,7 +963,9 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
 
        server_info->utok.uid = sec_initial_uid();
        server_info->utok.gid = sec_initial_gid();
-       server_info->unix_name = talloc_strdup(server_info, uidtoname(server_info->utok.uid));
+       server_info->unix_name = talloc_asprintf(server_info,
+                                                "NT AUTHORITY%cSYSTEM",
+                                                *lp_winbind_separator());
 
        if (!server_info->unix_name) {
                status = NT_STATUS_NO_MEMORY;