inode_permission problem (lsm)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, i'm trying to use a very simple function to print when inode_permission is called:

line_number    code
--------------------------------------------

53    static int smac_inode_permission (struct inode *inode, int mask, struct nameidata *nd)
54    {
55        if (nd)
56        {
57            if (nd->dentry)
58                printk(KERN_INFO "inode_permission on: %s\n", nd->dentry->d_name.name);
59        }
60        return 0;
61    }


I get the following errors when compiling:

enigma linux # make modules
  CHK     include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/asm-i386/asm_offsets.h
  CC [M]  security/smac.o
security/smac.c: In function `smac_inode_permission':
security/smac.c:57: error: dereferencing pointer to incomplete type
security/smac.c:58: error: dereferencing pointer to incomplete type
make[1]: *** [security/smac.o] Error 1
make: *** [security] Error 2

If i delete "nd->entry" it works. It looks like nd is not populated. Do i have to populate it with some function?
My kernel is a vanilla 2.6.9

thanks.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux