Re: [PATCH 1/1] delgroup: Add --only-if-empty argument option

2023-01-29 Thread Magnus Armholt
Any opinions about this? -Magnus On Tue, Nov 15, 2022 at 12:59 PM Magnus Armholt wrote: > Add option to only remove group if it is empty. > The option can also be given to deluser, if delgroup is enabled. > When --only-if-empty flag is given to deluser, it will not > return failure when

Re: [PATCH v2] find: implement -nouser, -nogroup

2023-01-29 Thread David Leonard
* v2 Fix ifdef guard typo found by Kang-Che Sung Subject: [PATCH v2] find: implement -nouser, -nogroup https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html -nouser The primary shall evaluate as true if the file belongs to a user ID for which the getpwuid() function

Re: [PATCH] find: implement -nouser, -nogroup

2023-01-29 Thread David Leonard
On Sun, 29 Jan 2023, Kang-Che Sung wrote: > +IF_FEATURE_FIND_NOUSER( ACTS(nouser)) > +IF_FEATURE_FIND_NOUSER( ACTS(nogroup)) Typo. (Should be IF_FEATURE_FIND_NOGROUP) Thanks! > +ACTF(nouser) > +{ > +       return !getpwuid(statbuf->st_uid); > +} I think there is a logic hole here. getpwuid