From: Arvin Schnell Date: Thu, 2 May 2013 14:22:54 +0000 (+0200) Subject: - correctly check options X-Git-Tag: v0.1.4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5d418f0195f99d4a3b58f3ff88e0bf6fc27b267;p=thirdparty%2Fsnapper.git - correctly check options --- diff --git a/pam/pam_snapper.c b/pam/pam_snapper.c index 113d7d68..64478ac8 100644 --- a/pam/pam_snapper.c +++ b/pam/pam_snapper.c @@ -596,16 +596,16 @@ static int cdbus_pam_options_parser( pam_handle_t * pamh, pam_options_t * option pam_syslog( pamh, LOG_ERR, "ignoreusers - specification missing argument - ignored" ); } } - } else if ( !strncmp( *argv, "debug", 5 ) ) { + } else if ( !strcmp( *argv, "debug" ) ) { options->debug = true; - } else if ( !strncmp( *argv, "rootasroot", 10 ) ) { + } else if ( !strcmp( *argv, "rootasroot" ) ) { options->rootasroot = true; - } else if ( !strncmp( *argv, "ignoreroot", 10 ) ) { + } else if ( !strcmp( *argv, "ignoreroot" ) ) { options->ignoreroot = true; - } else if ( !strncmp( *argv, "openonly", 8 ) ) { + } else if ( !strcmp( *argv, "openonly" ) ) { options->do_close = false; options->do_open = true; - } else if ( !strncmp( *argv, "closeonly", 9 ) ) { + } else if ( !strcmp( *argv, "closeonly" ) ) { options->do_open = false; options->do_close = true; } else {