DIR=${DIR:-$MOUNT}
assert_DIR
+if getent group nobody; then
+ GROUP=nobody
+elif getent group nogroup; then
+ GROUP=nogroup
+else
+ error "No generic nobody group"
+fi
build_test_filter
# Set attributes
chmod 000 $DIR/$tdir/d2/file3
- chown nobody:nobody $DIR/$tdir/d2/file3
+ chown nobody:$GROUP $DIR/$tdir/d2/file3
# Set xattrs
if [[ "$xattr" != "no" ]]; then
skip_env "\$RUNAS_ID set to 0, but \$UID is also 0!" && exit
fi
check_runas_id $RUNAS_ID $RUNAS_GID $RUNAS
+if getent group nobody; then
+ GROUP=nobody
+elif getent group nogroup; then
+ GROUP=nogroup
+else
+ error "No generic nobody group"
+fi
build_test_filter
# User.
create_small_file $file
- chown $RUNAS_ID:nobody $file ||
- error "cannot chown '$file' to '$RUNAS_ID:nobody'"
+ chown $RUNAS_ID:$GROUP $file ||
+ error "cannot chown '$file' to '$RUNAS_ID:$GROUP'"
$RUNAS $LFS hsm_$action $file &&
error "$action by user should fail"
# Other.
create_small_file $file
- chown nobody:nobody $file ||
- error "cannot chown '$file' to 'nobody:nobody'"
+ chown nobody:$GROUP $file ||
+ error "cannot chown '$file' to 'nobody:$GROUP'"
$RUNAS $LFS hsm_$action $file &&
error "$action by other should fail"