summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_sid.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-25 19:57:04 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-25 19:57:04 +0000
commit59d4087160ba41aac724722dc29c4b6e4e3b69b0 (patch)
tree33f6d26853fdb2fbb2c7e249bef81e49bab96316 /source3/rpc_server/srv_sid.c
parent73106d9baeb325d1d89d0242d0045695a71acf4d (diff)
downloadsamba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.tar.gz
samba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.tar.bz2
samba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.zip
LsaLookupNames client call (first used as lookupnames command in rpcclient).
(This used to be commit 68342a29a892e515cf2b22d759476d61944bcd59)
Diffstat (limited to 'source3/rpc_server/srv_sid.c')
-rw-r--r--source3/rpc_server/srv_sid.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_sid.c b/source3/rpc_server/srv_sid.c
index 216fab657f..0317bb32f5 100644
--- a/source3/rpc_server/srv_sid.c
+++ b/source3/rpc_server/srv_sid.c
@@ -432,10 +432,6 @@ Error was %s\n", sid_file, strerror(errno) ));
***************************************************************************/
BOOL map_domain_name_to_sid(DOM_SID *sid, char **nt_domain)
{
- fstring sid_str;
- sid_to_string(sid_str, sid);
- DEBUG(5,("map_domain_name_to_sid: %s\n", sid_str));
-
if (nt_domain == NULL)
{
*sid = global_sam_sid;
@@ -451,6 +447,16 @@ BOOL map_domain_name_to_sid(DOM_SID *sid, char **nt_domain)
return True;
}
+ if ((*nt_domain)[0] == 0)
+ {
+ DEBUG(5,("map_domain_name_to_sid: overriding blank name to %s\n",
+ global_sam_name));
+ free(*nt_domain);
+ (*nt_domain) = strdup(global_sam_name);
+ *sid = global_sam_sid;
+ return True;
+ }
+
if (strequal((*nt_domain), global_sam_name))
{
*sid = global_sam_sid;