Re: issetugid() for other procs



On Sun, 7 Oct 2007 21:04:02 +0300
Kostik Belousov <kostikbel@xxxxxxxxx> wrote:

On Sun, Oct 07, 2007 at 12:28:05PM -0500, Zane C.B. wrote:
On Sun, 07 Oct 2007 18:25:57 +0200
Jan M?nther <jan.muenther@xxxxxxxxx> wrote:

man getuid, man geteuid.

This does work for other procs, only the one that is calling it.

Like I said initially I am looking to check if another proc has
run setuid, seteuid, or been executed or forked by one that has.

Note that what you trying to do is racy by definition.

Why is that? It seems like something that be useful instead of
something taboo. My interest in it is I am writing a database
connector interested in making it paranoid as possible.

To get the value of issetugid() for some other process, as it
_could_ be returned at some moment in a time, you shall check the
P_SUGID bit of the p_flag from the corresponding struct proc. This
is available by the kvm_getprocs(3) interface in the ki_flag field
of the kinfo_proc structure, see corresponding man page.

Awesome, I will begin investigating this.
_______________________________________________
freebsd-security@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to "freebsd-security-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Re: where to release proc.p_stats
    ... I didn't notice the UMA_ZONE_NOFREE flag of proc_zone, so proc items will not be recycled. ... So we can saving many time from filling pages with zero, if some process just want read from them. ... >> struct proc so we don't have to allocate and free it at all. ... >> The main reason I didn't make this change earlier was to maintain binary ...
    (freebsd-current)
  • Re: Re: where to release proc.p_stats
    ... I didn't notice the UMA_ZONE_NOFREE flag of proc_zone, so proc items will not be recycled. ... So we can saving many time from filling pages with zero, if some process just want read from them. ... >> struct proc so we don't have to allocate and free it at all. ... >> The main reason I didn't make this change earlier was to maintain binary ...
    (freebsd-hackers)
  • Re: issetugid() for other procs
    ... This does work for other procs, only the one that is calling it. ... Like I said initially I am looking to check if another proc has run ... of the p_flag from the corresponding struct proc. ... the kvm_getprocsinterface in the ki_flag field of the kinfo_proc ...
    (FreeBSD-Security)
  • SQL Task Error in proc not detected?
    ... I have a package calling a stored proc PROC1, ... proc PROC2, ...
    (microsoft.public.sqlserver.dts)
  • Re: Using output variables
    ... The problem lies in the Web page that calling ... DECLARE @permission int ... EXEC GetPermissions @PID,@UserID,@permission OUTPUT ... > I have the Page calling the stored proc and the proc ...
    (microsoft.public.sqlserver.programming)