sektioneins / SUIDGuard

SUIDGuard - a TrustedBSD Kernel Extension that adds mitigations to protect SUID/SGID processes a bit more
390 stars 52 forks source link

Fix warnings and check for error return codes #3

Closed clemensg closed 9 years ago

clemensg commented 9 years ago

Hi,

I added the sys/systm.h include, otherwise the compiler complains about printf, etc. Also, you did always return 0 in suidguard_cred_label_update_execve although a return variable called error existed. Finally, I added a check for macpolicy(un)register's return values and return KERN_SUCCESS only if they return 0.

Anyway, nice work!

Cheers, Clemens

Signed-off-by: Clemens Gruber clemensgru@gmail.com

stefanesser commented 9 years ago

Will not be merged because returning always 0 from suidguard_cred_label_update_execve is by intention.

clemensg commented 9 years ago

I don't see why you would intentionally return 0 in an out of memory condition. Care to explain?

Also this was not the only change. Can you strip the parts you don't want or should I update the PR?