]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: rename evaluate_uid()
authorKarel Zak <kzak@redhat.com>
Wed, 9 Nov 2016 13:07:01 +0000 (14:07 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Sep 2017 09:48:56 +0000 (11:48 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su-common.c

index cbe7b395ca08c7ec1c67848cfcb9892a5d8c5a0b..6f82b3cd0d3620e25a72e0b33da950520bafebb0 100644 (file)
@@ -632,8 +632,7 @@ static void load_config(void *data)
 /*
  * Returns 1 if the current user is not root
  */
-static int
-evaluate_uid(void)
+static int is_not_root(void)
 {
        const uid_t ruid = getuid();
        const uid_t euid = geteuid();
@@ -764,7 +763,7 @@ int su_main(int argc, char **argv, int mode)
                }
        }
 
-       su->restricted = evaluate_uid();
+       su->restricted = is_not_root();
 
        if (optind < argc && !strcmp(argv[optind], "-")) {
                su->simulate_login = true;