aboutsummaryrefslogtreecommitdiff
path: root/utils/shd.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix leaking auth portsSamuel Thibault2022-01-041-1/+4
| | | | | | | | | | | We need to be extremely careful with auth ports since leaking them into subprocesses may expose a root-auth port to non-root processes. Notably, get_nonsugid_ids was caching it, thus preventing glibc's exec implementation from dropping it. Login is also reimplementing hurdexec but without all the cloexec logic. This commit fixes various auth leaks.
* Use the new _hurd_exec_file_name functionEmilio Pozuelo Monfort2018-01-081-3/+6
| | | | | | | | | * configure.in: Check for _hurd_exec_paths. * utils/fakeauth.c: Call _hurd_exec_paths instead of _hurd_exec if it's available. * utils/shd.c: Likewise. * utils/rpctrace.c: Get prefixed_name from file_name_path_lookup and pass it to _hurd_exec_paths instead of calling _hurd_exec.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-4/+4
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* fix compiler warnings in hurd/utilsFlavio Cruz2015-12-291-1/+2
| | | | | | | | | | | | | | | | | | utils: Fix compiler warnings. * utils/rpcscan.c (setup_extract_target): Remove name variable. * utils/rpcscan.c (setup_extract_target): Fix bad initializer. * utils/rpctrace.c (new_send_wrapper, wrap_all_threads, wrap_new_thread, wrap_new_task, traced_spawn): Fix format strings. * utils/rpctrace.c (trace_and_forward): Cast to unsigned int. * utils/rpctrace.c (trace_and_forward): Use memcmp instead of pointer dereferencing to compare structures. * utils/rpctrace.c (wrap_all_threads): Cast to vm_address_t. * utils/rpctrace.c (main): Fix bad initializer. * utils/shd.c (run): Initialize save0. * utils/vminfo.c: Fix format strings. * utils/vmstat.c: Remove PSEP macro and expand the code. * utils/w.c (add_utmp_procs): Remove unused pos variable.
* Add missing format strings for error, printk, problemPino Toscano2011-10-191-1/+1
| | | | | | | | | | | | | | | | | | | Some calls to `error', `printk', and `problem' lacked a format string, leading to build failure when compiling with stricter CFLAGS. * nfs/mount.c (mount_root): Add format string for `error' calls which lacked it. * pfinet/main.c (pfinet_bind): Likewise. * term/main.c (main): Likewise. * utils/shd.c (run): Likewise. * utils/storeinfo.c (main): Likewise. * pfinet/linux-src/include/net/tcp.h (tcp_clear_xmit_timer): Add format string for `printk' call which lacked it. (tcp_timer_is_set): Likewise. * ufs-fsck/utilities.c (punt): Add format string for `problem' call which lacked it.
* 2002-05-03 Roland McGrath <roland@frob.com>Roland McGrath2002-05-031-0/+1
| | | | * shd.c: Include <error.h> for `error' decl.
* 2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>Neal H. Walfield2002-03-261-27/+32
| | | | | | | | * rpctrace.c (parse_msgid_list): Use ERR, not errno. * shd.c (reap): Use error, not perror. (command): Likewise. (main): Likewise. (run): Use error, not perror. Use ERR, not errno.
* 2002-01-02 Roland McGrath <roland@frob.com>Roland McGrath2002-01-021-2/+6
| | | | | | * rpctrace.c (traced_spawn) [KERN_INVALID_LEDGER]: Pass extra arguments to task_create for OSF variant. * shd.c (run): Likewise.
* 1999-04-25 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-04-251-12/+10
| | | | * shd.c (run): Print child's PID when pausing before exec.
* (run): Remove assignments from inside if tests.Michael I. Bushnell1995-07-071-4/+8
| | | | (command): Likewise.
* (reap): Check for ECHILD, not ESRCH.Michael I. Bushnell1995-05-021-2/+2
|
* (main): Only open /dev/tty if stdin is unreadable.Roland McGrath1995-01-281-9/+10
|
* entered into RCSMichael I. Bushnell1994-08-301-1/+1
|
* Formerly sh.c.~2~Roland McGrath1994-08-221-0/+10
|
* Initial revisionMichael I. Bushnell1994-07-211-0/+366