mirror of
git://git.suckless.org/sbase
synced 2025-04-01 22:58:03 +00:00
find: Use the current umask to parse -perm
https://www.austingroupbugs.net/view.php?id=1392
This commit is contained in:
parent
e861343db1
commit
8f9824e34b
6
find.c
6
find.c
@ -516,6 +516,7 @@ get_xdev_arg(char *argv[], union extra *extra)
|
|||||||
static char **
|
static char **
|
||||||
get_perm_arg(char *argv[], union extra *extra)
|
get_perm_arg(char *argv[], union extra *extra)
|
||||||
{
|
{
|
||||||
|
mode_t mask;
|
||||||
struct permarg *p = extra->p = emalloc(sizeof(*p));
|
struct permarg *p = extra->p = emalloc(sizeof(*p));
|
||||||
|
|
||||||
if (**argv == '-')
|
if (**argv == '-')
|
||||||
@ -523,7 +524,10 @@ get_perm_arg(char *argv[], union extra *extra)
|
|||||||
else
|
else
|
||||||
p->exact = 1;
|
p->exact = 1;
|
||||||
|
|
||||||
p->mode = parsemode(*argv, 0, 0);
|
mask = umask(0);
|
||||||
|
umask(mask);
|
||||||
|
|
||||||
|
p->mode = parsemode(*argv, 0, mask);
|
||||||
|
|
||||||
return argv;
|
return argv;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user