diff options
author | Franck Bui <fbui@suse.com> | 2018-04-18 18:32:21 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-04-18 18:32:21 +0200 |
commit | 80359410c4056ffa9113837cebac8bdfde3f3ac2 (patch) | |
tree | a6b09971e307c1bb9b8bbc4b2b4507b7c9041d08 /test/TEST-21-SYSUSERS | |
parent | 613bddf7d1140be34569a68b49eda7415e67e070 (diff) | |
download | systemd-80359410c4056ffa9113837cebac8bdfde3f3ac2.tar.gz |
sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737)
To indicate that the there're no more entries, these wrappers return false but
did leave the passed pointed unmodified.
However EOF is not an error and is a very common case so initialize the output
argument to NULL even in this case so callers don't need to do that.
Fixes: #8721
Diffstat (limited to 'test/TEST-21-SYSUSERS')
-rw-r--r-- | test/TEST-21-SYSUSERS/test-12.expected-group | 2 | ||||
-rw-r--r-- | test/TEST-21-SYSUSERS/test-12.expected-passwd | 2 | ||||
-rw-r--r-- | test/TEST-21-SYSUSERS/test-12.initial-group | 1 | ||||
-rw-r--r-- | test/TEST-21-SYSUSERS/test-12.initial-passwd | 1 | ||||
-rw-r--r-- | test/TEST-21-SYSUSERS/test-12.input | 1 |
5 files changed, 7 insertions, 0 deletions
diff --git a/test/TEST-21-SYSUSERS/test-12.expected-group b/test/TEST-21-SYSUSERS/test-12.expected-group new file mode 100644 index 0000000000..5d94846ed1 --- /dev/null +++ b/test/TEST-21-SYSUSERS/test-12.expected-group @@ -0,0 +1,2 @@ +root:x:0: +systemd-coredump:x:1: diff --git a/test/TEST-21-SYSUSERS/test-12.expected-passwd b/test/TEST-21-SYSUSERS/test-12.expected-passwd new file mode 100644 index 0000000000..75fe9b420d --- /dev/null +++ b/test/TEST-21-SYSUSERS/test-12.expected-passwd @@ -0,0 +1,2 @@ +root:x:0:0:root:/root:/bin/bash +systemd-coredump:x:1:1:systemd Core Dumper:/:/sbin/nologin diff --git a/test/TEST-21-SYSUSERS/test-12.initial-group b/test/TEST-21-SYSUSERS/test-12.initial-group new file mode 100644 index 0000000000..1dbf9013ee --- /dev/null +++ b/test/TEST-21-SYSUSERS/test-12.initial-group @@ -0,0 +1 @@ +root:x:0: diff --git a/test/TEST-21-SYSUSERS/test-12.initial-passwd b/test/TEST-21-SYSUSERS/test-12.initial-passwd new file mode 100644 index 0000000000..aebc4923f4 --- /dev/null +++ b/test/TEST-21-SYSUSERS/test-12.initial-passwd @@ -0,0 +1 @@ +root:x:0:0:root:/root:/bin/bash diff --git a/test/TEST-21-SYSUSERS/test-12.input b/test/TEST-21-SYSUSERS/test-12.input new file mode 100644 index 0000000000..2913120276 --- /dev/null +++ b/test/TEST-21-SYSUSERS/test-12.input @@ -0,0 +1 @@ +u systemd-coredump 1 "systemd Core Dumper" |