From 88fd7d0b93e20dca13ce51eb3556da6c6dd4d580 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 23 Dec 2009 13:29:54 +0000 Subject: [PATCH] Shout less about system call hooks when using keyrings When keyrings are in use, the user doesn't really care whether or not we manage to hook the system call table, and the current message has proved confusing, as it seems to indicate something has gone wrong. Tone down the warning that's produced when keyrings are in use. This is 1.4.x only, as we're going to completely disable system call probes when keyrings are in use in 1.5.x FIXES 125215 Change-Id: I60bbe852d11f2f0c9546b30c877f5ff27d05e7fb Reviewed-on: http://gerrit.openafs.org/1024 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/LINUX/osi_probe.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c index 727000417..ad9b5164c 100644 --- a/src/afs/LINUX/osi_probe.c +++ b/src/afs/LINUX/osi_probe.c @@ -1447,15 +1447,23 @@ void *osi_find_syscall_table(int which) } answer = do_find_syscall_table(P, &method); if (!answer) { +#if !defined(LINUX_KEYRING_SUPPORT) printk("Warning: failed to find address of %s\n", P->desc); printk("System call hooks will not be installed; proceeding anyway\n"); +#else + printk("Using keyrings, rather than hooking system calls\n"); +#endif return 0; } printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method); #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV) if (!check_access((unsigned long)answer, 1)) { +#if !defined(LINUX_KEYRING_SUPPORT) printk("Address 0x%lx is not writable.\n", (unsigned long)answer); printk("System call hooks will not be installed; proceeding anyway\n"); +#else + printk("Using keyrings, rather than hooking system calls\n"); +#endif return 0; } #endif -- 2.39.5