projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b007560
)
Avoid passing NULL to underlying fprintf() in sysusers (#20974)
author
(GalaxyMaster)
<galaxy4public@users.noreply.github.com>
Mon, 11 Oct 2021 05:03:15 +0000
(16:03 +1100)
committer
GitHub
<noreply@github.com>
Mon, 11 Oct 2021 05:03:15 +0000
(14:03 +0900)
src/sysusers/sysusers.c
patch
|
blob
|
history
diff --git
a/src/sysusers/sysusers.c
b/src/sysusers/sysusers.c
index c55f7f8b7eebc742b3f220696cebe00707572e09..fafdef1706b1f685ddbbda6dd41d47c68adfcae4 100644
(file)
--- a/
src/sysusers/sysusers.c
+++ b/
src/sysusers/sysusers.c
@@
-444,7
+444,7
@@
static int write_temporary_passwd(const char *passwd_path, FILE **tmpfile, char
.pw_name = i->name,
.pw_uid = i->uid,
.pw_gid = i->gid,
- .pw_gecos =
i->description
,
+ .pw_gecos =
(char*) strempty(i->description)
,
/* "x" means the password is stored in the shadow file */
.pw_passwd = (char*) PASSWORD_SEE_SHADOW,