Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 485834
Collapse All | Expand All

(-)src/probes/unix/FileProbe.cpp.old (-12 / +1 lines)
Lines 427-445 Link Here
427
	   5) If a file doesn't have an ACL, or it matches the standard UNIX permissions, the value will be 'false' (this is covered by acl_extended_file() - thank you openscap)
427
	   5) If a file doesn't have an ACL, or it matches the standard UNIX permissions, the value will be 'false' (this is covered by acl_extended_file() - thank you openscap)
428
	   6) If a file has an ACL, the value will be 'true'.
428
	   6) If a file has an ACL, the value will be 'true'.
429
	*/
429
	*/
430
	
431
	int hasExtendedAcl = acl_extended_file(filePath.c_str());
432
	if(hasExtendedAcl > -1){ // behavior 4, 5, and 6
433
          item->AppendElement(new ItemEntity("has_extended_acl",Common::ToString(hasExtendedAcl),OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_EXISTS,0));
434
	}else{
435
	  if(errno == EOPNOTSUPP){ // behavior 3
436
	    item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_DOES_NOT_EXIST,0));
437
          }else{ // behavior 2
438
	    item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_ERROR,0));
439
            item->AppendMessage(new OvalMessage(string("Error reading ACL data: ") + strerror(errno)));
440
          }
441
	}
442
430
431
	item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
443
# else
432
# else
444
	// behavior 1
433
	// behavior 1
445
	item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
434
	item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));

Return to bug 485834