diff options
author | Roy Marples <roy@marples.name> | 2007-08-22 14:10:46 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-08-22 14:10:46 +0000 |
commit | 1ef8a7f04160675e414027f4e9fd382875edafa3 (patch) | |
tree | 6f6f4ee2e21f2b94c7f66adba90df8c3bf33a440 /src | |
parent | 25d46c0e963a273e6f2cf097a05a2c24e63251ff (diff) |
Only open /proc/cmdline if it exists, #189686 thanks to Christian Affolter
Diffstat (limited to 'src')
-rw-r--r-- | src/rc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -378,7 +378,10 @@ static char *proc_getent (const char *ent) char *p; char *value = NULL; int i; - + + if (! rc_exists ("/proc/cmdline")) + return (NULL); + if (! (fp = fopen ("/proc/cmdline", "r"))) { eerror ("failed to open `/proc/cmdline': %s", strerror (errno)); return (NULL); |