Re: [hackers] [sbase][PATCH 5/6] libutil/mode: Fix sticky bit parsing

2025-03-17 Thread Michael Forney
Tavian Barnes wrote: > --- > libutil/mode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libutil/mode.c b/libutil/mode.c > index b3632ad..2754be7 100644 > --- a/libutil/mode.c > +++ b/libutil/mode.c > @@ -40,10 +40,10 @@ next: > who |= S_IRWX

Re: [hackers] [sbase][PATCH 5/6] libutil/mode: Fix sticky bit parsing

2025-03-17 Thread Roberto E . Vargas Caballero
Hi, Quoth Tavian Barnes : > --- > @@ -40,10 +40,10 @@ next: > who |= S_IRWXG|S_ISGID; > continue; > case 'o': > - who |= S_IRWXO; > + who |= S_IRWXO|S_ISVTX; > continue; >

Re: [hackers] Re: [sbase][PATCH 6/6] find: Implement -print0

2025-03-17 Thread Roberto E . Vargas Caballero
Hi, Quoth Tavian Barnes : > On Fri, Feb 14, 2025 at 11:25 AM Tavian Barnes > > +static int > > +pri_print0(struct arg *arg) > > +{ > > + if (fwrite(arg->path, strlen(arg->path) + 1, 1, stdout) != 1) > > + eprintf("fwrite failed:"); > > + return 1; > > +} > > + I noticed

Re: [hackers] [sbase][PATCH 4/6] find: Use the current umask to parse -perm

2025-03-17 Thread Tavian Barnes
On Mon, Mar 17, 2025 at 7:14 AM Roberto E. Vargas Caballero wrote: > > Hi, > > Quoth Tavian Barnes : > > @@ -524,7 +525,10 @@ get_perm_arg(char *argv[], union extra *extra) > > else > > p->exact = 1; > > > > - p->mode = parsemode(*argv, 0, 0); > > + mask = umask(0); > >

Re: [hackers] [sbase][PATCH 1/6] find: Fall back from stat() to lstat() on broken links

2025-03-17 Thread Roberto E . Vargas Caballero
Quoth Tavian Barnes : > --- > +static int > +do_stat(char *path, struct stat *sb, struct findhist *hist) > +{ > + if (gflags.l || (gflags.h && !hist)) { > + if (stat(path, sb) == 0) { > + return 0; > + } else if (errno != ENOENT && errno != ENOTDIR) {

Re: [hackers] [sbase][PATCH 3/6] find: Fix spawn() return value

2025-03-17 Thread Roberto E . Vargas Caballero
Hi, Quoth Evan Gates : > On Fri, 14 Feb 2025 at 09:25 Tavian Barnes, wrote: > > > --- > > find.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/find.c b/find.c > > index ce551e5..71488da 100644 > > --- a/find.c > > +++ b/find.c > > @@ -244,6 +244,7 @@ spawn(ch

Re: [hackers] [sbase][PATCH 4/6] find: Use the current umask to parse -perm

2025-03-17 Thread Roberto E . Vargas Caballero
Hi, Quoth Tavian Barnes : > --- > @@ -524,7 +525,10 @@ get_perm_arg(char *argv[], union extra *extra) > else > p->exact = 1; > > - p->mode = parsemode(*argv, 0, 0); > + mask = umask(0); > + umask(mask); > + > + p->mode = parsemode(*argv, 0, mask); > >

Re: [hackers] [sbase][PATCH 4/6] find: Use the current umask to parse -perm

2025-03-17 Thread Roberto E. Vargas Caballero
Hi, On Mon, Mar 17, 2025 at 08:08:51AM -0400, Tavian Barnes wrote: > On Mon, Mar 17, 2025 at 7:14 AM Roberto E. Vargas Caballero > > I don't think this is correct. The results of -perm should not depend > > of the process umask. Why do you think -perm should use umask(2)? > > POSIX bug 1392 clar

Re: [hackers] [sbase][PATCH 2/6] find: Don't exit successfully after errors

2025-03-17 Thread Roberto E . Vargas Caballero
Hi, This seems ok to me. Unless someone complains I will apply it. Regards,

Re: [hackers] [dmenu][PATCH] XUngrabKeyboard() instead of XUngrabKey()

2025-03-17 Thread Hiltjo Posthuma
On Sat, Mar 15, 2025 at 07:53:56PM +0100, Adam Purkrt wrote: > XUngrabKey(), which is currently used in cleanup(), is not the right > counterpart to XGrabKeyboard(), which is used in grabkeyboard(), > called from main(). > > XUngrabKeyboard() is the function to use, as grabbing the whole > keyboar