summaryrefslogtreecommitdiff
path: root/src/nss-systemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-02 12:59:21 +0100
committerLennart Poettering <lennart@poettering.net>2017-12-06 13:40:50 +0100
commitece877d434d3ef8ff096a6a130cfd28e6f643cd2 (patch)
treec1b46f31a9e317241abd4da8dd0607859e8064a4 /src/nss-systemd
parent399725532df4aedc30119f920551bdbcbb01f13a (diff)
downloadsystemd-ece877d434d3ef8ff096a6a130cfd28e6f643cd2.tar.gz
user-util: add new uid_is_system() helper
This adds uid_is_system() and gid_is_system(), similar in style to uid_is_dynamic(). That a helper like this is useful is illustrated by the fact that test-condition.c didn't get the check right so far, which this patch fixes.
Diffstat (limited to 'src/nss-systemd')
-rw-r--r--src/nss-systemd/nss-systemd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c
index d6de0a9878..d1a369672e 100644
--- a/src/nss-systemd/nss-systemd.c
+++ b/src/nss-systemd/nss-systemd.c
@@ -251,7 +251,7 @@ enum nss_status _nss_systemd_getpwuid_r(
}
}
- if (uid <= SYSTEM_UID_MAX)
+ if (uid_is_system(uid))
goto not_found;
if (getenv_bool_secure("SYSTEMD_NSS_DYNAMIC_BYPASS") > 0)
@@ -463,7 +463,7 @@ enum nss_status _nss_systemd_getgrgid_r(
}
}
- if (gid <= SYSTEM_GID_MAX)
+ if (gid_is_system(gid))
goto not_found;
if (getenv_bool_secure("SYSTEMD_NSS_DYNAMIC_BYPASS") > 0)