[ksh93-integration-discuss] Re: Small sticky-bit bug in "mkdir" builtin...

Roland Mainz roland.mainz at nrubsig.org
Fri May 4 15:57:54 PDT 2007


Glenn Fowler wrote:
> On Wed, 25 Apr 2007 22:27:57 +0200 Roland Mainz wrote:
> > Just found a small issue in libcmd's "mkdir" from ast-ksh.2007-04-18:
> 
> > It seems the sticky bit (e.g. "t") is not set when I set the mode to
> > "1777":
> > -- snip --
> > $ umask
> > 0022
> > $ ~/ksh93/ast_ksh_20070418/build_32bit/arch/sol11.i386/bin/ksh -c 'mkdir
> > -m 1777 foo_builtin'
> > $ /bin/mkdir -m 1777 foo_external
> > $ ls -lad foo*
> > drwxrwxrwx   2 gisburn  ksh93  512 Apr 25 22:22 foo_builtin
> > drwxrwxrwt   2 gisburn  ksh93  512 Apr 25 22:23 foo_external
> > -- snip --
> 
> > Glenn: Can you reproduce the issue on your side ?
> 
> the problem is solaris mkdir(2) turns off the sticky bit
> solaris /bin/mkdir compensates by lstat/chmod after mkdir
> to make sure certain bits are set -- I'll have to do the same
> for -lcmd mkdir

Thanks! :-)

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the ksh93-integration-discuss mailing list