]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-lib/sysacls: Do not include an embedded \0 between ACL entries in sys_acl_to_text()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 8 May 2012 13:39:35 +0000 (23:39 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 9 May 2012 04:07:06 +0000 (06:07 +0200)
This makes it possible to print the entire string again.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May  9 06:07:06 CEST 2012 on sn-devel-104

source3/lib/sysacls.c

index b0a3479a62508597f9aee3a94b42f6323cc897da..592aef6d43d67dffe2a035301e80147702143a7f 100644 (file)
@@ -238,8 +238,9 @@ char *sys_acl_to_text(const struct smb_acl_t *acl_d, ssize_t *len_p)
                        }
                }
 
-               slprintf(&text[len], nbytes-1, "%s:%s:%s\n", tag, id, perms);
-               len += nbytes - 1;
+
+               slprintf(&text[len], nbytes, "%s:%s:%s\n", tag, id, perms);
+               len += (nbytes - 1);
        }
 
        if (len_p)