rpcbind/0002-rpcinfo_warmstart-no_warning_about_missing_file.patch
Ismail Dönmez 6b45dda5a8 Accepting request 265025 from home:jeff_mahoney:branches:network
- 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
2014-12-12 18:57:32 +00:00

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;
}