40 lines
809 B
Plaintext
40 lines
809 B
Plaintext
|
|
# Copyright (C) 2024 Web Server LLC
|
|
# Copyright (C) Igor Sysoev
|
|
# Copyright (C) Nginx, Inc.
|
|
|
|
|
|
if check_cache "unix group" "os"; then
|
|
return
|
|
fi
|
|
|
|
if [ $NGX_USER = nobody ]; then
|
|
if grep nobody /etc/group 2>&1 >/dev/null; then
|
|
echo "checking for nobody group ... found"
|
|
NGX_GROUP=nobody
|
|
else
|
|
echo "checking for nobody group ... not found"
|
|
|
|
if grep nogroup /etc/group 2>&1 >/dev/null; then
|
|
echo "checking for nogroup group ... found"
|
|
NGX_GROUP=nogroup
|
|
else
|
|
echo "checking for nogroup group ... not found"
|
|
NGX_GROUP=nobody
|
|
fi
|
|
fi
|
|
else
|
|
NGX_GROUP=$NGX_USER
|
|
fi
|
|
|
|
if [ $NGX_FEATURE_CACHE = NO ]; then
|
|
return
|
|
fi
|
|
|
|
cache_output_start
|
|
|
|
echo "ngx_found=yes"
|
|
echo "NGX_GROUP=$NGX_GROUP"
|
|
|
|
cache_output_end
|