summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbcalls_rand.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-15 11:37:41 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:22 +0100
commitef22b1a477e11d0036ca9e267c751b67d2bc541c (patch)
tree1f5659a6c61b124779c0552dd91f8eb08a2de692 /source4/scripting/ejs/smbcalls_rand.c
parentfab68fd4d954f97cf6b4eae4c5e975e1660b6a28 (diff)
downloadsamba-ef22b1a477e11d0036ca9e267c751b67d2bc541c.tar.gz
samba-ef22b1a477e11d0036ca9e267c751b67d2bc541c.tar.bz2
samba-ef22b1a477e11d0036ca9e267c751b67d2bc541c.zip
r25966: Don't force an 8 byte width to generated SIDs, as this can actually
end up with a SID with a space in it. Andrew Bartlett (This used to be commit 7771f59eadf7045d852e60aa365036da230b41b9)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_rand.c')
-rw-r--r--source4/scripting/ejs/smbcalls_rand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/ejs/smbcalls_rand.c b/source4/scripting/ejs/smbcalls_rand.c
index d50cfc9504..a2db1f0d6d 100644
--- a/source4/scripting/ejs/smbcalls_rand.c
+++ b/source4/scripting/ejs/smbcalls_rand.c
@@ -70,7 +70,7 @@ static int ejs_randguid(MprVarHandle eid, int argc, struct MprVar **argv)
*/
static int ejs_randsid(MprVarHandle eid, int argc, struct MprVar **argv)
{
- char *s = talloc_asprintf(mprMemCtx(), "S-1-5-21-%8u-%8u-%8u",
+ char *s = talloc_asprintf(mprMemCtx(), "S-1-5-21-%u-%u-%u",
(unsigned)generate_random(),
(unsigned)generate_random(),
(unsigned)generate_random());