Bug 1260126 - shadow-utils tools fail in a chroot if /etc/login.defs is missing and there is no error message about the failure
shadow-utils tools fail in a chroot if /etc/login.defs is missing and there i...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
24
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-04 09:33 EDT by Alexander Todorov
Modified: 2017-08-08 08:12 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:12:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2015-09-04 09:33:51 EDT
Description of problem:

Anaconda test suite executes commands of the type:

# groupadd -R /var/tmp/tmpipfb2fzg  test_group


These fail even with SElinux disabled:


Version-Release number of selected component (if applicable):
shadow-utils-4.2.1-3.fc24.x86_64


# getenforce 
Disabled

# ls -lR /var/tmp/tmpipfb2fzg 
/var/tmp/tmpipfb2fzg:
total 8
drwxr-xr-x. 2 root root 4096 Sep  4 09:29 etc
drwxr-xr-x. 2 root root 4096 Sep  4 09:00 lib64

/var/tmp/tmpipfb2fzg/etc:
total 8
-rw-r--r--. 1 root root 17 Sep  4 09:05 group
-rw-r--r--. 1 root root  0 Sep  4 09:00 group-
-rw-r--r--. 1 root root  0 Sep  4 09:00 gshadow
-rw-r--r--. 1 root root 59 Sep  4 09:00 nsswitch.conf
-rw-r--r--. 1 root root  0 Sep  4 09:00 passwd
-rw-r--r--. 1 root root  0 Sep  4 09:00 shadow

/var/tmp/tmpipfb2fzg/lib64:
total 168
-rwxr-xr-x. 1 root root 57016 Sep  4 09:00 libnss_files-2.22.90.so
-rwxr-xr-x. 1 root root 57016 Sep  4 09:00 libnss_files.so
-rwxr-xr-x. 1 root root 57016 Sep  4 09:00 libnss_files.so.2


journalctl shows the following error:

сеп 04 09:29:07 rhevh-x3650-01-g3.rhts.eng.bos.redhat.com audit[1052]: ADD_GROUP pid=1052 uid=0 auid=0 ses=1 msg='op= acct="test_group2" exe="?" hostname=? addr=? terminal=? res=failed'



The temporary directory is created by anaconda, see the setUp() method in:
https://github.com/rhinstaller/anaconda/blob/master/tests/pyanaconda_tests/user_create_test.py

