diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-12-24 23:45:14 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-12-26 10:17:44 -0500 |
commit | a4558c4c7c44714e16e42f6e76e947bde16c85e5 (patch) | |
tree | 7367bd75c2bc15171c215d3369fa797c18cb25a0 | |
parent | 5fa0e11c6193a627918f83ff43f931fdfdff59bc (diff) | |
download | initscripts-a4558c4c7c44714e16e42f6e76e947bde16c85e5.tar.xz |
arch-tmpfiles: simplify uid/gid validation
getent will process numeric UIDs/GIDs for us.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | arch-tmpfiles | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch-tmpfiles b/arch-tmpfiles index a5eb535..723b6b7 100755 --- a/arch-tmpfiles +++ b/arch-tmpfiles @@ -25,12 +25,12 @@ checkparams() { fi # uid must be numeric or a valid user name - if [[ $uid && $uid != +([[:digit:]]) ]] && ! getent passwd "$uid" >/dev/null; then + if [[ $uid ]] && ! getent passwd "$uid" >/dev/null; then return 1 fi # gid must be numeric or a valid group name - if [[ $gid && $gid != +([[:digit:]]) ]] && ! getent group "$gid" >/dev/null; then + if [[ $gid ]] && ! getent group "$gid" >/dev/null; then return 1 fi |