s3: Use dom_sid_string in _lsa_lookup_sids_internal
authorVolker Lendecke <vl@samba.org>
Thu, 3 Mar 2011 15:20:56 +0000 (16:20 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 4 Mar 2011 05:58:37 +0000 (06:58 +0100)
source3/rpc_server/lsa/srv_lsa_nt.c

index 22c29afcceb2833e98982d01152e8226433ab18d..a2509d52252099a3b209978519503f8110f7c949 100644 (file)
@@ -846,7 +846,6 @@ static NTSTATUS _lsa_lookup_sids_internal(struct pipes_struct *p,
                struct lsa_name_info *name = &name_infos[i];
 
                if (name->type == SID_NAME_UNKNOWN) {
-                       fstring tmp;
                        name->dom_idx = -1;
                        /* Unknown sids should return the string
                         * representation of the SID. Windows 2003 behaves
@@ -854,9 +853,7 @@ static NTSTATUS _lsa_lookup_sids_internal(struct pipes_struct *p,
                         * RID as 8 bytes hex, in others it returns the full
                         * SID. We (Jerry/VL) could not figure out which the
                         * hard cases are, so leave it with the SID.  */
-                       name->name = talloc_asprintf(p->mem_ctx, "%s",
-                                                    sid_to_fstring(tmp,
-                                                                   sids[i]));
+                       name->name = dom_sid_string(p->mem_ctx, sids[i]);
                        if (name->name == NULL) {
                                return NT_STATUS_NO_MEMORY;
                        }