[lkml]   [2005]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectLSM hook addition?
    Hash: SHA1

    Can someone point me to documentation or give me a small patch to add an
    LSM hook to kernel 2.6.10 in fs/namei.c at line 1986:

    new_dentry = lookup_create(&nd, 0);
    error = PTR_ERR(new_dentry);
    if (!IS_ERR(new_dentry)) {
    error = security_inode_make_hardlink(old_nd); // ADD
    error = vfs_link(old_nd.dentry, nd.dentry->d_inode,

    I believe this would be sufficient to finish an LSM module to implement
    linking restrictions from GrSecurity. I did Symlinks in an LSM module,
    but haven't tested it out; it's purely academic. I guess adding an LSM
    hook would be an interesting academic experience; I'd enjoy examining a
    patch that adds this hook, and then trying to add another hook myself.

    The hook here would be used (in my academic exploration) to prevent hard
    links from being created to files you don't own, unless you're root.

    - --
    All content of all messages exchanged herein are left in the
    Public Domain, unless otherwise explicitly stated.

    Version: GnuPG v1.4.0 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird -

    -----END PGP SIGNATURE-----
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:09    [W:0.022 / U:144.896 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site