propagate error if get_sid() fails (#520)

This commit is contained in:
pedro martelletto 2021-10-28 22:28:58 +02:00 committed by GitHub
parent 5cb3267167
commit 942e993fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -59,8 +59,10 @@ check_secure_file_permission(const char *input_path, struct passwd * pw, int rea
char *bad_user = NULL;
int ret = 0;
if ((user_sid = get_sid(pw ? pw->pw_name : NULL)) == NULL)
if ((user_sid = get_sid(pw ? pw->pw_name : NULL)) == NULL) {
ret = -1;
goto cleanup;
}
if ((path_utf16 = resolved_path_utf16(input_path)) == NULL) {
ret = -1;