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

Diff of /monit/validate.c

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

revision 1.68 by martinp, Wed Aug 6 14:51:13 2003 UTC revision 1.69 by martinp, Mon Aug 11 23:30:54 2003 UTC
# Line 327  static int check_directory(Service_T s) Line 327  static int check_directory(Service_T s)
327            s->name, stat_buf.st_mode&07777);            s->name, stat_buf.st_mode&07777);
328    }    }
329    
330    if(s->uid != -1) {    if(s->uid) {
331      if( (int)stat_buf.st_uid != s->uid ) {      if( (int)stat_buf.st_uid != s->uid->uid ) {
332        Event_post(s, EVENT_UID,        Event_post(s, EVENT_UID,
333                   "Event: '%s' uid test failed -- "                   "Event: '%s' uid test failed -- "
334                   "current uid: %d\n",                   "current uid: %d\n",
# Line 339  static int check_directory(Service_T s) Line 339  static int check_directory(Service_T s)
339            s->name, (int)stat_buf.st_uid);            s->name, (int)stat_buf.st_uid);
340    }    }
341    
342    if(s->gid != -1) {    if(s->gid) {
343      if( (int)stat_buf.st_gid != s->gid ) {      if( (int)stat_buf.st_gid != s->gid->gid ) {
344        Event_post(s, EVENT_GID,        Event_post(s, EVENT_GID,
345                   "Event: '%s' gid test failed -- "                   "Event: '%s' gid test failed -- "
346                   "current gid: %d\n",                   "current gid: %d\n",
# Line 388  static int check_file(Service_T s) { Line 388  static int check_file(Service_T s) {
388            s->name, stat_buf.st_mode&07777);            s->name, stat_buf.st_mode&07777);
389    }    }
390    
391    if(s->uid != -1) {    if(s->uid) {
392      if( (int)stat_buf.st_uid != s->uid ) {      if( (int)stat_buf.st_uid != s->uid->uid ) {
393        Event_post(s, EVENT_UID,        Event_post(s, EVENT_UID,
394                   "Event: '%s' uid test failed -- "                   "Event: '%s' uid test failed -- "
395                   "current uid: %d\n",                   "current uid: %d\n",
# Line 400  static int check_file(Service_T s) { Line 400  static int check_file(Service_T s) {
400            s->name, (int)stat_buf.st_uid);            s->name, (int)stat_buf.st_uid);
401    }    }
402    
403    if(s->gid != -1) {    if(s->gid) {
404      if( (int)stat_buf.st_gid != s->gid ) {      if( (int)stat_buf.st_gid != s->gid->gid ) {
405        Event_post(s, EVENT_GID,        Event_post(s, EVENT_GID,
406                   "Event: '%s' gid test failed -- "                   "Event: '%s' gid test failed -- "
407                   "current gid: %d\n",                   "current gid: %d\n",
# Line 455  static int check_device(Service_T s) { Line 455  static int check_device(Service_T s) {
455            s->name, stat_buf.st_mode&07777);            s->name, stat_buf.st_mode&07777);
456    }    }
457    
458    if(s->uid != -1) {    if(s->uid) {
459      if( (int)stat_buf.st_uid != s->uid ) {      if( (int)stat_buf.st_uid != s->uid->uid ) {
460        Event_post(s, EVENT_UID,        Event_post(s, EVENT_UID,
461                   "Event: '%s' uid test failed -- "                   "Event: '%s' uid test failed -- "
462                   "current uid: %d\n",                   "current uid: %d\n",
# Line 467  static int check_device(Service_T s) { Line 467  static int check_device(Service_T s) {
467            s->name, (int)stat_buf.st_uid);            s->name, (int)stat_buf.st_uid);
468    }    }
469    
470    if(s->gid != -1) {    if(s->gid) {
471      if( (int)stat_buf.st_gid != s->gid ) {      if( (int)stat_buf.st_gid != s->gid->gid ) {
472        Event_post(s, EVENT_GID,        Event_post(s, EVENT_GID,
473                   "Event: '%s' gid test failed -- "                   "Event: '%s' gid test failed -- "
474                   "current gid: %d\n",                   "current gid: %d\n",

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

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