| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* hurd/paths.h (_HURD_MTAB): New macro.
* procfs/rootdir.c (rootdir_mounts_get_translator): Use the new macro.
(rootdir_mounts_exists): Likewise.
|
|
|
|
| |
* procfs/process.c (process_stat_make_node): Fix typo in comment.
|
|
|
|
|
|
|
| |
Fixes https://savannah.gnu.org/bugs/?15806 .
* trans/hello-mt.c (trivfs_append_args): Escape contents.
* trans/hello.c (trivfs_append_args): Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
Make the memory_object parameter of default_pager_object_create
polymorphic. This fixes https://savannah.gnu.org/bugs/?26751 .
* hurd/default_pager.defs (default_pager_object_create): Make
memory_object parameter polymorphic.
* mach-defpager/default_pager.c (S_default_pager_object_create):
Adjust accordingly.
* trans/proxy-defpager.c (S_default_pager_object_create): Likewise.
|
|
|
|
|
| |
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Pass retry_name to
dir_lookup, which is later checked to be the empty string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/refcount.h (refcount_init): There must be at least one
reference at initialization time.
(refcounts_init): Likewise.
(refcount_unsafe_ref): New function retaining the previous
functionality of refcount_ref. It is occasionally useful to raise the
reference count again after it dropped to zero.
(refcounts_unsafe_ref): Likewise.
(refcounts_unsafe_weak_ref): Likewise.
(refcount_ref): Detect use-after-free errors.
(refcounts_ref): Likewise.
(refcounts_ref_weak): Likewise.
* libtrivfs/protid-clean.c (trivfs_clean_protid): Use refcount_unsafe_ref.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When first introduced as fsys_get_children, it made sense to return
the list of children using paths relative to the root of the
filesystem that was queried. Making the get_children method part of
the fsys protocol was a mistake that has since been corrected in
9366d6b2.
Instead of returning paths relative to the root of the translator,
return paths relative to the path of the receiving node.
This fixes a problem with the mtab translator. Previously, the mtab
translator invoked on a target that was not the root directory of a
translator would compute invalid paths, e.g.:
/hurd/mtab: /any/path/servers/socket/26 No such file or directory
* hurd/fs.defs (file_get_children): Update comment.
* libfshelp/translator-list.c (fshelp_get_active_translators): Add
argument PREFIX. Filter entries not beginning with PREFIX if
non-NULL, and omit PREFIX from the returned paths.
* libfshelp/fshelp.h (fshelp_get_active_translators): Update comment
accordingly. Also clarify that both FILTER and PREFIX can be NULL.
* libdiskfs/file-get-children.c (diskfs_S_file_get_children): Update
comment, pass prefix to fshelp_get_active_translators.
* libnetfs/file-get-children.c (netfs_S_file_get_children): Likewise.
|
|
|
|
|
| |
* libihash/ihash.h (HURD_IHASH_ITERATE): Fix comparison between signed
and unsigned integer expressions.
|
|
|
|
| |
* trans/mtab.c (main): Use setnullauth to drop privileges.
|
|
|
|
| |
* libtrivfs/protid-clean.c (trivfs_clean_protid): Fix typo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, peropen objects were created with a reference count of
zero. Therefore, if diskfs_create_protid fails, passing such an
object to diskfs_release_peropen would lead to a reference count
underflow.
* libdiskfs/peropen-make.c (diskfs_peropen_make): Initialize reference
count to one.
* libdiskfs/protid-make.c (diskfs_start_protid): And consume this
reference on success. Update comment.
(diskfs_create_protid): Update comment.
* libdiskfs/diskfs.h: Update comments.
* libdiskfs/io-duplicate.c (diskfs_S_io_duplicate): Adjust reference
counting accordingly.
* libdiskfs/io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise.
* libdiskfs/io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
* doc/hurd.texi (Diskfs Internals): Update accordingly.
|
|
|
|
|
|
|
|
| |
POSIX requires write access to the socket, not read access, to be able
to connect to it.
* trans/ifsock.c (S_ifsock_getsockaddr): Test for O_WRITE instead of
O_READ.
|
|
|
|
|
| |
* sutils/MAKEDEV.sh (urandom): New target.
(std): Add urandom to the standard devices list.
|
|
|
|
|
| |
* libpager/object-terminate.c (_pager_seqnos_memory_object_terminate):
Add missing linefeed in error message.
|
|
|
|
|
| |
* utils/settrans.c (main): In case of chroot_command, get status from waitpid()
call, and call error() appropriately.
|
|
|
|
|
| |
* console-client/Makefile (NCURSESW_SO_SRCS): Move definition to after
inclusion of Makeconf.
|
|
|
|
| |
* libpipe/pipe.c (pipe_send): Skip processing if there is nothing to send.
|
|
|
|
|
|
|
| |
This reverts commit 6f856c62613ffc82bf3572a372d2851638c2fb90.
As the comment right above the change says, "this [sending control
packets] depends on the fact that we always write a data packet".
|
|
|
|
|
| |
* libpipe/pipe.c (pipe_send): Check that there actually is any data to
send before calling the pipe write operation.
|
|
|
|
|
| |
* ext2fs/dir.c (count_dirents): Use block_t for nb.
(diskfs_get_directs): Likewise for blkno, nblks.
|
|
|
|
|
|
|
|
|
|
| |
Previously, libdiskfs would deadlock on contention on renamedirlock
due to the lock being taken spuriously.
Found using fsstress from the Linux Test Project.
* libdiskfs/dir-rename.c (diskfs_S_dir_rename): Remove spurious
pthread_mutex_lock.
|
|
|
|
|
|
|
|
| |
Expose ST_NOATIME as flag (if available in glibc) if diskfs is set in noatime
mode.
* libdiskfs/file-statfs.c (diskfs_S_file_statfs): Set ST_NOATIME if
_DISKFS_NOATIME is set.
|
|
|
|
|
|
|
|
|
|
| |
Only root is allowed to change the high 16 bits. The TODO entry says
otherwise, but that must be a mistake. For reference, see the glibc
sources, sysdeps/mach/hurd/bits/stat.h.
* libdiskfs/file-chflags.c (diskfs_S_file_chflags): Add permission
check.
* TODO (libdiskfs): Remove entry.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the size argument is 0, realloc may either return NULL, or return a
pointer that is only valid for use with free(3). In either case, the
memory is freed. So if realloc would return NULL (it does not on
GNU), the current code would double free p.
Found using the Clang Static Analyzer.
* libports/bucket-iterate.c (_ports_bucket_class_iterate): Avoid
calling realloc if no ports were matched.
|
|
|
|
|
|
|
|
| |
Found using the Clang Static Analyzer.
* trans/fakeroot.c (new_node): Do not leak a pointer to freed memory.
Store NULL at *np instead. This fixes a node use-after-free in
netfs_S_dir_lookup.
|
|
|
|
|
|
|
| |
Found using the Clang Static Analyzer.
* libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead
initialization.
|
|
|
|
|
|
| |
Found using the Clang Static Analyzer.
* ftpfs/dir.c (refresh_dir): Fix error handling.
|
|
|
|
|
|
| |
* Makeconf (mach_debug_defs_names,mach_debug_defs): New variables.
* Makeconf: Add rule to generate local $(mach_debug_defs) files.
* procfs/Makefile: Remove vpath for mach_debug defs.
|
|
|
|
| |
* Makefile (prog-subdirs): Add procfs.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the procfs translator to its own subdirectory 'procfs'.
This is the last commit to this repository. Development of the procfs
translator will continue in the main Hurd repository.
* procfs/Makefile: Replace the standalone Makefile with the one from
the Debian packaging repository.
|
| |
| |
| |
| |
| | |
* rootdir.c (rootdir_gc_slabinfo): Do not zero-terminate the generated
content.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a node 'slabinfo' to the root directory that contains information
about the slab allocator used in GNU Mach.
The formatting code has been taken from Richard Braun's standalone
client available here:
git://darnassus.sceen.net/rbraun/slabinfo.git
* rootdir.c (rootdir_gc_slabinfo): New function.
(rootdir_entries): Add node 'slabinfo'.
* Makefile (OBJS): Add mach_debugUser.o.
(rootdir.o): Add an explicit dependency on mach_debug_U.h.
Furthermore, add rules to create both functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The node structure for the `mounts' entry is created and destroyed on
each access, despite the fact a translator is activated on it. Fix the
issue by caching it.
* rootdir.c (rootdir_mounts_node): New variable.
(rootdir_mounts_node_lock): Likewise.
(rootdir_mounts_make_node): New function.
(rootdir_translator_make_node): Remove function.
(rootdir_entries): Replace `rootdir_translator_make_node' with
`rootdir_mounts_make_node'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make mounts a node with a passive translator record so that the mtab
translator is started on access if it is available.
* rootdir.c (MTAB_TRANSLATOR): New macro.
(rootdir_mounts_get_translator): New function.
(rootdir_mounts_exists): New function.
(rootdir_translator_make_node): Likewise.
(rootdir_entries): Add "mounts" node.
|
| |
| |
| |
| |
| |
| |
| | |
This makes killall5 actually kill any processes not marked as
important.
* process.c (process_file_gc_stat): Fix {start,end}_code.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Implement our own netfs_append_args function that provides the
appropriate command line flags if the current values differ from the
default values.
* procfs/main.c (netfs_append_args): New function.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Define a macro for the default value of each command line
parameter. This allows one to generate a minimal response to
fsys_get_options requests.
* procfs/main.c: New macro definitions for default values.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split the argument handling into a common part and one for
fsys_update_options. Handle the --update parameter; for procfs this is
a no-op.
* procfs/main.c (common_options): New variable.
(runtime_argp_parser): Handle --update.
(startup_argp): New variable.
(netfs_runtime_argp_): New variable.
|
| |
| |
| |
| |
| |
| |
| | |
The switch statement was missing the default case returning
ARGP_ERR_UNKNOWN. This patch adds that.
* main.c (argp_parser): Add default case.
|
| |
| |
| |
| |
| | |
* rootdir.c (rootdir_fakeself_exists): Use the correct arguments for
this kind of function.
|
| |
| |
| |
| | |
* rootdir.c (rootdir_gc_meminfo): Use unsigned long constant.
|
| |
| |
| |
| | |
* Makefile (LIBS): Link with libpthread.
|
| |
| |
| |
| | |
* Makefile [PROFILE] (LIBS): Replace -lthreads with -lpthread
|
| |
| |
| |
| |
| |
| |
| | |
* netfs.c (netfs_get_translator): New function.
* procfs.c (procfs_get_translator): Likewise.
* procfs.h (struct procfs_node_ops): New field get_translator.
(procfs_get_translator): New function declaration.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Formerly all nodes were created so that they were owned by root:root
by default. This causes problems if the procfs translator is running
as unprivileged user and serves passive translator records, because
the file ownership is being used as credentials for starting
translators. This obviously fails if the procfs translator is not root
but is trying to acquire credentials including uid/gid 0.
Fix this by using the uid/gid of the procfs translator by default.
procfs.c (procfs_make_node): Fix default node ownership.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Formerly only the mode_t bits cut out by S_IFMT were preserved, but
this does not include S_IPTRANS. Fix this by preserving everything but
the permission bits.
* procfs.c (procfs_node_chmod): Fix bitmask.
|
| |
| |
| |
| |
| |
| | |
Ignore the --nodev, --noexec and --nosuid arguments.
* procfs/main.c (argp_parser): Ignore some arguments for compatibility.
|
| |
| |
| |
| |
| |
| |
| | |
Make procfs translators handle fsys_set_options requests by pointing
netfs_runtime_argp to our argp struct.
* procfs/main.c (netfs_runtime_argp): New variable.
|