| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
* trans/mtab.c (get_credentials): Fix error handling.
(mtab_populate): Fix type.
(trivfs_S_io_seek): Avoid implicit fallthrough warnings.
|
|
|
|
|
| |
* trans/Makefile (fsysServer-CFLAGS): Use default server stubs.
* trans/symlink.c: Remove all the fsys stubs.
|
|
|
|
|
| |
* startup/startup.c (reboot_mach): Do not retry needlessly if
host_reboot fails.
|
|
|
|
|
|
| |
* libnetfs/file-get-children.c (netfs_S_file_get_children): Drop
redundant type checks.
* libnetfs/file-get-source.c (netfs_S_file_get_source): Likewise.
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/diskfs.h (diskfs_begin_using_control_port): Check port class.
* libdiskfs/fsys-getfile.c (diskfs_S_fsys_getfile): Drop check.
* libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Likewise.
* libdiskfs/fsys-goaway.c (diskfs_S_fsys_goaway): Likewise.
* libdiskfs/fsys-options.c (diskfs_S_fsys_{s,g}et_options): Likewise.
* libdiskfs/fsys-syncfs.c (diskfs_S_fsys_syncfs): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/boot-start.c (bootinfo): New variable.
(diskfs_start_bootstrap): Create 'bootinfo' as an instance of
'diskfs_control_class'.
(diskfs_S_fsys_getpriv): Only allow operation on 'bootinfo'.
(diskfs_S_fsys_init): Allow operation on any control object, but only
once.
* libdiskfs/diskfs.h (diskfs_initboot_class): Drop declaration.
* libdiskfs/init-init.c (diskfs_initboot_class): Drop variable.
(diskfs_init_diskfs): Adapt.
|
|
|
|
|
| |
* eth-multiplexer/device_impl.c (ds_device_open): Check the port
class.
|
|
|
|
|
| |
* ext2fs/ext2fs.h: Add missing declarations needed when inlining is
disabled.
|
|
|
|
|
|
|
|
|
| |
* console/display.c: Drop 'register'.
* eth-multiplexer/dev_stat.c: Likewise.
* libbpf/bpf_impl.c: Likewise.
* libbpf/queue.c: Likewise.
* libports/manage-multithread.c: Likewise.
* libports/manage-one-thread.c: Likewise.
|
|
|
|
|
|
|
|
|
| |
* eth-multiplexer/device_impl.c (ds_device_write): Deny writes when
interface is down.
* eth-multiplexer/vdev.c (add_vdev): Initialize flags to
a sane value.
(broadcast_pack): Skip interfaces that are down.
(broadcast_msg): Likewise.
|
|
|
|
|
|
|
|
| |
* eth-multiplexer/dev_stat.c (wants_all_multi_p): New function.
(vdev_setstat): Likewise.
* eth-multiplexer/device_impl.c (ds_device_set_status): Use new
function.
* eth-multiplexer/vdev.h (vdev_setstat): New declaration.
|
|
|
|
|
|
|
|
| |
* eth-multiplexer/ethernet.c (set_promisc): Rename to
'eth_set_clear_flags' and generalize.
(ethernet_open): Adapt call site.
(ethernet_close): Likewise.
* eth-multiplexer/ethernet.h (eth_set_clear_flags): New declaration.
|
|
|
|
| |
* eth-multiplexer/ethernet.c (NET_FLAGS): Drop macro.
|
|
|
|
|
| |
* eth-multiplexer/dev_stat.c (dev_getstat): Implement the NET_FLAGS
flavor.
|
|
|
|
|
| |
* eth-multiplexer/device_impl.c (ds_device_write): Do not deallocate
data, it is destroyed by the server loop ("consume-on-success").
|
|
|
|
| |
* startup/startup.c (main): Improve error handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libshouldbeinlibc/wire.c (statically_linked): New function.
(loaded): Remove check.
(wire_segment_internal): Fix error handling. Be smarter about the
wiring, inspired by the mach-defpager code.
(wire_segment): Fix error handling.
(wire_task_self): Fix error handling. Distinguish between static
binaries and dynamic binaries without DT_DEBUG or link map. When we
don't have a map, fall back to wiring the whole space. Wire future
allocations.
* libshouldbeinlibc/wire.h (wire_task_self): Return error_t.
(wire_segment): Likewise.
|
|
|
|
|
| |
* startup/startup.c: Give the privileged ports to the glibc so that
other code can get them.
|
|
|
|
| |
* ext2fs/xattr.c (ext2_set_xattr): Initialize 'block'.
|
|
|
|
|
| |
* libdiskfs/init-init.c (diskfs_init_diskfs): First try /dev/time,
then fall back to the Mach device.
|
|
|
|
|
| |
* Makeconf: Use '#' instead of '/' in the sed command to avoid
clashing with the path separator '/'.
|
|
|
|
|
|
|
|
|
|
|
| |
* boot/boot.c: Replace bcopy with memcpy or memmove as appropriate.
* exec/hashexec.c: Likewise.
* libps/proclist.c: Likewise, but also fix the amount of data copied.
* libps/procstat.c: Likewise.
* libps/spec.c: Likewise.
* libshouldbeinlibc/cacheq.c: Likewise.
* libshouldbeinlibc/idvec.c: Likewise.
* libshouldbeinlibc/timefmt.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
free (NULL) is a nop, therefore it is not necessary to check that
first. Simplify the code accordingly. This commit is the result of
the following semantic patch:
@@
identifier X;
@@
-if (X) free (X);
+free (X);
* console-client/console.c: Simplify accordingly.
* console-client/driver.c: Likewise.
* console-client/vga.c: Likewise.
* ftpfs/dir.c: Likewise.
* libftpconn/unix.c: Likewise.
* libps/fmt.c: Likewise.
* libps/proclist.c: Likewise.
* libstore/mvol.c: Likewise.
* nfs/ops.c: Likewise.
* proc/host.c: Likewise.
* sutils/fstab.c: Likewise.
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_hostinfo): New function.
(rootdir_entries): New entry 'hostinfo'.
|
|
|
|
|
| |
* trans/new-fifo.c (main): Fix indentation.
* utils/rpctrace.c (discover_receive_right): Likewise.
|
|
|
|
| |
* ext2fs/truncate.c (force_delayed_copies): Fix typo.
|
|
|
|
| |
* config.make.in (HAVE_BLKID, HAVE_DAEMON): Drop variable.
|
|
|
|
|
|
| |
This reverts commit a4f5b76390f1c7b377efbac488b57fa6756da80a.
This broke existing configurations (Debian and Guix), more investigation
seems to be needed for Arch.
|
|
|
|
|
| |
* libshouldbeinlibc/assert-backtrace.h: Include 'sys/cdefs.h' for
'__STRING'.
|
|
|
|
|
| |
* trans/fakeroot.c (netfs_S_dir_lookup): Do not follow symlinks if the
client used O_NOFOLLOW.
|
|
|
|
|
|
|
| |
* console-client/Makefile (install): Prepend $(prefix) to install
target.
* console-client/Makefile ($(XKB_BASE)/%): Rename target to
$(prefix)$(XKB_BASE)/%.
|
|
|
|
|
|
|
| |
This causes random.d to be generated which makes random.o depend on
mach_debug_U.h, ensuring it exists before random.c is compiled.
* trans/Makefile: Add random.c to SRCS when gcrypt is used.
|
|
|
|
|
| |
* ext2fs/xattr.c (ext2_free_xattr_block): Only warn about missing ext2fs
support in debugging mode.
|
|
|
|
|
|
|
|
|
| |
Fixes baf7e5c8ce176aead15c2559952d8bdf0da41ffd.
* hurd/process.defs (proc_getmsgport): Make 'msgport' parameter
polymorphic only on the sender side.
(proc_task2proc): Likewise for 'proc'.
(proc_pid2proc): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only build the random translator if we find a suitable version of
libgcrypt. This helps to reduce the build dependencies to bootstrap
the Hurd.
* aclocal.m4: Include 'libgcrypt.m4'.
* config.make.in (HAVE_LIBGCRYPT): New variable.
* configure.ac: Check for a suitable libgcrypt.
* m4/libgcrypt.m4: New file.
* trans/Makefile: Conditionally build the random translator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the Hurd included a translator providing /dev/random and
/dev/urandom based on a source copy of the random number generator
found in classic GnuPG.
The new random translator is using the SHAKE128 algorithm from the
SHA-3 family as the underlying cryptographic primitive. Being a
sponge construction, it allows the extraction of arbitrary amounts of
pseudorandom data. It is continuously fed entropy by hashing system
state that is hard to predict.
* Makefile (prog-subdirs): Remove 'random'.
* NEWS: Update.
* random/Makefile: Delete file.
* random/TODO: Likewise.
* random/gnupg-bithelp.h: Likewise.
* random/gnupg-glue.h: Likewise.
* random/gnupg-random.c: Likewise.
* random/gnupg-random.h: Likewise.
* random/gnupg-rmd.h: Likewise.
* random/gnupg-rmd160.c: Likewise.
* random/random.h: Likewise.
* sutils/MAKEDEV.sh (random): Create node.
(urandom): The new translator is both secure and non-blocking. Create
a link from urandom to random for compatibility with Linux.
* trans/Makefile (targets): Add 'random'.
* trans/random.c: Move the skeleton of the old random translator here,
but replace the PRNG with SHAKE128. Remove all dubious attempts of
accounting for entropy. Do not block ever.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_vmstat): Remove superfluous 'host_info'
calls.
|
|
|
|
|
| |
* ext2fs/xattr.c (ext2_list_xattr, ext2_get_xattr): Only warn about
missing ext2fs support in debugging mode.
|
|
|
|
| |
* eth-multiplexer/Makefile (HURDLIBS): Add iohelp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the early server bootstrap relied upon a specific task
layout to determine the kernels task port. Explicitly pass it from
the kernel instead.
* boot/boot.c (default_boot_script): Add '--kernel-task' parameter to
ext2fs.
(main): New bootscript variable 'kernel-task'.
* libdiskfs/boot-start.c (diskfs_kernel_task): Declaration variable.
(diskfs_start_bootstrap): If '--kernel-task' was given to us, pass it
along to startup.
* libdiskfs/opts-std-startup.c (diskfs_kernel_task): New variable.
(startup_options): Add '--kernel-task' option.
(parse_startup_opt): Handle option.
* proc/main.c (kernel_task): New variable.
(OPT_KERNEL_TASK): New macro.
(options): New variable.
(parse_opt): New function.
(main): Parse options. Use 'kernel_task' if provided.
* release/servers.boot: Add '--kernel-task' parameter to ext2fs.
* startup/startup.c (OPT_KERNEL_TASK): New macro.
(options): Add '--kernel-task' option.
(kernel_task): New variable.
(insert_ports_fnc_t): New declaration.
(run): Add argument for a function that inserts rights into the newly
created task and adds arguments to the argument vector.
(argz_task_insert_right): New function.
(proc_insert_ports): Likewise.
(parse_opt): New function.
(main): Pass the kernel's task port to proc.
(frob_kernel_process): Use the kernel's task port.
|
|
|
|
|
|
| |
* startup/startup.c (launch_core_servers): Instead of copying a send
right and then deallocating it, move it.
(init_stdarrays): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a Subhurd's tasks were shown as weird processes in the
Motherhurd. This change connects the proc server in the Motherhurd
with the proc server in the Subhurd, embedding the Subhurd's process
hierarchy. Subhurd's processes can now be inspected and debugged like
any other process.
* NEWS: Update.
* boot/boot.c (mach_msg_forward): New function.
(boot_demuxer): Forward messages arriving on the new task notification
port from the proc server, and forward them to the proc server inside
the Subhurd via the notification port.
* proc/info.c (S_proc_task2proc): Relay request for processes in a task
namespace to the Subhurd's proc server.
(S_proc_pid2proc): Likewise.
(S_proc_getprocargs): Likewise.
(S_proc_getprocenv): Likewise.
(S_proc_getprocinfo): Likewise. Translate PIDs.
(S_proc_getloginid): Likewise.
(S_proc_getloginpids): Likewise.
* proc/mgt.c (namespace_is_subprocess): New function.
(namespace_translate_pids): Likewise.
* proc/msg.c (S_proc_getmsgport): Relay request for processes in a task
namespace to the Subhurd's proc server.
* proc/pgrp.c (S_proc_getsid): Likewise. Translate PIDs.
(S_proc_getsessionpids): Likewise.
(S_proc_getsessionpgids): Likewise.
(S_proc_getpgrppids): Likewise.
* proc/proc.h (namespace_is_subprocess): New prototype.
(namespace_translate_pids): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the RPC definitions of two procedures of the process
subsystem assume that the rights are created from a receive right.
Similarly, 'proc_getmsgport' assumes that the right is to be copied.
This needlessly limits the ability to relay the RPC in server code.
This fixes this. The protocol is unchanged, only the generated server
stubs assume an additional parameter for the type.
* hurd/process.defs (proc_getmsgport): Make 'msgport' parameter
polymorphic.
(proc_task2proc): Make 'proc' parameter polymorphic.
(proc_pid2proc): Likewise.
* hurd/process_reply.defs (proc_getmsgport): Likewise.
(proc_task2proc_reply): Likewise.
(proc_pid2proc_reply): Likewise.
* proc/info.c (S_proc_task2proc): Adapt server function.
(S_proc_pid2proc): Likewise.
* proc/msg.c (S_proc_getmsgport): Likewise.
|
|
|
|
|
|
| |
* proc/mgt.c (namespace_find_root): New function.
(process_has_exited): Use new function.
* proc/proc.h (namespace_find_root): New declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there was a spurious copy of PID 1 in the process table,
usually PID 8. PID 1, usually a sysvinit compatible process, needs to
be PID 1 even though it is not actually the first process on the Hurd.
To this end, PID 1 is reserved, and the task is later supplied to proc
via proc_set_init_task once startup starts sysvinit.
Fixes 8d16db0cc28b2d911aee918d5c3582ad29ddfeed.
* proc/mgt.c (S_proc_set_init_task): Check if sysvinit's task already
made it into the process table, and remove it if so.
|
|
|
|
|
| |
* boot/boot.c (new_task_notification): Move declaration to the top,
add comment.
|
|
|
|
|
|
|
| |
* proc/main.c (main): Initialize 'kernel_proc' and use it to register
for new-task notifications.
* proc/mgt.c (S_mach_notify_new_task): Adapt receiver check.
* proc/proc.h (kernel_proc): New variable.
|
|
|
|
|
|
|
|
| |
This way, we can print diagnostics earlier.
* proc/main.c (open_console): New function.
(main): Call the new function as soon as we have the master device
port.
|
|
|
|
|
|
|
|
| |
While this does not hurt immediately, callers of ports_interrupt_rpcs
would themselves get canceled at the next cancelation point.
* libports/interrupt-rpcs.c (ports_interrupt_rpcs): Do not call
cancel ourself.
|