s/sid_to_string/sid_to_fstring/
[ira/wip.git] / source3 / rpc_server / srv_lsa_nt.c
index 20655082a519745388a5e3ee7f6254a81b41c289..a1ddc8e6c8954d2baa9b50db341f855ff9b4a575 100644 (file)
@@ -861,6 +861,7 @@ static NTSTATUS _lsa_lookup_sids_internal(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
@@ -869,7 +870,8 @@ static NTSTATUS _lsa_lookup_sids_internal(pipes_struct *p,
                         * 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_string_static(sids[i]));
+                                                    sid_to_fstring(tmp,
+                                                                   sids[i]));
                        if (name->name == NULL) {
                                return NT_STATUS_NO_MEMORY;
                        }
@@ -1692,8 +1694,9 @@ NTSTATUS _lsa_enum_privsaccount(pipes_struct *p, prs_struct *ps, LSA_Q_ENUMPRIVS
 
        if ( se_priv_to_privilege_set( &privileges, &mask ) ) {
 
-               DEBUG(10,("_lsa_enum_privsaccount: %s has %d privileges\n", 
-                       sid_string_static(&info->sid), privileges.count));
+               DEBUG(10,("_lsa_enum_privsaccount: %s has %d privileges\n",
+                         sid_string_dbg(&info->sid),
+                         privileges.count));
 
                r_u->status = init_lsa_r_enum_privsaccount(ps->mem_ctx, r_u, privileges.set, privileges.count, 0);
        }
@@ -1791,7 +1794,7 @@ NTSTATUS _lsa_addprivs(pipes_struct *p, LSA_Q_ADDPRIVS *q_u, LSA_R_ADDPRIVS *r_u
 
        if ( !grant_privilege( &info->sid, &mask ) ) {
                DEBUG(3,("_lsa_addprivs: grant_privilege(%s) failed!\n",
-                       sid_string_static(&info->sid) ));
+                        sid_string_dbg(&info->sid) ));
                DEBUG(3,("Privilege mask:\n"));
                dump_se_priv( DBGC_ALL, 3, &mask );
                return NT_STATUS_NO_SUCH_PRIVILEGE;
@@ -1830,7 +1833,7 @@ NTSTATUS _lsa_removeprivs(pipes_struct *p, LSA_Q_REMOVEPRIVS *q_u, LSA_R_REMOVEP
 
        if ( !revoke_privilege( &info->sid, &mask ) ) {
                DEBUG(3,("_lsa_removeprivs: revoke_privilege(%s) failed!\n",
-                       sid_string_static(&info->sid) ));
+                        sid_string_dbg(&info->sid) ));
                DEBUG(3,("Privilege mask:\n"));
                dump_se_priv( DBGC_ALL, 3, &mask );
                return NT_STATUS_NO_SUCH_PRIVILEGE;
@@ -2105,8 +2108,8 @@ NTSTATUS _lsa_enum_acct_rights(pipes_struct *p, LSA_Q_ENUM_ACCT_RIGHTS *q_u, LSA
 
        if ( se_priv_to_privilege_set( &privileges, &mask ) ) {
 
-               DEBUG(10,("_lsa_enum_acct_rights: %s has %d privileges\n", 
-                       sid_string_static(&sid), privileges.count));
+               DEBUG(10,("_lsa_enum_acct_rights: %s has %d privileges\n",
+                         sid_string_dbg(&sid), privileges.count));
 
                r_u->status = init_r_enum_acct_rights( r_u, &privileges );
        }