Blame SOURCES/glibc-rh1505492-prototypes-putXent.patch
|
|
25845f |
Introduce prototype-style definitions for putgrent, putpwent. Upstream,
|
|
|
25845f |
this was done as part of this commit (not backported here):
|
|
|
25845f |
|
|
|
25845f |
commit 676599b36a92f3c201c5682ee7a5caddd9f370a4
|
|
|
25845f |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
25845f |
Date: Fri Oct 2 11:34:13 2015 +0200
|
|
|
25845f |
|
|
|
25845f |
Harden putpwent, putgrent, putspent, putspent against injection [BZ #18724]
|
|
|
25845f |
|
|
|
25845f |
diff --git a/grp/putgrent.c b/grp/putgrent.c
|
|
|
25845f |
index 176a7a15d8bb6ec2..1d69136c30c81bcd 100644
|
|
|
25845f |
--- a/grp/putgrent.c
|
|
|
25845f |
+++ b/grp/putgrent.c
|
|
|
25845f |
@@ -27,9 +27,7 @@
|
|
|
25845f |
/* Write an entry to the given stream.
|
|
|
25845f |
This must know the format of the group file. */
|
|
|
25845f |
int
|
|
|
25845f |
-putgrent (gr, stream)
|
|
|
25845f |
- const struct group *gr;
|
|
|
25845f |
- FILE *stream;
|
|
|
25845f |
+putgrent (const struct group *gr, FILE *stream)
|
|
|
25845f |
{
|
|
|
25845f |
int retval;
|
|
|
25845f |
|
|
|
25845f |
diff --git a/pwd/putpwent.c b/pwd/putpwent.c
|
|
|
25845f |
index e9470ed1012a1789..9a9f04dcf4b596ee 100644
|
|
|
25845f |
--- a/pwd/putpwent.c
|
|
|
25845f |
+++ b/pwd/putpwent.c
|
|
|
25845f |
@@ -24,9 +24,7 @@
|
|
|
25845f |
/* Write an entry to the given stream.
|
|
|
25845f |
This must know the format of the password file. */
|
|
|
25845f |
int
|
|
|
25845f |
-putpwent (p, stream)
|
|
|
25845f |
- const struct passwd *p;
|
|
|
25845f |
- FILE *stream;
|
|
|
25845f |
+putpwent (const struct passwd *p, FILE *stream)
|
|
|
25845f |
{
|
|
|
25845f |
if (p == NULL || stream == NULL)
|
|
|
25845f |
{
|