- struct path path;
- if (kern_path(pathname, 0, &path)) {
- printk(KERN_CRIT "Path lookup failed for %s",pathname);
- }
- else {
- unsigned int ino = path.dentry->d_inode->i_ino;
- struct acl_entry *entry;
- entry = kmalloc(GFP_KERNEL, sizeof(struct acl_entry));
- entry->ino = ino;
-
- if (!entry) {
- printk(KERN_CRIT "Could not allocate memory for %s",pathname);
- }
- else {
- if (run_acl(ino)) {
- hlist_add_head_rcu(&entry->hlist,&procprotect_hash[ino&(HASH_SIZE-1)]);
- printk(KERN_CRIT "Added inode %u",ino);
- }
- else {
- printk(KERN_CRIT "Did not add inode %u, already in list", ino);
- }
- }
- }
-
- if (!once_only) {
- once_only=1;
- if (init_probes()==-1)
- printk(KERN_CRIT "Could not install procprotect probes. Reload module to retry.");
+ struct path path;
+ if (kern_path(pathname, 0, &path)) {
+ printk(KERN_CRIT "Path lookup failed for %s",pathname);
+ }
+ else {
+ unsigned int ino = path.dentry->d_inode->i_ino;
+ struct acl_entry *entry;
+ entry = kmalloc(GFP_KERNEL, sizeof(struct acl_entry));
+ entry->ino = ino;
+
+ if (!entry) {
+ printk(KERN_CRIT "Could not allocate memory for %s",pathname);
+ }
+ else {
+ if (run_acl(ino)) {
+ hlist_add_head_rcu(&entry->hlist,&procprotect_hash[ino&(HASH_SIZE-1)]);
+ printk(KERN_CRIT "Added inode %u",ino);
+ }
+ else {
+ printk(KERN_CRIT "Did not add inode %u, already in list", ino);
+ }
+ }