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
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
613bddf7d1
commit
80359410c4
@@ -0,0 +1,2 @@
|
||||
root:x:0:
|
||||
systemd-coredump:x:1:
|
||||
@@ -0,0 +1,2 @@
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
systemd-coredump:x:1:1:systemd Core Dumper:/:/sbin/nologin
|
||||
@@ -0,0 +1 @@
|
||||
root:x:0:
|
||||
@@ -0,0 +1 @@
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
@@ -0,0 +1 @@
|
||||
u systemd-coredump 1 "systemd Core Dumper"
|
||||
Reference in New Issue
Block a user