Age | Commit message (Collapse) | Author |
|
Keep track of active translators and handle fsys_get_children
requests.
* libnetfs/Makefile (FSYSSRCS): Add fsys-get-children.c.
* libnetfs/dead-name.c (ports_dead_name): Remove dead translators.
* libnetfs/file-set-translator.c (netfs_S_file_set_translator): Register
active translators.
* libnetfs/fsys-get-children.c: New file.
|
|
Keep track of active translators and handle fsys_get_children
requests.
* libdiskfs/Makefile (FSYSSRCS): Add fsys-get-children.c.
* libdiskfs/dead-name.c (ports_dead_name): Remove dead translators.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Register
active translators.
* libdiskfs/fsys-get-children.c: New file.
|
|
Add functions that maintain a list of active translators.
* libfshelp/translator-list.c: New file.
* libfshelp/fshelp.h: Add function declarations.
* libfshelp/Makefile: Add translator-list.c, link against libihash.
|
|
Track the relative path used to obtain a file handle in the
struct peropen.
* libnetfs/netfs.h (struct peropen): New field path.
* libnetfs/make-peropen.c (netfs_make_peropen): Initialize path.
* libnetfs/release-peropen.c (netfs_release_peropen): Free path.
* libnetfs/fsys-getroot.c (netfs_S_fsys_getroot): Initialize path.
* libnetfs/dir-lookup.c (netfs_S_dir_lookup): Preserve the path.
|
|
Track the relative path used to obtain a file handle in the
struct peropen.
* libdiskfs/diskfs.h (struct peropen): New field path.
* libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path.
* libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path.
* libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Initialize path.
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Preserve the path.
|
|
Add a macro HURD_IHASH_ITERATE_ITEMS that iterates over all elements
in the hash table making both the key and the value available.
* libihash/ihash.h (HURD_IHASH_ITERATE_ITEMS): New macro.
|
|
* proc/proc.h (zombie_list): Remove declaration.
|
|
* proc/exc-reply.defs: Delete file.
|
|
Keep track of the range where executable segments are mapped into
memory and hand that information over to the proc server.
* exec/priv.h (struct execdata): Add {start,end}_code.
* exec/exec.c (prepare): Initialize {start,end}_code.
(load_section): Update {start,end}_code.
(do_exec): Use proc_set_code to hand {start,end}_code to the proc server.
|
|
Add routines to set and query the processes start_code and end_code
locations. Any executable segments loaded from the ELF binary are in
this range.
* hurd/process.defs: Add proc_{get,set}_code.
* hurd/process_reply.defs: Add proc_{get,set}_code.
* hurd/process_request.defs: Add proc_{get,set}_code_request.
|
|
Any executable segments loaded from the ELF binary are in this range.
* proc/proc.h (struct proc): Add {start,end}_code.
* proc/mgt.h (S_proc_set_code): New function.
* proc/mgt.h (S_proc_get_code): New function.
|
|
* utils/Makefile (mount-LDLIBS): Define to libblkid_LIBS instead of
libblkid-LIBS
(mount-CPPFLAGS): Likewise.
|
|
Use libblkid to detect the filesystem type if "auto" is given as
type. Remove the translator localization from main, this is also done
in do_mount and any errors are propagated properly. This way "auto" is
handled correctly if given on the command line or used as filesystem
type in the fstab.
* configure.ac: Add check for libblkid.
* config.make.in: Make libblkid specific values available.
* utils/Makefile: Use libblkid specific values.
* utils/mount.c (DEFAULT_FSTYPE): Use "auto" as default type.
(do_mount): Detect type using libblkid.
(main): Drop translator localization.
|
|
* utils/umount.c: Do not include useless <blkid/blkid.h>.
|
|
Register any symlink translators running as root as important
processes at the proc server.
* trans/symlink.c (main): Mark us as important.
|
|
Register any mach-defpager translators running as root as
important processes at the proc server.
* mach-defpager/main.c (main): Mark us as important.
|
|
Register libtrivfs-based translators running as root as important
processes at the proc server.
* libtrivfs/startup.c (trivfs_startup): Mark us as important.
|
|
Register libnetfs-based translators running as root as important
processes at the proc server.
* libnetfs/init-startup.c (netfs_startup): Mark us as important.
|
|
Register libdiskfs-based translators running as root as important
processes at the proc server.
* libdiskfs/init-startup.c (_diskfs_init_completed): Mark us as important.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* init/init.c (launch_core_servers): Mark init, auth, proc and fs
servers as important.
(start_child): Mark the real init as important.
(S_startup_important_task): Mark exec server as important.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* hurd/process.defs (proc_mark_important): New routine definitions.
* hurd/process_reply.defs (proc_mark_important_request): Likewise.
* hurd/process_request.defs (proc_mark_important_request): Likewise.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* proc/proc.h (struct proc): Add p_important field.
* proc/pgrp.c (S_proc_getpgrppids): Exclude important system processes.
(S_proc_mark_important): New function.
* proc/mgt.c (create_startup_proc): Mark init as important.
|
|
Make the function check_owner available for use in other files.
* proc/info.c (check_owner): Drop attributes static and inline.
* proc/proc.h (check_owner): Add prototype.
|
|
* hurd/process.defs: Reserve RPC ID for proc_set_init_task.
* hurd/process_reply.defs: Likewise.
* hurd/process_request.defs: Likewise.
|
|
|
|
|
|
This adds a umount utility that implements most of the functions that
the Linux umount utility provides, especially that subset that is used
by the Debian package initscripts.
* utils/umount.c: New file.
|
|
Handle dead-name notifications the same way libdiskfs does. In fact,
dead-name.c is a verbatim copy with trivial modifications. It clears
np->sockaddr if the dead name notification was for that port.
* libnetfs/dead-name.c: New file.
* libnetfs/Makefile (OTHERSRCS): Add dead-name.c.
|
|
This is a trivially adapted version of libdiskfs/file-get-transcntl.c.
* libnetfs/file-get-transcntl.c: New file.
|
|
Only run setsid(2) if the process is not already the group leader.
* daemons/console-run.c (open_console): Fix setsid(2).
|
|
Add the appropriate simpleroutine or skip directives to
hurd/process_reply.defs matching the ones in hurd/process.defs.
* hurd/process_reply.defs: Add missing routine declarations.
|
|
This commit removes the parts of the exec server that were once using
the Binary File Descriptor library.
As I understand it, the BFD code stopped working because it uses stdio
streams and the glue code for that has never been ported to libio. The
code has been #ifdefed out ever since. It may or may not work in its
current state, so it is removed. If someone is interested, it can
always be recovered from the version control system.
* exec/exec.c: Remove all BFD related code.
* exec/priv.h: Likewise.
* TODO: Remove the corresponding item.
|
|
This code was meant to allow the user to specify alternative exec
servers using an environment variable. The Hurd uses the file system
as namespace for server lookups, so the proper way to use one's own
exec server seems to be the remap translator.
* exec/exec.c (S_exec_exec): Remove unused code.
|
|
* exec/Makefile (SRCS): Remove gzip and bzip2 sources.
(OBJS): Remove gzip and bzip2 objects.
|
|
* exec/Makefile (CPPFLAGS): Do not define GZIP and BZIP2 macros.
|
|
nullauth drops all authentication credentials and runs the given
program. This is also useful to drop privileges on behalf of
translators that do not need any credentials in some circumstances,
e.g.
% settrans -ap /hurd/nullauth -- /hurd/storeio -Tzero
makes storeio run without any credentials.
* utils/nullauth.c: New file.
* utils/Makefile: Build nullauth.
|
|
* tmpfs/tmpfs.c (main): Drop privileges.
|
|
* trans/null.c (main): Drop privileges.
|
|
setnullauth () obtains an empty authentication handle and uses it for
further authentication purposes. This effectively drops all Unix
privileges.
* libshouldbeinlibc/nullauth.c: New file.
* libshouldbeinlibc/nullauth.h: Likewise.
* libshouldbeinlibc/Makefile: Add nullauth.{c,h}.
|
|
This patch adds daemonizing support using libdaemon.
* console-client/console.c (daemonize): New variable.
(options): Add --daemonize argument.
(parse_opt): Handle --daemonize argument.
(daemon_error): New error(3) like macro.
(main): Daemonize.
* console-client/Makefile: Use libdaemon specific build flags.
|
|
* configure.ac: Add check for libdaemon.
* config.make.in: Make the libdaemon specific variables available.
|
|
* include/pids.h: New file.
* init/init.c (frob_kernel_process): Use symbolic name for kernel process.
* exec/exec.c (S_exec_init): Use symbolic name for startup process.
* libdiskfs/boot-start.c (diskfs_S_fsys_init): Likewise.
* libdiskfs/init-startup.c (_diskfs_init_completed): Likewise.
* pfinet/main.c (arrange_shutdown_notification): Likewise.
* proc/mgt.c (create_startup_proc): Likewise.
* proc/main.c (main): Use symbolic name for proc process.
|
|
* libnetfs/file-get-translator.c (netfs_S_file_get_translator): Call memcpy
instead of memmove.
|
|
Properly respond to file_get_translator requests for nodes with a
passive translator record.
* libnetfs/file-get-translator.c (netfs_S_file_get_translator): Handle
passive translator records.
|
|
This adds a umount utility that implements most of the functions that
the Linux umount utility provides, especially that subset that is used
by the Debian package initscripts.
* utils/umount.c: New file.
|
|
The mount utility on both Linux and FreeBSD allows one to either
specify a whitelist or a blacklist of filesystem types to consider for
--all. Prefixing the list with "no" indicates that the list is a
blacklist. Furthermore, Linux' mount utility ignores a "no" prefix on
any entry in the given list.
Previously the Hurd variant first applied whitelist containing all
positive values given and then filtered the resulting list using all
negative values. But this makes little sense because each entry only
has one value for the filesystem type (mnt_type) and all values are
mutually exclusive.
This patch adjusts the fstab handling code so that our mount utility
behaves like the Linux mount utility. This code is used by both mount
and fsck. The same argumentation applies to fsck as well.
Like implemented in Linux mount, any "no" prefix is ignored to retain
compatibility with the old behavior.
* sutils/fstab.c (fstab_argp_create): Fix semantic of --types.
|
|
Previously it was not possible to add two mount entries with the same
device information to an fstab structure. This is easily fixed by
breaking the assumption, that there is only one possible mount entry
for the "none" device as used by many purely virtual file systems.
* utils/fstab.c (fstab_find_device): Return NULL if name is "none".
|
|
Linux' mount utility ignores mounted filesystems if mount --all is
invoked. This patch makes our mount do the same.
utils/mount.c (main): Ignore mounted filesystems if --all is given.
|
|
--test-opts in combination with --all mounts only those filesystems
with options matching the given set of options.
Note that the semantic of the inverting "no" prefix differs from
--types: While --types=nonfs,ufs means neither nfs nor ufs,
--test-opts=nofoo,bar means not foo, but bar.
* utils/match-options.h: New file.
* utils/match-options.c: Likewise.
(test_opts): New variable.
(test_opts_len): Likewise.
(match_options): New function.
* utils/mount.c (parse_opt): Handle -O, --test-opts.
(main): Use match_options as filter.
|
|
Add -f and --fake arguments. This makes our mount more compatible with
Linux mount.
* utils/mount.c (argp_opts): Add -f and --fake.
(do_mount): Fake the translator startup if --fake is given.
|