Commit Graph

22 Commits

Author SHA1 Message Date
Michael Kerrisk c13182efa3 Wrapped long lines, wrapped at sentence boundaries; stripped trailing
white space.
2007-04-12 22:42:49 +00:00
Michael Kerrisk cf0a9ace57 ffix 2007-04-05 12:36:57 +00:00
Michael Kerrisk f6cfd01694 Elimitae duplicated text; grfix 2006-11-26 22:10:20 +00:00
Michael Kerrisk fe247268a9 The PR_SET_NAME setting is not preserved across an execve(). 2006-09-13 14:08:11 +00:00
Michael Kerrisk 8106981956 s/SUID/set-user-ID/
s/SGID/set-group-ID/
2006-09-06 15:23:31 +00:00
Michael Kerrisk 80a34ae3aa Added list of process attributes that are not preserved on exec(). 2006-09-04 12:27:37 +00:00
Michael Kerrisk ef0b81712f wfix/tfix 2006-09-04 08:57:04 +00:00
Michael Kerrisk a7fadb5558 Updated CONFOMRING TOs and/or standards references. 2006-08-04 12:39:17 +00:00
Michael Kerrisk 97c1eac86f Updated CONFORMING TO section 2006-08-03 13:57:17 +00:00
Michael Kerrisk 07b501d1b9 Add text noting that effective IDs are copied to
saved set-IDs during execve().
2006-07-22 17:24:17 +00:00
Michael Kerrisk aa949e2d59 environ.5 --> environ.7 2006-04-21 00:45:46 +00:00
Michael Kerrisk 9d7f3355ef Added SEE ALSO pointing to new fexecve.3. 2006-03-07 02:20:16 +00:00
Michael Kerrisk 7fdcdf23b2 ffix 2006-03-06 04:40:24 +00:00
Michael Kerrisk 4989c2f337 Improved description of E2BIG error: it relates to the sum
of the bytes in both environment and argument list.
2005-11-08 15:25:07 +00:00
Michael Kerrisk 1e32103455 Formatting fixes 2005-10-20 15:11:10 +00:00
Michael Kerrisk d3777ff056 Formatting fix 2005-10-19 13:51:36 +00:00
Michael Kerrisk 63aa9df02f Automated unformatting of parentheses using unformat_parens.sh 2005-10-19 07:07:02 +00:00
Michael Kerrisk b14d4aa5b8 Classical BSD versions are now always named x.yBSD (formerly
there was a mix of x.yBSD and BSD x.y).
2005-07-18 15:05:56 +00:00
Michael Kerrisk 880f5b4bc3 Consistent use of "set-user-ID" and "set-group-ID". 2005-07-18 14:25:42 +00:00
Michael Kerrisk 6aacaf94e5 Hi Andries,
> The question came up whether execve of a suid binary while being ptraced
> would fail or ignore the suid part. The answer today seems to be the
> latter:
> 
> E.g. (in 2.6.11) security/dummy.c:
> 
> static void dummy_bprm_apply_creds (struct linux_binprm *bprm, int 
> unsafe)
> {
>         if (bprm->e_uid != current->uid || bprm->e_gid != current->gid) {
>                 if ((unsafe & ~LSM_UNSAFE_PTRACE_CAP) &&
> !capable(CAP_SETUID)) {
>                         bprm->e_uid = current->uid;
>                         bprm->e_gid = current->gid;
>                 }
>         }
> }
> 
> and fs/exec.c:
> 
> void compute_creds(struct linux_binprm *bprm) {
>         int unsafe;
> 
>         unsafe = unsafe_exec(current);
>         security_bprm_apply_creds(bprm, unsafe);
> }
> 
> static inline int unsafe_exec(struct task_struct *p) {
>         int unsafe = 0;
>         if (p->ptrace & PT_PTRACED) {
>                 if (p->ptrace & PT_PTRACE_CAP)
>                         unsafe |= LSM_UNSAFE_PTRACE_CAP;
>                 else
>                         unsafe |= LSM_UNSAFE_PTRACE;
>         }
>         return unsafe;
> }
> 
> That is: if the process that calls execve() is being traced,
> the LSM_UNSAFE_PTRACE bit is et in unsafe and security_bprm_apply_creds()
> will make sure the suid/sgid bits are ignored.
> 
> ---
> 
> In my man page I do not read anything like that. It says
> 
>  EPERM  The process is being traced, the user is not the  superuser and
>         the file has an SUID or SGID bit set.
> and
> 
>  If  the current program is being ptraced, a SIGTRAP is sent to it after
>  a successful execve().
> 
>  If the set-uid bit is set on the program file pointed  to  by filename
>  the  effective user ID of the calling process is changed to that of the
>  owner of the program file.
> 
> So, maybe this sentence should be amended to read
> 
>  If the set-uid bit is set on the program file pointed  to  by filename
>  and the current process is not being ptraced, the  effective user ID
>  of the calling process is changed to ...

I changed your "current" to "calling" (to be consistent with the 
rest of the page), but otherwise applied as you suggest.

The revision will appear in man-pages-2.03, which I can release
any time now.  Are you avialable to do an upload tomorrow?
2005-05-31 16:07:24 +00:00
Michael Kerrisk 305a0578bf Global change of email address for MTK (now: mtk-manpages@gmx.net) 2004-11-03 14:43:40 +00:00
Michael Kerrisk fea681dafb Import of man-pages 1.70 2004-11-03 13:51:07 +00:00