summaryrefslogtreecommitdiffstats
path: root/usr.bin/su
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2006-10-24 08:18:10 +0000
committersobomax <sobomax@FreeBSD.org>2006-10-24 08:18:10 +0000
commit1d06416b309668dcf3499b5368feedde76ba6b38 (patch)
treea3886e5b8398101900000ec65513da69065c55b5 /usr.bin/su
parentb55d55f173b0a5193f8bf205d9219eaca1b66373 (diff)
downloadFreeBSD-src-1d06416b309668dcf3499b5368feedde76ba6b38.zip
FreeBSD-src-1d06416b309668dcf3499b5368feedde76ba6b38.tar.gz
Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su on
system that don't have audit framefork compiled into kernel or ia32 binary on amd64 system will result in SIGSYS. There is one place in su.c itself where it tries to check for errno != ENOSYS, but it has been a nop since su does not catch SIGSYS anyway. There are few other places in libbsm, where attempt to invoke audit syscal would result in SIGSYS if no audit support is present in the kernel, so that the only reliable method for now is to disable SIGSYS completely in the case when BSM is compiled in. In the long run, both direct invocation of audit-related syscalls and libbsm should be made more intellegent to handle the case when BSM is not compiled into the kernel gracefully. MFC after: 3 days (provided re@ approval)
Diffstat (limited to 'usr.bin/su')
-rw-r--r--usr.bin/su/su.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c
index 76f76b6..73d012a 100644
--- a/usr.bin/su/su.c
+++ b/usr.bin/su/su.c
@@ -173,6 +173,8 @@ main(int argc, char *argv[])
#ifdef USE_BSM_AUDIT
const char *aerr;
au_id_t auid;
+
+ signal(SIGSYS, SIG_IGN);
#endif
shell = class = cleanenv = NULL;
OpenPOWER on IntegriCloud