]> git.pld-linux.org Git - packages/nfs-utils.git/blob - nfs-utils-privports.patch
- fixed subsys lock
[packages/nfs-utils.git] / nfs-utils-privports.patch
1 --- nfs-utils-1.0.8/utils/statd/statd.c.orig    2005-12-19 23:12:47.000000000 -0500
2 +++ nfs-utils-1.0.8/utils/statd/statd.c 2006-06-30 10:03:38.000000000 -0400
3 @@ -231,7 +231,7 @@ int main (int argc, char **argv)
4         extern char *optarg;
5         int pid;
6         int arg;
7 -       int port = 0, out_port = 0;
8 +       int port = 0, out_port = 0, doonce = 0;
9         struct rlimit rlim;
10  
11         int pipefds[2] = { -1, -1};
12 @@ -440,7 +440,6 @@ int main (int argc, char **argv)
13  
14         create_pidfile();
15         atexit(truncate_pidfile);
16 -       drop_privs();
17  
18         for (;;) {
19                 if (!(run_mode & MODE_NOTIFY_ONLY)) {
20 @@ -469,6 +468,8 @@ int main (int argc, char **argv)
21                 if (!(run_mode & MODE_NOTIFY_ONLY)) {
22                         rpc_init("statd", SM_PROG, SM_VERS, sm_prog_1, port);
23                 } 
24 +               if (doonce++ < 1)
25 +                       drop_privs();
26  
27                 /*
28                  * Handle incoming requests:  SM_NOTIFY socket requests, as
This page took 0.029951 seconds and 3 git commands to generate.