/[monit]/monit/env.c
ViewVC logotype

Diff of /monit/env.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by martinp, Tue Feb 11 21:27:39 2003 UTC revision 1.15 by hauk, Thu Jun 26 14:24:11 2003 UTC
# Line 140  static void set_sandbox(void) { Line 140  static void set_sandbox(void) {
140            
141      if(fstat(i, &st) == -1 && open("/dev/null", O_RDWR) != i) {      if(fstat(i, &st) == -1 && open("/dev/null", O_RDWR) != i) {
142                
143        error("Cannot open /dev/null -- %s\n", STRERROR);        log("Cannot open /dev/null -- %s\n", STRERROR);
144        exit(1);        exit(1);
145                
146      }      }
# Line 168  static void set_sandbox(void) { Line 168  static void set_sandbox(void) {
168        
169    if(putenv(path)) {    if(putenv(path)) {
170            
171      error("%s: cannot set the PATH variable -- %s\n", prog, STRERROR);      log("%s: cannot set the PATH variable -- %s\n", prog, STRERROR);
172      exit(1);      exit(1);
173            
174    }    }
# Line 187  static void set_environment(void) { Line 187  static void set_environment(void) {
187    /* Get password struct */    /* Get password struct */
188    if ( ! (pw= getpwuid(geteuid())) ) {    if ( ! (pw= getpwuid(geteuid())) ) {
189            
190      error("%s: You don't exist. Go away.\n", prog);      log("%s: You don't exist. Go away.\n", prog);
191      exit(1);      exit(1);
192            
193    }    }
# Line 195  static void set_environment(void) { Line 195  static void set_environment(void) {
195    /* Get CWD */    /* Get CWD */
196    if ( ! (getcwd(cwd, sizeof(cwd))) ) {    if ( ! (getcwd(cwd, sizeof(cwd))) ) {
197            
198      error("%s: Cannot read current directory -- %s\n", prog, STRERROR);      log("%s: Cannot read current directory -- %s\n", prog, STRERROR);
199      exit(1);      exit(1);
200            
201    }    }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26