From: Steve Dickson <SteveD@redhat.com>
To: nfs@lists.sourceforge.net
Subject: [PATCH] nfs-utils 9 of 10 - Fixed some security issues found by SGI
Date: Fri, 23 Sep 2005 10:49:49 -0400 [thread overview]
Message-ID: <4334160D.6020705@RedHat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: nfs-utils-1.0.7-sgi-statd-fixes.patch --]
[-- Type: text/x-patch, Size: 1849 bytes --]
Fixed some security issues found by SGI (bz# 133556)
Details can be found in:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=133556
Signed-off-by: Steve Dickson <steved@redhat.com>
---------
--- nfs-utils-1.0.7/utils/statd/monitor.c.sgi 2004-09-14 23:08:01.000000000 -0400
+++ nfs-utils-1.0.7/utils/statd/monitor.c 2005-02-21 11:32:06.558972064 -0500
@@ -15,6 +15,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
+#include <errno.h>
#include <arpa/inet.h>
#include "misc.h"
#include "statd.h"
@@ -172,7 +173,7 @@ sm_mon_1_svc(struct mon *argp, struct sv
sprintf(path, "%s/%s", SM_DIR, mon_name);
if ((fd = open(path, O_WRONLY|O_SYNC|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
/* Didn't fly. We won't monitor. */
- note(N_ERROR, "creat(%s) failed: %m", path);
+ note(N_ERROR, "creat(%s) failed: %s", path, strerror (errno));
nlist_free(NULL, clnt);
free(path);
goto failure;
--- nfs-utils-1.0.7/utils/statd/statd.c.sgi 2004-12-05 20:25:27.000000000 -0500
+++ nfs-utils-1.0.7/utils/statd/statd.c 2005-02-21 11:32:06.561971608 -0500
@@ -194,8 +194,10 @@ static void drop_privs(void)
struct stat st;
if (stat(SM_DIR, &st) == -1 &&
- stat(DIR_BASE, &st) == -1)
+ stat(DIR_BASE, &st) == -1) {
st.st_uid = 0;
+ st.st_gid = 0;
+ }
if (st.st_uid == 0) {
note(N_WARNING, "statd running as root. chown %s to choose different user\n",
--- nfs-utils-1.0.7/utils/statd/svc_run.c.sgi 2004-12-05 20:25:28.000000000 -0500
+++ nfs-utils-1.0.7/utils/statd/svc_run.c 2005-02-21 11:32:06.562971456 -0500
@@ -123,7 +123,8 @@ my_svc_run(void)
if (errno == EINTR || errno == ECONNREFUSED
|| errno == ENETUNREACH || errno == EHOSTUNREACH)
continue;
- note(N_ERROR, "my_svc_run() - select: %m");
+ note(N_ERROR, "my_svc_run() - select: %s",
+ strerror (errno));
return;
case 0:
reply other threads:[~2005-09-23 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4334160D.6020705@RedHat.com \
--to=steved@redhat.com \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox