diff options
author | Volker Lendecke <vl@samba.org> | 2019-03-11 16:55:57 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-03-12 00:42:19 +0000 |
commit | e18610a197aab80a32cae8c1e09b96496679bbad (patch) | |
tree | 2868943bc213731d1c8c6ff4afbb1120bf35873d /source3/modules | |
parent | a27c39c2c9fd3161f5bf3ae5dba687c8d49519ef (diff) | |
download | samba-e18610a197aab80a32cae8c1e09b96496679bbad.tar.gz |
lib: Make sid_parse return the parsed length
Use a temporary struct as a return value to make the compiler catch all
callers. If we just changed bool->ssize_t, this would just generate a
warning. struct sid_parse_ret will go away in the next commit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_default.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 1ed2c810667..7ce3775e54f 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1355,6 +1355,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle, * * but I have to check that --metze */ + struct sid_parse_ret ret; struct dom_sid sid; struct dom_sid_buf buf; uid_t uid; @@ -1373,7 +1374,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle, /* unknown 4 bytes: this is not the length of the sid :-( */ /*unknown = IVAL(pdata,0);*/ - if (!sid_parse(_in_data + 4, sid_len, &sid)) { + ret = sid_parse(_in_data + 4, sid_len, &sid); + if (ret.len == -1) { return NT_STATUS_INVALID_PARAMETER; } DEBUGADD(10, ("for SID: %s\n", |