--- src/rlocate-module/rlocate.c.orig	2008-01-26 13:32:57.000000000 +0200
+++ src/rlocate-module/rlocate.c	2008-01-26 13:35:08.000000000 +0200
@@ -1042,10 +1042,12 @@
 no_exclude_dir_arg:
         kfree(path_buffer); 
 no_path_buffer:
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24)
         if ( mod_register ) 
                 mod_unreg_security(DEVICE_NAME, &rlocate_security_ops);
         else
                 unregister_security(&rlocate_security_ops);
+#endif
 no_lsm:
         rlocate_dev_unregister();
 out:
@@ -1063,6 +1065,7 @@
         free_page( (unsigned long)STARTING_PATH_ARG);
         free_page( (unsigned long)EXCLUDE_DIR_ARG);
         kfree(path_buffer); 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24)
         if ( mod_register ) {
 		if (mod_unreg_security(DEVICE_NAME, &rlocate_security_ops)) 
                         printk(KERN_INFO "rlocate: failed to unregister "
@@ -1071,7 +1074,7 @@
 	} else if (unregister_security(&rlocate_security_ops)) 
                         printk(KERN_INFO "rlocate: failed to unregister "
 					 "rlocate security module.\n");
-        
+#endif  
         rlocate_dev_unregister();
   	printk(KERN_INFO "rlocate: unloaded\n");
 }