]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Shout less about system call hooks when using keyrings
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 23 Dec 2009 13:29:54 +0000 (13:29 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 23 Dec 2009 14:37:51 +0000 (06:37 -0800)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_probe.c

index 727000417ecc321ae9a5f7b858a16040682364ff..ad9b5164c25ead5c6ca4a6b1947a8893dadc11ab 100644 (file)
@@ -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