* GID behavior
@ 2001-01-09 8:11 Paul Lew
2001-01-09 9:03 ` Andrej Borsenkow
0 siblings, 1 reply; 2+ messages in thread
From: Paul Lew @ 2001-01-09 8:11 UTC (permalink / raw)
To: zsh-users
According to zsh manaul:
GID <S>
The real group ID of the shell process. If you have
sufficient privileges, you may change the group ID of
the shell process by assigning to this parameter. Also
(assuming sufficient privileges), you may start a sin-
gle command under a different group ID by `(GID=gid;
command)'
This is what happened:
$ id
uid=46991(paullew) gid=25(eng) groups=25(eng),3010(cdseng),3011(cnsar)
$ GID=3011 touch x
$ ls -l x
-rw-rw-r-- 1 paullew eng 0 Jan 8 23:48 x
$ chgrp cnsar x
$ ls -l x
-rw-rw-r-- 1 paullew cnsar 0 Jan 8 23:48 x
$ GID=3011
$ echo $GID
25
$ echo $ZSH_VERSION
3.1.9-dev-7
$ uname -a
SunOS cns-build2 5.6 Generic_105181-16 sun4u sparc
So, bug, feature, or I missed something? Thanks in advance.
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: GID behavior
2001-01-09 8:11 GID behavior Paul Lew
@ 2001-01-09 9:03 ` Andrej Borsenkow
0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 2001-01-09 9:03 UTC (permalink / raw)
To: Paul Lew, zsh-users
>
> According to zsh manaul:
>
> GID <S>
> The real group ID of the shell process. If you have
> sufficient privileges, you may change the group ID of
> the shell process by assigning to this parameter. Also
> (assuming sufficient privileges), you may start a sin-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> gle command under a different group ID by `(GID=gid;
> command)'
>
setgid() If the effective user ID of the process calling setgid() is
the superuser, the real, effective, and saved group IDs are
set to the gid.
If the effective user ID of the calling process is not the
superuser, but gid is either the real group ID or the saved
group ID of the calling process, the effective group ID is
set to gid.
You must be root to change your GID. The newgrp command is SUID root:
bor@itsrm2% ll =newgrp
-rwsr-xr-x 1 root bin 22805 Nov 18 1998 /usr/bin/newgrp*
-andrej
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-09 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-09 8:11 GID behavior Paul Lew
2001-01-09 9:03 ` Andrej Borsenkow
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).