Skip to content

Commit

Permalink
linux: libshare: smb: don't swallow net(1) errors
Browse files Browse the repository at this point in the history
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#13191
Closes openzfs#13470
  • Loading branch information
nabijaczleweli authored and andrewc12 committed Sep 23, 2022
1 parent b434a24 commit aeb9a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/libshare/os/linux/smb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit aeb9a0c

Please sign in to comment.