"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "q-7.11/modules/clib/givertcap/README" of archive q-7.11.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 GIVERTCAP
    2 =========
    3 
    4 NOTE: This utility is only needed on older Linux systems. If your system
    5 already has rtlimit or the realtime-lsm module then it is no longer necessary
    6 to patch your kernel, and you should use those facilities instead.
    7 
    8 This directory contains Tommi Ilmonen's givertcap utility which enables a
    9 program to enjoy realtime scheduling under Linux without having to be run as
   10 root. This is provided as a temporary workaround until the Linux file systems
   11 provide POSIX.1e capability support; once this is implemented this utility
   12 will no longer be necessary.
   13 
   14 Givertcap now comes bundled with the Q distribution for your convenience, but
   15 it is not installed by default. Installation instructions can be found below.
   16 
   17 Please note that you do not have to run givertcap yourself; once givertcap is
   18 installed, a givertcap-aware software (like the clib module) will invoke it
   19 automatically.
   20 
   21 You'll notice that I made some trivial cosmetic changes to the sources (watch
   22 out for -AG). The original sources of givertcap are available under the GPL
   23 from the following website:
   24 
   25 	http://www.tml.hut.fi/~tilmonen/givertcap/
   26 
   27 Please refer to this site for further information.
   28 
   29 KERNEL REQUIREMENTS
   30 ====== ============
   31 
   32 To make givertcap work, you'll need a recent kernel and the libcap library (I
   33 tested it with 2.4.19 on a SuSE 8.1 system). You also have to build a custom
   34 kernel with a patched version of /usr/src/linux/include/linux/capability.h. On
   35 my system the relevant lines in linux/capability.h look as follows:
   36 
   37 #define CAP_INIT_EFF_SET    to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
   38 #define CAP_INIT_INH_SET    to_cap_t(0)
   39 
   40 You'll have to change these to something like the following:
   41 
   42 #define CAP_INIT_EFF_SET    to_cap_t(~0)
   43 #define CAP_INIT_INH_SET    to_cap_t(~0)
   44 
   45 Rebuild the modified kernel and install it on your system. See your distro's
   46 manual on how to accomplish this. It goes without saying that you should only
   47 try this if you are a seasoned Linux hacker. If you messed up your system
   48 following these instructions, don't tell me. YOU HAVE BEEN WARNED. ;-)
   49 
   50 INSTALLATION
   51 ============
   52 
   53 THIS PROGRAM IS FOR LINUX ONLY! You can compile and install the program on
   54 your system as follows:
   55 
   56 $ make; make install
   57 
   58 This requires that you have the libcap library on your system. The program
   59 will be installed under /usr/local/bin. The installed program will be owned by
   60 user root, group users, will have the setuid bit set, and will be executable
   61 by owner and group, but not by others.
   62 
   63 You can uninstall the program as follows:
   64 
   65 $ make uninstall
   66 
   67 Please note that the givertcap program *NEEDS TO BE SETUID ROOT* to make it
   68 work. As with all setuid programs, this is a *POTENTIAL SECURITY RISK*. If you
   69 are concerned about security, you might want to set up a special "rtusers"
   70 group on your system and change the group ownership of givertcap accordingly:
   71 
   72 $ chgrp rtusers /usr/local/bin/givertcap
   73 
   74 This way only users in the rtusers group will be able to execute the program.
   75 
   76 If you want to rename givertcap or move it to another directory, you need to
   77 specify the full path in an environment variable, like so:
   78 
   79 $ export GIVERTCAP=/some/path/here/givertcap
   80 
   81 
   82 Good luck!
   83 March 2003, Albert Graef
   84 ag@muwiinfa.geschichte.uni-mainz.de