linux: libshare: smb: don't swallow net(1) errors

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13191
Closes #13470
This commit is contained in:
наб 2022-05-19 00:56:38 +02:00 committed by GitHub
parent 2b4f2fc93c
commit e02d84d3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ smb_enable_share_one(const char *sharename, const char *sharepath)
NULL,
};
if (libzfs_run_process(argv[0], argv, 0) < 0)
if (libzfs_run_process(argv[0], argv, 0) != 0)
return (SA_SYSTEM_ERR);
/* Reload the share file */
@ -297,7 +297,7 @@ smb_disable_share_one(const char *sharename)
NULL,
};
if (libzfs_run_process(argv[0], argv, 0) < 0)
if (libzfs_run_process(argv[0], argv, 0) != 0)
return (SA_SYSTEM_ERR);
else
return (SA_OK);