pwc
[Top] [All Lists]

[pwc] Cannot compile module (modpost error)

To: <>
Subject: [pwc] Cannot compile module (modpost error)
From: "nitesh" <>
Date: Tue, 10 Nov 2009 16:59:54 +0530

Sir this is our program”#include <linux/kernel.h>

#include <linux/init.h>

#include <linux/module.h>

#include <linux/security.h>

static int test2_mkdir (struct inode *dir,

    struct dentry *dentry, int mode)

{

  printk (KERN_INFO "Got call for mkdir in inode %ld "

        "to mkdir %s with mode %d\n", dir->i_ino,

        (dentry->d_name).name, mode);

  return 0;

}/* Use the capability functions for some of the hooks */

 

static struct security_operations test2_sec_ops = {

 

  .inode_mkdir = test2_mkdir

};

 

static int __init test2_init (void)

{

  /* register ourselves with the security framework */

 

if (register_security (&test2_sec_ops)) {

printk (KERN_INFO"Failure registering Test 2 module with the kernel\n");

 return -EINVAL;

}

  printk (KERN_INFO "Test2 module initialized");

  return 0;

}

 

static void __exit test2_exit (void)

{

  printk (KERN_INFO "Test2 unregistered\n");

}

 

module_init (test2_init);

module_exit (test2_exit);

 

MODULE_LICENSE("GPL");”

 

 

While executing this program I got a following error mainly”register_security is undefined

But I have included the header  file”#include <linux/security.h>”then what may be the reason.

  1. do I want to check for the security.c file,then what would be the procedure
  2. what may be the other reasons,please clear this doubt

 

please guide me

_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU