]> git.proxmox.com Git - mirror_zfs.git/commitdiff
linux: libshare: smb: don't swallow net(1) errors
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Wed, 18 May 2022 22:56:38 +0000 (00:56 +0200)
committerGitHub <noreply@github.com>
Wed, 18 May 2022 22:56:38 +0000 (15:56 -0700)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13191
Closes #13470

lib/libshare/os/linux/smb.c

index 2a2b32bc10e92268fe0b379bec5ecb1263a6f053..57965ebfaad109ca9f3050173d079e2361b17faf 100644 (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);