6b45dda5a8
- 0002-rpcinfo_warmstart-no_warning_about_missing_file.patch: fix merge issue causing segfaults on missing file (bnc#909619). OBS-URL: https://build.opensuse.org/request/show/265025 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=52
27 lines
778 B
Diff
27 lines
778 B
Diff
From: Thorsten Kukuk <kukuk@suse.com>
|
|
Subject: rpcinfo: warmstart - no warning about missing file
|
|
|
|
Don't print an error message on warmstart if the
|
|
startup files don't exist.
|
|
|
|
---
|
|
src/warmstart.c | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
--- a/src/warmstart.c
|
|
+++ b/src/warmstart.c
|
|
@@ -106,9 +106,10 @@ read_struct(char *filename, xdrproc_t st
|
|
fprintf(stderr, "rpcbind: using '%s' startup file\n", filename);
|
|
|
|
if ((fp = fopen(filename, "r")) == NULL) {
|
|
- syslog(LOG_ERR,
|
|
- "Cannot open '%s' file for reading, errno %d (%s)",
|
|
- filename, errno, strerror(errno));
|
|
+ if (errno != ENOENT)
|
|
+ syslog(LOG_ERR,
|
|
+ "Cannot open '%s' file for reading, errno %d (%s)",
|
|
+ filename, errno, strerror(errno));
|
|
goto error;
|
|
}
|
|
|