327 |
s->name, stat_buf.st_mode&07777); |
s->name, stat_buf.st_mode&07777); |
328 |
} |
} |
329 |
|
|
330 |
|
if(s->uid != -1) { |
331 |
|
if( (int)stat_buf.st_uid != s->uid ) { |
332 |
|
Event_post(s, EVENT_UID, |
333 |
|
"Event: '%s' uid test failed -- " |
334 |
|
"current uid: %d\n", |
335 |
|
s->name, (int)stat_buf.st_uid); |
336 |
|
return FALSE; |
337 |
|
} |
338 |
|
DEBUG("'%s' directory uid check passed [current uid=%d]\n", |
339 |
|
s->name, (int)stat_buf.st_uid); |
340 |
|
} |
341 |
|
|
342 |
|
if(s->gid != -1) { |
343 |
|
if( (int)stat_buf.st_gid != s->gid ) { |
344 |
|
Event_post(s, EVENT_GID, |
345 |
|
"Event: '%s' gid test failed -- " |
346 |
|
"current gid: %d\n", |
347 |
|
s->name, (int)stat_buf.st_gid); |
348 |
|
return FALSE; |
349 |
|
} |
350 |
|
DEBUG("'%s' directory gid check passed [current gid=%d]\n", |
351 |
|
s->name, (int)stat_buf.st_gid); |
352 |
|
} |
353 |
|
|
354 |
return TRUE; |
return TRUE; |
355 |
|
|
356 |
} |
} |
388 |
s->name, stat_buf.st_mode&07777); |
s->name, stat_buf.st_mode&07777); |
389 |
} |
} |
390 |
|
|
391 |
|
if(s->uid != -1) { |
392 |
|
if( (int)stat_buf.st_uid != s->uid ) { |
393 |
|
Event_post(s, EVENT_UID, |
394 |
|
"Event: '%s' uid test failed -- " |
395 |
|
"current uid: %d\n", |
396 |
|
s->name, (int)stat_buf.st_uid); |
397 |
|
return FALSE; |
398 |
|
} |
399 |
|
DEBUG("'%s' file uid check passed [current uid=%d]\n", |
400 |
|
s->name, (int)stat_buf.st_uid); |
401 |
|
} |
402 |
|
|
403 |
|
if(s->gid != -1) { |
404 |
|
if( (int)stat_buf.st_gid != s->gid ) { |
405 |
|
Event_post(s, EVENT_GID, |
406 |
|
"Event: '%s' gid test failed -- " |
407 |
|
"current gid: %d\n", |
408 |
|
s->name, (int)stat_buf.st_gid); |
409 |
|
return FALSE; |
410 |
|
} |
411 |
|
DEBUG("'%s' file gid check passed [current gid=%d]\n", |
412 |
|
s->name, (int)stat_buf.st_gid); |
413 |
|
} |
414 |
|
|
415 |
for(sl= s->sizelist; sl; sl= sl->next) { |
for(sl= s->sizelist; sl; sl= sl->next) { |
416 |
if(!check_size_item(s, sl, (unsigned long)stat_buf.st_size, report)) { |
if(!check_size_item(s, sl, (unsigned long)stat_buf.st_size, report)) { |
417 |
/* Turn on the object's event_flag to indicate that the size event |
/* Turn on the object's event_flag to indicate that the size event |
455 |
s->name, stat_buf.st_mode&07777); |
s->name, stat_buf.st_mode&07777); |
456 |
} |
} |
457 |
|
|
458 |
|
if(s->uid != -1) { |
459 |
|
if( (int)stat_buf.st_uid != s->uid ) { |
460 |
|
Event_post(s, EVENT_UID, |
461 |
|
"Event: '%s' uid test failed -- " |
462 |
|
"current uid: %d\n", |
463 |
|
s->name, (int)stat_buf.st_uid); |
464 |
|
return FALSE; |
465 |
|
} |
466 |
|
DEBUG("'%s' device uid check passed [current uid=%d]\n", |
467 |
|
s->name, (int)stat_buf.st_uid); |
468 |
|
} |
469 |
|
|
470 |
|
if(s->gid != -1) { |
471 |
|
if( (int)stat_buf.st_gid != s->gid ) { |
472 |
|
Event_post(s, EVENT_GID, |
473 |
|
"Event: '%s' gid test failed -- " |
474 |
|
"current gid: %d\n", |
475 |
|
s->name, (int)stat_buf.st_gid); |
476 |
|
return FALSE; |
477 |
|
} |
478 |
|
DEBUG("'%s' device gid check passed [current gid=%d]\n", |
479 |
|
s->name, (int)stat_buf.st_gid); |
480 |
|
} |
481 |
|
|
482 |
/* Test devices */ |
/* Test devices */ |
483 |
if(s->devicelist) { |
if(s->devicelist) { |
484 |
if(!DeviceInfo_Usage(s->devinfo, s->path)) { |
if(!DeviceInfo_Usage(s->devinfo, s->path)) { |