This used to work on older systems but fails with recent Rawhide.
Comment 1 David Shea 2015-09-04 09:49:26 EDT
I think this one's on anaconda. The test chroot didn't have /proc or /sys/fs/selinux, so there wasn't enough information to set the selinux contexts on the new files. And the fact that it fails with selinux enforcing probably means that selinux is working as designed.
Comment 2 David Shea 2015-09-04 09:55:23 EDT
Moving back to shadow-utils for now for the assessment of that side of things.
Comment 3 Alexander Todorov 2015-09-04 09:58:41 EDT
(In reply to David Shea from comment #1)
> I think this one's on anaconda. The test chroot didn't have /proc or
> /sys/fs/selinux, so there wasn't enough information to set the selinux
> contexts on the new files. And the fact that it fails with selinux enforcing
> probably means that selinux is working as designed.

Notes:

I did execute the command from comment #0 as root, in the shell, not from inside anaconda. Which means others will likely see this as well. If our chroot dir is incomplete, e.g. needs /proc and /sys/fs/selinux mounted there this should be at least documented.

Proposed patch for the anaconda side of things:
http://paste.fedoraproject.org/263606/74064144/
Comment 4 Tomas Mraz 2015-09-04 11:03:16 EDT
What is the exit value of the command?
Can you please strace it and attach the log?
Comment 5 Alexander Todorov 2015-09-07 05:20:13 EDT
If the group already exists in the chroot dir (etc/group editted manually):

# groupadd -R /var/tmp/tmpipfb2fzg  test_group
groupadd: group 'test_group' already exists
# echo $?
9


^^^^ looks fine


If the group doesn't exist (original bug report)

# groupadd -R /var/tmp/tmpipfb2fzg  test_group2
# echo $?
1


# strace groupadd -R /var/tmp/tmpipfb2fzg  test_group2
execve("/usr/sbin/groupadd", ["groupadd", "-R", "/var/tmp/tmpipfb2fzg", "test_group2"], [/* 41 vars */]) = 0
brk(0)                                  = 0x55bb9a799000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efd3c9cf000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=70968, ...}) = 0
mmap(NULL, 70968, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7efd3c9bd000
close(3)                                = 0
open("/lib64/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=117912, ...}) = 0
mmap(NULL, 2252872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3c586000
mprotect(0x7efd3c5a1000, 2097152, PROT_NONE) = 0
mmap(0x7efd3c7a1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7efd3c7a1000
mmap(0x7efd3c7a3000, 36936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7efd3c7a3000
close(3)                                = 0
open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0c\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=136608, ...}) = 0
mmap(NULL, 2237280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3c363000
mprotect(0x7efd3c382000, 2097152, PROT_NONE) = 0
mmap(0x7efd3c582000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7efd3c582000
mmap(0x7efd3c584000, 4960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7efd3c584000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\7\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2149872, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efd3c9bc000
mmap(NULL, 3975648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3bf98000
mprotect(0x7efd3c15a000, 2093056, PROT_NONE) = 0
mmap(0x7efd3c359000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c1000) = 0x7efd3c359000
mmap(0x7efd3c35f000, 14816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7efd3c35f000
close(3)                                = 0
open("/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=459256, ...}) = 0
mmap(NULL, 2552072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3bd28000
mprotect(0x7efd3bd96000, 2097152, PROT_NONE) = 0
mmap(0x7efd3bf96000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6e000) = 0x7efd3bf96000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19344, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3bb24000
mprotect(0x7efd3bb27000, 2093056, PROT_NONE) = 0
mmap(0x7efd3bd26000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7efd3bd26000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=149416, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efd3c9bb000
mmap(NULL, 2212944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7efd3b907000
mprotect(0x7efd3b91f000, 2093056, PROT_NONE) = 0
mmap(0x7efd3bb1e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7efd3bb1e000
mmap(0x7efd3bb20000, 13392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7efd3bb20000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efd3c9ba000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efd3c9b8000
arch_prctl(ARCH_SET_FS, 0x7efd3c9b8800) = 0
mprotect(0x7efd3c359000, 16384, PROT_READ) = 0
mprotect(0x7efd3bb1e000, 4096, PROT_READ) = 0
mprotect(0x7efd3bd26000, 4096, PROT_READ) = 0
mprotect(0x7efd3bf96000, 4096, PROT_READ) = 0
mprotect(0x7efd3c582000, 4096, PROT_READ) = 0
mprotect(0x7efd3c7a1000, 4096, PROT_READ) = 0
mprotect(0x55bb9934a000, 4096, PROT_READ) = 0
mprotect(0x7efd3c9d0000, 4096, PROT_READ) = 0
munmap(0x7efd3c9bd000, 70968)           = 0
set_tid_address(0x7efd3c9b8ad0)         = 5336
set_robust_list(0x7efd3c9b8ae0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7efd3b90cb40, [], SA_RESTORER|SA_SIGINFO, 0x7efd3b918160}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7efd3b90cbd0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7efd3b918160}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
statfs("/sys/fs/selinux", {f_type="SELINUX_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/sys/fs/selinux", {f_type="SELINUX_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
brk(0)                                  = 0x55bb9a799000
brk(0x55bb9a7ba000)                     = 0x55bb9a7ba000
access("/etc/selinux/config", F_OK)     = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=110439344, ...}) = 0
mmap(NULL, 110439344, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7efd34fb4000
close(3)                                = 0
getgid()                                = 0
getgid()                                = 0
setregid(0, 0)                          = 0
getuid()                                = 0
getuid()                                = 0
setreuid(0, 0)                          = 0
access("/var/tmp/tmpipfb2fzg", F_OK)    = 0
chdir("/var/tmp/tmpipfb2fzg")           = 0
chroot("/var/tmp/tmpipfb2fzg")          = 0
socket(PF_NETLINK, SOCK_RAW, NETLINK_AUDIT) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
read(4, "passwd: files\nshadow: files\ngrou"..., 4096) = 59
read(4, "", 4096)                       = 0
close(4)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/tls/x86_64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffced6c8490) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7ffced6c8490)      = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffced6c8490)   = -1 ENOENT (No such file or directory)
open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \"\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=57016, ...}) = 0
mmap(NULL, 2168600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7efd34da2000
mprotect(0x7efd34dad000, 2093056, PROT_NONE) = 0
mmap(0x7efd34fac000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x7efd34fac000
mmap(0x7efd34fae000, 22296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7efd34fae000
close(4)                                = 0
mprotect(0x7efd34fac000, 4096, PROT_READ) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
read(4, "test_group:x:47:\n", 4096)     = 17
read(4, "", 4096)                       = 0
close(4)                                = 0
access("/etc/gshadow", F_OK)            = 0
open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 4
rt_sigaction(SIGALRM, {0x7efd3c0a51a0, ~[], SA_RESTORER, 0x7efd3bfcd5a0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [], 8) = 0
alarm(15)                               = 0
fcntl(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
alarm(0)                                = 15
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x7efd3bfcd5a0}, NULL, 8) = 0
open("/etc/group.5336", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 5
write(5, "5336\0", 5)                   = 5
close(5)                                = 0
link("/etc/group.5336", "/etc/group.lock") = 0
stat("/etc/group.5336", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
unlink("/etc/group.5336")               = 0
open("/etc/gshadow.5336", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 5
write(5, "5336\0", 5)                   = 5
close(5)                                = 0
link("/etc/gshadow.5336", "/etc/gshadow.lock") = 0
stat("/etc/gshadow.5336", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
unlink("/etc/gshadow.5336")             = 0
open("/etc/group", O_RDWR|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW) = 5
fcntl(5, F_GETFL)                       = 0x28802 (flags O_RDWR|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
read(5, "test_group:x:47:\n", 4096)     = 17
read(5, "", 4096)                       = 0
open("/etc/login.defs", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 6
connect(6, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(6)                                = 0
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 6
connect(6, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(6)                                = 0
readlink("/proc/self/exe", 0x7ffced6c5590, 4096) = -1 ENOENT (No such file or directory)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/0", 0x7ffced6c65e0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffced6c6430)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffced6c6190)           = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/1", 0x7ffced6c65e0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffced6c6430)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffced6c6190)           = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/2", 0x7ffced6c65e0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffced6c6430)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffced6c6190)           = -1 ENOENT (No such file or directory)
sendto(3, "X\0\0\0\\\4\5\0\1\0\0\0\0\0\0\0op= acct=\"test_g"..., 88, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 88
poll([{fd=3, events=POLLIN}], 1, 500)   = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "$\0\0\0\2\0\0\0\1\0\0\0\330\24\0\0\0\0\0\0X\0\0\0\\\4\5\0\1\0\0\0"..., 8988, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
recvfrom(3, "$\0\0\0\2\0\0\0\1\0\0\0\330\24\0\0\0\0\0\0X\0\0\0\\\4\5\0\1\0\0\0"..., 8988, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
unlink("/etc/gshadow.lock")             = 0
unlink("/etc/group.lock")               = 0
close(4)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++
Comment 6 Tomas Mraz 2015-09-07 11:49:28 EDT
So the problem is that the /etc/login.defs is missing in the chroot. The command actually tries to write a message to syslog about that but /dev/log is also missing. I'll modify the command to also print a message to the stderr.
Comment 7 Alexander Todorov 2015-09-08 05:20:11 EDT
After copying /etc/login.defs to the chroot I get:

# groupadd -R /var/tmp/tmpipfb2fzg  test_group2
groupadd: failure while writing changes to /etc/group
# echo $?
10

# strace groupadd -R /var/tmp/tmpipfb2fzg  test_group2
execve("/usr/sbin/groupadd", ["groupadd", "-R", "/var/tmp/tmpipfb2fzg", "test_group2"], [/* 41 vars */]) = 0
brk(0)                                  = 0x5599f975a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe627585000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=70968, ...}) = 0
mmap(NULL, 70968, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe627573000
close(3)                                = 0
open("/lib64/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=117912, ...}) = 0
mmap(NULL, 2252872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe62713c000
mprotect(0x7fe627157000, 2097152, PROT_NONE) = 0
mmap(0x7fe627357000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7fe627357000
mmap(0x7fe627359000, 36936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe627359000
close(3)                                = 0
open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0c\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=136608, ...}) = 0
mmap(NULL, 2237280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe626f19000
mprotect(0x7fe626f38000, 2097152, PROT_NONE) = 0
mmap(0x7fe627138000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7fe627138000
mmap(0x7fe62713a000, 4960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe62713a000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\7\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2149872, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe627572000
mmap(NULL, 3975648, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe626b4e000
mprotect(0x7fe626d10000, 2093056, PROT_NONE) = 0
mmap(0x7fe626f0f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c1000) = 0x7fe626f0f000
mmap(0x7fe626f15000, 14816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe626f15000
close(3)                                = 0
open("/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=459256, ...}) = 0
mmap(NULL, 2552072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe6268de000
mprotect(0x7fe62694c000, 2097152, PROT_NONE) = 0
mmap(0x7fe626b4c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6e000) = 0x7fe626b4c000
close(3)                                = 0
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=19344, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe6266da000
mprotect(0x7fe6266dd000, 2093056, PROT_NONE) = 0
mmap(0x7fe6268dc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fe6268dc000
close(3)                                = 0
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=149416, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe627571000
mmap(NULL, 2212944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe6264bd000
mprotect(0x7fe6264d5000, 2093056, PROT_NONE) = 0
mmap(0x7fe6266d4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fe6266d4000
mmap(0x7fe6266d6000, 13392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe6266d6000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe627570000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe62756e000
arch_prctl(ARCH_SET_FS, 0x7fe62756e800) = 0
mprotect(0x7fe626f0f000, 16384, PROT_READ) = 0
mprotect(0x7fe6266d4000, 4096, PROT_READ) = 0
mprotect(0x7fe6268dc000, 4096, PROT_READ) = 0
mprotect(0x7fe626b4c000, 4096, PROT_READ) = 0
mprotect(0x7fe627138000, 4096, PROT_READ) = 0
mprotect(0x7fe627357000, 4096, PROT_READ) = 0
mprotect(0x5599f8802000, 4096, PROT_READ) = 0
mprotect(0x7fe627586000, 4096, PROT_READ) = 0
munmap(0x7fe627573000, 70968)           = 0
set_tid_address(0x7fe62756ead0)         = 8709
set_robust_list(0x7fe62756eae0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7fe6264c2b40, [], SA_RESTORER|SA_SIGINFO, 0x7fe6264ce160}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fe6264c2bd0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fe6264ce160}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
statfs("/sys/fs/selinux", {f_type="SELINUX_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
statfs("/sys/fs/selinux", {f_type="SELINUX_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096, f_flags=4128}) = 0
brk(0)                                  = 0x5599f975a000
brk(0x5599f977b000)                     = 0x5599f977b000
access("/etc/selinux/config", F_OK)     = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=110439344, ...}) = 0
mmap(NULL, 110439344, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe61fb6a000
close(3)                                = 0
getgid()                                = 0
getgid()                                = 0
setregid(0, 0)                          = 0
getuid()                                = 0
getuid()                                = 0
setreuid(0, 0)                          = 0
access("/var/tmp/tmpipfb2fzg", F_OK)    = 0
chdir("/var/tmp/tmpipfb2fzg")           = 0
chroot("/var/tmp/tmpipfb2fzg")          = 0
socket(PF_NETLINK, SOCK_RAW, NETLINK_AUDIT) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
read(4, "passwd: files\nshadow: files\ngrou"..., 4096) = 59
read(4, "", 4096)                       = 0
close(4)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/tls/x86_64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7ffd49cabf30) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7ffd49cabf30)      = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7ffd49cabf30)   = -1 ENOENT (No such file or directory)
open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \"\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=57016, ...}) = 0
mmap(NULL, 2168600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7fe61f958000
mprotect(0x7fe61f963000, 2093056, PROT_NONE) = 0
mmap(0x7fe61fb62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x7fe61fb62000
mmap(0x7fe61fb64000, 22296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe61fb64000
close(4)                                = 0
mprotect(0x7fe61fb62000, 4096, PROT_READ) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
read(4, "test_group:x:47:\n", 4096)     = 17
read(4, "", 4096)                       = 0
close(4)                                = 0
access("/etc/gshadow", F_OK)            = 0
open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 4
rt_sigaction(SIGALRM, {0x7fe626c5b1a0, ~[], SA_RESTORER, 0x7fe626b835a0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [], 8) = 0
alarm(15)                               = 0
fcntl(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
alarm(0)                                = 15
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x7fe626b835a0}, NULL, 8) = 0
open("/etc/group.8709", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 5
write(5, "8709\0", 5)                   = 5
close(5)                                = 0
link("/etc/group.8709", "/etc/group.lock") = 0
stat("/etc/group.8709", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
unlink("/etc/group.8709")               = 0
open("/etc/gshadow.8709", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 5
write(5, "8709\0", 5)                   = 5
close(5)                                = 0
link("/etc/gshadow.8709", "/etc/gshadow.lock") = 0
stat("/etc/gshadow.8709", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
unlink("/etc/gshadow.8709")             = 0
open("/etc/group", O_RDWR|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW) = 5
fcntl(5, F_GETFL)                       = 0x28802 (flags O_RDWR|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
read(5, "test_group:x:47:\n", 4096)     = 17
read(5, "", 4096)                       = 0
open("/etc/login.defs", O_RDONLY)       = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=2028, ...}) = 0
read(6, "#\n# Please note that the paramet"..., 4096) = 2028
read(6, "", 4096)                       = 0
close(6)                                = 0
open("/etc/gshadow", O_RDWR|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW) = 6
fcntl(6, F_GETFL)                       = 0x28802 (flags O_RDWR|O_NONBLOCK|O_LARGEFILE|O_NOFOLLOW)
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(6, "", 4096)                       = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
read(7, "test_group:x:47:\n", 4096)     = 17
read(7, "", 4096)                       = 0
close(7)                                = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
futex(0x7fe6271390c0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/selinux/config", O_RDONLY)   = -1 ENOENT (No such file or directory)
futex(0x7fe62713a1f0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/selinux/targeted/contexts/files/file_contexts.subs_dist", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/selinux/targeted/contexts/files/file_contexts.subs", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/selinux/targeted/contexts/files/file_contexts", O_RDONLY) = -1 ENOENT (No such file or directory)
getxattr("/etc/group", "security.selinux", "system_u:object_r:passwd_file_t:s0", 255) = 35
open("/sys/fs/selinux/mls", O_RDONLY)   = -1 ENOENT (No such file or directory)
futex(0x7fe62713b330, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fe62713b318, FUTEX_WAKE_PRIVATE, 2147483647) = 0
gettid()                                = 8709
open("/proc/self/task/8709/attr/fscreate", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/sys/fs/selinux/enforce", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(5, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
umask(0777)                             = 022
open("/etc/group-", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7
umask(022)                              = 0777
fchown(7, 0, 0)                         = 0
fchmod(7, 0644)                         = 0
lseek(5, 0, SEEK_SET)                   = 0
read(5, "test_group:x:47:\n", 4096)     = 17
fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(5, "", 4096)                       = 0
write(7, "test_group:x:47:\n", 17)      = 17
fsync(7)                                = 0
close(7)                                = 0
utime("/etc/group-", [2015/09/08-05:17:30, 2015/09/04-09:05:13]) = 0
close(5)                                = 0
open("/proc/self/task/8709/attr/fscreate", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/bg_BG.utf8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/bg_BG/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/bg.utf8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/bg/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "groupadd: failure while writing "..., 54groupadd: failure while writing changes to /etc/group
) = 54
readlink("/proc/self/exe", 0x7ffd49ca95b0, 4096) = -1 ENOENT (No such file or directory)
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/0", 0x7ffd49caa600, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa450)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa1b0)           = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/1", 0x7ffd49caa600, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa450)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa1b0)           = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/2", 0x7ffd49caa600, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa450)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa1b0)           = -1 ENOENT (No such file or directory)
sendto(3, "`\0\0\0\\\4\5\0\1\0\0\0\0\0\0\0op=add-group acc"..., 96, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 96
poll([{fd=3, events=POLLIN}], 1, 500)   = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "$\0\0\0\2\0\0\0\1\0\0\0\5\"\0\0\0\0\0\0`\0\0\0\\\4\5\0\1\0\0\0"..., 8988, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
recvfrom(3, "$\0\0\0\2\0\0\0\1\0\0\0\5\"\0\0\0\0\0\0`\0\0\0\\\4\5\0\1\0\0\0"..., 8988, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 5
connect(5, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/0", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/1", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/2", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
sendto(3, "l\0\0\0l\4\5\0\2\0\0\0\0\0\0\0op=adding-shadow"..., 108, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 108
poll([{fd=3, events=POLLIN}], 1, 500)   = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "$\0\0\0\2\0\0\0\2\0\0\0\5\"\0\0\0\0\0\0l\0\0\0l\4\5\0\2\0\0\0"..., 8988, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
recvfrom(3, "$\0\0\0\2\0\0\0\2\0\0\0\5\"\0\0\0\0\0\0l\0\0\0l\4\5\0\2\0\0\0"..., 8988, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 5
connect(5, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/0", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/1", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/2", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
sendto(3, "d\0\0\0\\\4\5\0\3\0\0\0\0\0\0\0op=adding-group "..., 100, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 100
poll([{fd=3, events=POLLIN}], 1, 500)   = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "$\0\0\0\2\0\0\0\3\0\0\0\5\"\0\0\0\0\0\0d\0\0\0\\\4\5\0\3\0\0\0"..., 8988, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
recvfrom(3, "$\0\0\0\2\0\0\0\3\0\0\0\5\"\0\0\0\0\0\0d\0\0\0\\\4\5\0\3\0\0\0"..., 8988, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 5
connect(5, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(5)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/0", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/1", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
readlink("/proc/self/fd/2", 0x7ffd49caa5a0, 31) = -1 ENOENT (No such file or directory)
stat("/dev/pts/", 0x7ffd49caa3f0)       = -1 ENOENT (No such file or directory)
stat("/dev/", 0x7ffd49caa150)           = -1 ENOENT (No such file or directory)
sendto(3, "X\0\0\0\\\4\5\0\4\0\0\0\0\0\0\0op= acct=\"test_g"..., 88, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 88
poll([{fd=3, events=POLLIN}], 1, 500)   = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "$\0\0\0\2\0\0\0\4\0\0\0\5\"\0\0\0\0\0\0X\0\0\0\\\4\5\0\4\0\0\0"..., 8988, MSG_PEEK|MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
recvfrom(3, "$\0\0\0\2\0\0\0\4\0\0\0\5\"\0\0\0\0\0\0X\0\0\0\\\4\5\0\4\0\0\0"..., 8988, MSG_DONTWAIT, {sa_family=AF_NETLINK, pid=0, groups=00000000}, [12]) = 36
close(6)                                = 0
unlink("/etc/gshadow.lock")             = 0
unlink("/etc/group.lock")               = 0
close(4)                                = 0
exit_group(10)                          = ?
+++ exited with 10 +++
Comment 8 Tomas Mraz 2015-09-08 09:10:52 EDT
Here the problem seems to be that the /proc filesystem is not mounted inside the chroot and setfscreatecon() thus fails.
Again I think the error reporting should be more verbose here.
Comment 9 Alexander Todorov 2015-09-09 04:01:14 EDT
(In reply to Tomas Mraz from comment #8)
> Here the problem seems to be that the /proc filesystem is not mounted inside
> the chroot and setfscreatecon() thus fails.
> Again I think the error reporting should be more verbose here.

I think we would need to update the man page as well then, to reflect that requirement.
Comment 10 Jan Kurik 2016-02-24 10:45:56 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 11 Fedora End Of Life 2017-07-25 15:14:56 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 12 Fedora End Of Life 2017-08-08 08:12:47 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.