s3:modules: fix the picky-developer build of vfs_virusfilter.c on FreeBSD 11
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Mar 2018 11:10:01 +0000 (12:10 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Apr 2018 09:56:23 +0000 (11:56 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit fb7b67af984812784756574df4f0fb55d472181b)

source3/modules/vfs_virusfilter.c

index 571073fbfff020b6b72269c28ff80d9737b65f56..7ae5a965c0d73ae4f9b36b1adf5fa001d0349459 100644 (file)
@@ -275,8 +275,9 @@ static int virusfilter_vfs_connect(
        temp_quarantine_dir_mode = lp_parm_const_string(
                snum, "virusfilter", "quarantine directory mode", "0755");
        if (temp_quarantine_dir_mode != NULL) {
-               sscanf(temp_quarantine_dir_mode, "%o",
-                      &config->quarantine_dir_mode);
+               unsigned int mode = 0;
+               sscanf(temp_quarantine_dir_mode, "%o", &mode);
+               config->quarantine_dir_mode = mode;
        }
 
        config->quarantine_prefix = lp_parm_const_string(