Make get_samr_info_by_sid use recent coding conventions
authorVolker Lendecke <vl@samba.org>
Sat, 18 Apr 2009 14:54:13 +0000 (16:54 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 19 Apr 2009 07:27:15 +0000 (09:27 +0200)
source3/rpc_server/srv_samr_nt.c

index b18011c1f9db5bcbd57334a27a33da3674f6f5b1..7246997462e894aabe5946b4a1a0827125595318 100644 (file)
@@ -382,20 +382,16 @@ static struct samr_info *get_samr_info_by_sid(TALLOC_CTX *mem_ctx,
                                              DOM_SID *psid)
 {
        struct samr_info *info;
-       fstring sid_str;
 
-       if (psid) {
-               sid_to_fstring(sid_str, psid);
-       } else {
-               fstrcpy(sid_str,"(NULL)");
-       }
-
-       if ((info = TALLOC_ZERO_P(mem_ctx, struct samr_info)) == NULL) {
+       info = talloc_zero(mem_ctx, struct samr_info);
+       if (info == NULL) {
                return NULL;
        }
        talloc_set_destructor(info, samr_info_destructor);
 
-       DEBUG(10,("get_samr_info_by_sid: created new info for sid %s\n", sid_str));
+       DEBUG(10, ("get_samr_info_by_sid: created new info for sid %s\n",
+                  sid_string_dbg(psid)));
+
        if (psid) {
                sid_copy( &info->sid, psid);
                info->builtin_domain = sid_check_is_builtin(psid);