Re: sys_security return value

From: richard offer (offerat_private)
Date: Tue Nov 06 2001 - 15:48:29 PST

  • Next message: Chris Wright: "Re: sys_security return value"

    * frm hallynat_private "11/06/2001 06:42:14 PM -0500" | sed '1,$s/^/* /'
    *
    * Having a strange problem here with the lsm_sys_security call's return
    * value. When I use the dummy module, the lsm sycall returns -1.  As a
    * simple example, I used:
    * 
    *# include <stdio.h>
    *# include <errno.h>
    *# include <unistd.h>
    *# define __NR_lsm 223
    *# include <asm/unistd.h>
    * 
    * _syscall3(long, lsm, int, id, int, what, void *, data);
    * int main(int argc, char **argv)
    * {
    * 	long ret;
    * 
    * 	ret = lsm(110,3,0);
    * 	printf("tryme: lsm call returned %ld.\n", ret)
    * }
    * 
    * and tweaked security.c:sys_security to intercept the return value from the
    * security_ops->sys_security() call.  The value returned from this call is
    * in fact -38 as it should be, but the above code reports the returned
    * value was -1.  Am I missing something obvious?
    
    Take a look in errno, -38 should be there.
    
    * 
    * thanks,
    * -serge
    
    richard.
    
    -- 
    -----------------------------------------------------------------------
    Richard Offer                     Technical Lead, Trust Technology, SGI
    "Specialization is for insects"
    ___________________________________________On sabatical Nov 8 -> Nov 30
    
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Tue Nov 06 2001 - 15:49:48 PST