lib: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Fri, 26 Oct 2018 06:25:14 +0000 (08:25 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 2 Nov 2018 20:21:16 +0000 (21:21 +0100)
This is the one place where we have to do another strpcy. Many of the
sid_to_fstring calls should be replacable by dom_sid_str_buf, so this
will get less.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/util_sid.c

index 4d57a92b8538213071b9ac4137623e3828310b0c..13d5e1ce4c40b184470c501b24ef8e6de800ff8e 100644 (file)
@@ -34,7 +34,8 @@
 
 char *sid_to_fstring(fstring sidstr_out, const struct dom_sid *sid)
 {
-       dom_sid_string_buf(sid, sidstr_out, sizeof(fstring));
+       struct dom_sid_buf buf;
+       fstrcpy(sidstr_out, dom_sid_str_buf(sid, &buf));
        return sidstr_out;
 }