diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-06-21 09:10:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-06-21 09:10:42 +0000 |
commit | 91b8a8d1d21b810b6aca44ce647837669efd6dcf (patch) | |
tree | 2490cec37a9ae7f9f9ad9adabac033b41e26c07b /source3/utils | |
parent | 4ff011d88ef5b79b92d2cea1abe32c93bc03f724 (diff) | |
download | samba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.tar.gz samba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.tar.xz samba-91b8a8d1d21b810b6aca44ce647837669efd6dcf.zip |
next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
(This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbcacls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 028eb481a6..08c3fecbb9 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -266,12 +266,12 @@ static BOOL parse_ace(SEC_ACE *ace, char *str) /* Only numeric form accepted for flags at present */ - if (!(next_token(NULL, tok, "/", sizeof(fstring)) && + if (!(next_token(&p, tok, "/", sizeof(fstring)) && sscanf(tok, "%i", &aflags))) { return False; } - if (!next_token(NULL, tok, "/", sizeof(fstring))) { + if (!next_token(&p, tok, "/", sizeof(fstring))) { return False; } |