Blame nfs-utils-1.0.8-privports.patch
|
|
7060f16 |
--- nfs-utils-1.0.8/utils/statd/statd.c.orig 2005-12-19 23:12:47.000000000 -0500
|
|
|
7060f16 |
+++ nfs-utils-1.0.8/utils/statd/statd.c 2006-06-30 10:03:38.000000000 -0400
|
|
|
7060f16 |
@@ -231,7 +231,7 @@ int main (int argc, char **argv)
|
|
|
7060f16 |
extern char *optarg;
|
|
|
7060f16 |
int pid;
|
|
|
7060f16 |
int arg;
|
|
|
7060f16 |
- int port = 0, out_port = 0;
|
|
|
7060f16 |
+ int port = 0, out_port = 0, doonce = 0;
|
|
|
7060f16 |
struct rlimit rlim;
|
|
|
7060f16 |
|
|
|
7060f16 |
int pipefds[2] = { -1, -1};
|
|
|
7060f16 |
@@ -440,7 +440,6 @@ int main (int argc, char **argv)
|
|
|
7060f16 |
|
|
|
7060f16 |
create_pidfile();
|
|
|
7060f16 |
atexit(truncate_pidfile);
|
|
|
7060f16 |
- drop_privs();
|
|
|
7060f16 |
|
|
|
7060f16 |
for (;;) {
|
|
|
7060f16 |
if (!(run_mode & MODE_NOTIFY_ONLY)) {
|
|
|
7060f16 |
@@ -469,6 +468,8 @@ int main (int argc, char **argv)
|
|
|
7060f16 |
if (!(run_mode & MODE_NOTIFY_ONLY)) {
|
|
|
7060f16 |
rpc_init("statd", SM_PROG, SM_VERS, sm_prog_1, port);
|
|
|
7060f16 |
}
|
|
|
7060f16 |
+ if (doonce++ < 1)
|
|
|
7060f16 |
+ drop_privs();
|
|
|
7060f16 |
|
|
|
7060f16 |
/*
|
|
|
7060f16 |
* Handle incoming requests: SM_NOTIFY socket requests, as
|