sys_security return value

From: Serge E. Hallyn (hallynat_private)
Date: Tue Nov 06 2001 - 15:42:14 PST

  • Next message: richard offer: "Re: sys_security return value"

    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?
    
    thanks,
    -serge
    
    (This is off the bitkeeper tree as cloned last thurs, which was the 2.4.13
    kernel.)
    
    _______________________________________________
    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:43:45 PST