]> git.proxmox.com Git - mirror_zfs.git/commitdiff
cmd/zfs: send: meaningful error message for incorrect redaction bookmark
authorChristian Schwarz <me@cschwarz.com>
Sat, 23 Nov 2019 15:31:38 +0000 (16:31 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 23 Jan 2020 17:33:10 +0000 (09:33 -0800)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #9867

cmd/zfs/zfs_main.c

index 2bf2b6cf97c37bcc5a942ba3c43b1991b1935792..a6e75e0baca6ce1990e5c9c98a554e1734190d57 100644 (file)
@@ -4403,6 +4403,12 @@ zfs_do_send(int argc, char **argv)
                                    "do a redacted send to a filesystem.\n"));
                                return (1);
                        }
+                       if (strchr(redactbook, '#') != NULL) {
+                               (void) fprintf(stderr, gettext("Error: "
+                                   "redaction bookmark argument must "
+                                   "not contain '#'\n"));
+                               return (1);
+                       }
                }
 
                zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_DATASET);