]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- moved ignoreroot test to other ignore tests
authorArvin Schnell <aschnell@suse.de>
Thu, 2 May 2013 14:30:04 +0000 (16:30 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 2 May 2013 14:30:04 +0000 (16:30 +0200)
pam/pam_snapper.c

index 64478ac8754b4927e6bfad157be755f4d9ca618f..0fc7d22b5897976a582a22d85749d14d63b61fe5 100644 (file)
@@ -624,6 +624,11 @@ static int cdbus_pam_options_parser( pam_handle_t * pamh, pam_options_t * option
                        return PAM_IGNORE;
                }
        }
+       if ( options->ignoreroot ) {
+               if ( strcmp( pamuser, "root" ) == 0 ) {
+                       return PAM_IGNORE;
+               }
+       }
        if ( options->debug ) {
                pam_syslog( pamh, LOG_ERR,
                            "current settings: homeprefix=%s ignoreservices=%s ignoreusers=%s",
@@ -735,8 +740,6 @@ static int cdbus_pam_session( pam_handle_t * pamh, openclose_t openclose, char *
        }
        if ( !strcmp( real_user, "root" ) && options.rootasroot ) {
                real_user_config = strdup( "root" );
-       } else if ( !strcmp( real_user, "root" ) && options.ignoreroot ) {
-               goto pam_sm_open_session_err;
        } else {
                real_user_config = malloc( strlen( options.homeprefix ) + strlen( real_user ) + 1 );
                if ( !real_user_config ) {