]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net3: Simplify name_to_sid(): dom_sid_parse checks for "S-" prefix
authorVolker Lendecke <vl@samba.org>
Sun, 25 Jul 2021 07:51:10 +0000 (09:51 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 6 Aug 2021 17:22:30 +0000 (17:22 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/net_rpc_rights.c

index 97844882fda50b8c92b0eb597affbce322dba656..d4cc5eabbe3685e8eb50b8dd7fd9fb1e64bda129 100644 (file)
@@ -73,7 +73,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *pipe_hnd,
        struct dcerpc_binding_handle *b = pipe_hnd->binding_handle;
 
        /* maybe its a raw SID */
-       if ( strncmp(name, "S-", 2) == 0 && string_to_sid(sid, name) ) {
+       if (dom_sid_parse(name, sid)) {
                return NT_STATUS_OK;
        }