Re: [PATCH] start-statd: Use bash as -p is no POSIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/06/2011 02:38 PM, Jim Rees wrote:
> Luk Claes wrote:
> 
>   sh -p is not guaranteed to be provided by POSIX shells. dash for instance
>   does not provide this, so use bash explicitly.
> 
> That's pretty funny.  The script requires a posix shell, which bash isn't by
> default, so it provides an undocumented (in my ubuntu man page) option to
> force bash into compliance.  Since the option itself isn't posix, we now
> require the use of this non-posix shell so we can guarantee posix
> compliance.

That would even be worse as the -p option in bash has *nothing* to do
with posix:

set -p's documentation in bash's manual:

Turn  on  privileged  mode.   In this mode, the
$ENV and $BASH_ENV  files  are  not  processed,
shell  functions  are  not  inherited  from the
environment,  and  the   SHELLOPTS,   BASHOPTS,
CDPATH,   and  GLOBIGNORE  variables,  if  they
appear in the environment, are ignored.  If the
shell   is  started  with  the  effective  user
(group) id not equal to the real  user  (group)
id,  and  the  -p option is not supplied, these
actions are taken and the effective user id  is
set  to  the real user id.  If the -p option is
supplied at startup, the effective user  id  is
not  reset.  Turning this option off causes the
effective user and group ids to be set  to  the
real user and group ids.

Cheers

Luk
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux