Re: A few thoughts..

From: Peter Jeremy (PeterJeremy_at_optushome.com.au)
Date: 03/30/05

  • Next message: David Leimbach: "Re: organization"
    Date: Thu, 31 Mar 2005 04:42:25 +1000
    To: "H. S." <security@revolutionsp.com>
    
    

    On Wed, 2005-Mar-30 11:06:53 -0600, H. S. wrote:
    >As I stated previously, I'm not much of a C programmer, but I can do some
    >coding. I've been thinking into changing the core of the system a bit to
    >return errors if some information is accessed by a normal user.

    Wouldn't making /sbin and /usr/sbin mode 750 be enough?

    > I'd like
    >to know if getuid() would work that deep in the system?

    In general, system calls can't be used within the kernel. The uid and
    gid could be determined by directly dereferencing curproc or the
    thread pointer passed around in most kernel internal calls. Note that
    the only checks the (non-MAC) kernel currently does is "root" or
    "not-root" using suser(9) (apart from the checks in kill(2)).
    Restrictions for non-root users are implemented using file
    permissions.

    > And how can I register sysctl mibs in the kernel ?

    Look at sysctl(3), /sys/sys/sysctl.h and (eg) /sys/kern/subr_msgbuf.c

    -- 
    Peter Jeremy
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: David Leimbach: "Re: organization"

    Relevant Pages

    • Re: Announce: Linux-next (Or Andrews dream :-))
      ... And the rate of change in each major portion of the kernel (drivers, ... arch, core, network, etc) is exactly proportional to the amount of the ... and we also tried to simply even re-architect the whole tree so ... And we fix them up, ...
      (Linux-Kernel)
    • Re: WTF: Stack Size 4k
      ... > hell are those of us who use and love the SCSI boards based on the ... > kernel with the 8k stack size by choosing to not allow that as an option ... I, for one, see great folly in upgrading ANY datacenter to Fedora Core 2 ...
      (Fedora)
    • Re: SMP Kernel
      ... since the memory is shared between all the cores the Kernel can be ... invoked by any core receiving an interrupt and thus executed by that ... Are there an independent scheduler per cpu? ... To unsubscribe from this list: ...
      (Linux-Kernel)
    • Re: Is C close to the machine?
      ... If a mismatch in workloads is noticed, the pipeline may be repartitioned, generally by moving one kernel across threads. ... Thus, if core 0 has more work than core 1, C may move to core 1, resulting in partition,, ... You're going to have to worry about copying the data at least once and probably twice (data gets created, copied into buffer, data gets copied from buffer, data gets used). ... The overhead of coroutining is not the state save, its the loss of locality of the caching and prediction structures. ...
      (comp.arch)
    • Re: Processor type kernel option for Core Duo (not Core 2)
      ... >> I've got a Centrino Core Duo laptop; ... >> can't work out which processor type option to use for the kernel. ... the CPU type selection within the kernel configuration (make ... > hardware and the software support. ...
      (comp.os.linux.setup)