lkml.org 
[lkml]   [2003]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Prevent setting 32 uids/gids in the error range
From
Date
On Mon, 2003-02-17 at 07:41, Rusty Russell wrote:
> Tridge noticed that getegid() was returning EPERM.
>
> I used -1000 since that's what PTR_ERR uses, but i386 _syscall macros
> use -125: I don't suppose it really matters.

Thats a bug in the interface. getegid/getgid/setegid/setuid() is not permitted to fail.
If libc is setting errno and returning -1 the libc wrapper is wrong.

set*id can fail, but unlike the get functions they do not return a uid but an error code.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.063 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site