bug-bash
[Top][All Lists]
Advanced

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

Assigment to GROUPS doesn't return an error code


From: Grzegorz Bajson
Subject: Assigment to GROUPS doesn't return an error code
Date: Tue, 11 Aug 2015 11:07:58 +0200

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE -DRECYCLES_PIDS  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fwrapv
uname output: Linux oc5414668263.ibm.com 2.6.32-504.23.4.el6.x86_64 #1 SMP Fri May 29 10:16:43 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 4.3.30
Patch Level: 2
Release Status: release

Description:
    Hi,
    According to man page assigment to GROUPS should return error status, this is not a case:

    "GROUPS An  array  variable  containing  the list of groups of which the current user is a member.  Assignments to GROUPS have no effect and return an error
    status.  If GROUPS is unset, it loses its special properties, even if it is subsequently reset."

[Detailed description of the problem, suggestion, or complaint.]

    address@hidden:/var/tmp/bash-4.3.30]$ ./bash
    address@hidden:/var/tmp/bash-4.3.30]$ GROUPS=100
    address@hidden:/var/tmp/bash-4.3.30]$ echo $?
    0
    address@hidden:/var/tmp/bash-4.3.30]$ echo $GROUPS
    500

    address@hidden:/var/tmp/bash-4.3.30]$ set | grep GROUPS
    GROUPS=([0]="500" [1]="7" [2]="10" [3]="18" [4]="487" [5]="491" [6]="498" [7]="3" [8]="501" [9]="502")


Repeat-By:
[Describe the sequence of events that causes the problem
to occur.]

Fix:
[Description of how to fix the problem.  If you don't know a
fix for the problem, don't include this section.]




--
Pozdrawiam,
Grzegorz Bajson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]