diff options
author | Jeremy Allison <jra@samba.org> | 2001-12-18 19:44:14 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-12-18 19:44:14 +0000 |
commit | dccc1ed3f8344968129c73104c1bdf8ab8b2a1e5 (patch) | |
tree | b31e8334e7e12adbe011c28b04e88a047d04ae25 | |
parent | ed611ffe1a83f9d08acafbe629c91300e6c5d13f (diff) | |
download | samba-dccc1ed3f8344968129c73104c1bdf8ab8b2a1e5.tar.gz samba-dccc1ed3f8344968129c73104c1bdf8ab8b2a1e5.tar.bz2 samba-dccc1ed3f8344968129c73104c1bdf8ab8b2a1e5.zip |
Fixup JF's weird SID return :-).
Jeremy
(This used to be commit 7b8fb8d85c406b8755f60cf14dc2377bc59eda53)
-rw-r--r-- | source3/lib/util_sid.c | 6 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 3 | ||||
-rw-r--r-- | source3/utils/smbcacls.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 72365f5e46..1e0feac049 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -42,6 +42,7 @@ DOM_SID global_sid_Builtin_Guests; /* Builtin guest users */ DOM_SID global_sid_Authenticated_Users; /* All authenticated rids */ DOM_SID global_sid_Network; /* Network rids */ DOM_SID global_sid_Anonymous; /* Anonymous login */ +DOM_SID global_sid_nonexistent; /* S-0-0. Used in Lsa level 3. */ const DOM_SID *global_sid_everyone = &global_sid_World; @@ -182,6 +183,7 @@ void generate_wellknown_sids(void) string_to_sid(&global_sid_Authenticated_Users, "S-1-5-11"); string_to_sid(&global_sid_Network, "S-1-5-2"); string_to_sid(&global_sid_Anonymous, "S-1-5-7"); + string_to_sid(&global_sid_nonexistent, "S-0-0"); /* Used in Lsa level 3. */ /* Create the anon token. */ sid_copy( &anonymous_token.user_sids[0], &global_sid_World); @@ -360,10 +362,10 @@ char *sid_to_string(fstring sidstr_out, DOM_SID *sid) Convert a string to a SID. Returns True on success, False on fail. *****************************************************************/ -BOOL string_to_sid(DOM_SID *sidout, char *sidstr) +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr) { pstring tok; - char *p = sidstr; + const char *p = sidstr; /* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */ uint32 ia; diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 4791e2ac08..432f20a40c 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -438,6 +438,7 @@ NTSTATUS _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_E NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u) { + extern DOM_SID global_sid_nonexistent; struct lsa_info *handle; LSA_INFO_UNION *info = &r_u->dom; DOM_SID domain_sid; @@ -490,7 +491,7 @@ NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INF break; case ROLE_STANDALONE: name = global_myworkgroup; - sid = NULL; /* Tell it we're not in a domain. */ + sid = &global_sid_nonexistent; break; default: return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 8a3f3978e5..94eada5c3d 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -129,7 +129,7 @@ static void SidToString(fstring str, DOM_SID *sid) } /* convert a string to a SID, either numeric or username/group */ -static BOOL StringToSid(DOM_SID *sid, char *str) +static BOOL StringToSid(DOM_SID *sid, const char *str) { uint32 *types = NULL; DOM_SID *sids = NULL; |