aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing linefeedSamuel Thibault2014-08-231-2/+2
| | | | | * libpager/object-terminate.c (_pager_seqnos_memory_object_terminate): Add missing linefeed in error message.
* Make settrans return value returned by chroot commandSvante Signell2014-08-191-4/+12
| | | | | * utils/settrans.c (main): In case of chroot_command, get status from waitpid() call, and call error() appropriately.
* Make the ncursesw driver of the console client compile properlyMarek Benc2014-07-171-5/+3
| | | | | * console-client/Makefile (NCURSESW_SO_SRCS): Move definition to after inclusion of Makeconf.
* libpipe: fix spurious calls to pipe_sendRichard Braun2014-06-301-1/+5
| | | | * libpipe/pipe.c (pipe_send): Skip processing if there is nothing to send.
* Revert "libpipe: fix calls to pipe_send with no data"Richard Braun2014-06-281-1/+1
| | | | | | | 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: fix calls to pipe_send with no dataRichard Braun2014-06-281-1/+1
| | | | | * libpipe/pipe.c (pipe_send): Check that there actually is any data to send before calling the pipe write operation.
* ext2fs: use correct type for block numbersJustus Winter2014-06-231-3/+3
| | | | | * ext2fs/dir.c (count_dirents): Use block_t for nb. (diskfs_get_directs): Likewise for blkno, nblks.
* libdiskfs: fix deadlockJustus Winter2014-06-231-1/+0
| | | | | | | | | | 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.
* libdiskfs: expose the ST_NOATIME flagPino Toscano2014-06-221-0/+2
| | | | | | | | 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.
* libdiskfs: add permission check to file_chflagsJustus Winter2014-06-182-2/+8
| | | | | | | | | | 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.
* libports: avoid realloc(3) corner caseJustus Winter2014-06-181-1/+1
| | | | | | | | | | | | 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.
* trans/fakeroot: fix error handlingJustus Winter2014-06-181-0/+1
| | | | | | | | 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.
* libshouldbeinlibc: fix dead initialization in fmt_named_intervalJustus Winter2014-06-181-1/+1
| | | | | | | Found using the Clang Static Analyzer. * libshouldbeinlibc/timefmt.c (fmt_named_interval): Fix dead initialization.
* ftpfs: fix error handling in refresh_dirJustus Winter2014-06-181-8/+12
| | | | | | Found using the Clang Static Analyzer. * ftpfs/dir.c (refresh_dir): Fix error handling.
* Add mach_debug defs rulesDavid Michael2014-06-172-3/+4
| | | | | | * 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.
* Add the procfs translator to prog-subdirsJustus Winter2014-06-151-0/+1
| | | | * Makefile (prog-subdirs): Add procfs.
* Merge procfs into the Hurd repositoryJustus Winter2014-06-1518-0/+2779
|\
| * Prepare the procfs translator to be merged into the Hurd sourcesJustus Winter2014-06-1519-46/+34
| | | | | | | | | | | | | | | | | | | | 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.
| * Do not include the terminating zero in /proc/slabinfoJustus Winter2014-05-281-1/+0
| | | | | | | | | | * rootdir.c (rootdir_gc_slabinfo): Do not zero-terminate the generated content.
| * Implement /proc/slabinfoJustus Winter2014-05-242-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix mtab translator leakRichard Braun2013-10-051-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
| * Serve mounts node with a passive translator recordJustus Winter2013-09-151-1/+48
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Make start_code and end_code available in /proc/*/statJustus Winter2013-09-151-1/+23
| | | | | | | | | | | | | | This makes killall5 actually kill any processes not marked as important. * process.c (process_file_gc_stat): Fix {start,end}_code.
| * procfs: provide a more meaningful response to fsys_get_optionsJustus Winter2013-08-281-0/+42
| | | | | | | | | | | | | | | | 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.
| * procfs: define macros for the default argument valuesJustus Winter2013-08-281-5/+12
| | | | | | | | | | | | | | | | 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.
| * procfs: handle the --update parameterJustus Winter2013-08-281-33/+70
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix argument parsingJustus Winter2013-08-271-0/+3
| | | | | | | | | | | | | | 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: Fix declaration of rootdir_fakeself_exists.Justus Winter2013-07-221-1/+1
| | | | | | | | | | * rootdir.c (rootdir_fakeself_exists): Use the correct arguments for this kind of function.
| * rootdir.c: Fix compiler warningJustus Winter2013-07-221-1/+1
| | | | | | | | * rootdir.c (rootdir_gc_meminfo): Use unsigned long constant.
| * Makefile: add -lpthreadJustus Winter2013-07-221-1/+1
| | | | | | | | * Makefile (LIBS): Link with libpthread.
| * Fix profile linkSamuel Thibault2013-07-221-1/+1
| | | | | | | | * Makefile [PROFILE] (LIBS): Replace -lthreads with -lpthread
| * Add the necessary infrastructure to serve passive translatorsJustus Winter2013-07-203-0/+29
| | | | | | | | | | | | | | * 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.
| * Fix default file ownershipJustus Winter2013-07-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix procfs_node_chmodJustus Winter2013-07-201-1/+1
| | | | | | | | | | | | | | | | 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.
| * procfs: Ignore arguments for compatibility with Linux' procfs.Justus Winter2013-07-201-0/+22
| | | | | | | | | | | | Ignore the --nodev, --noexec and --nosuid arguments. * procfs/main.c (argp_parser): Ignore some arguments for compatibility.
| * procfs: enable fsys_set_optionsJustus Winter2013-06-291-0/+3
| | | | | | | | | | | | | | 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.
| * procfs: keep old config values if the parsing failsJustus Winter2013-06-291-8/+19
| | | | | | | | | | | | | | | | | | | | Previously if strtol failed the previous configuration value would get overwritten. Prevent this by storing the result in a temporary variable and update the configuration if the argument was parsed correctly and passed the sanity checks. * procfs/main.c (argp_parser): Keep old configuration in case a malformed value is encountered.
| * procfs: fix the error handling in argp_parserSamuel Thibault2013-06-291-6/+6
| | | | | | | | | | | | | | | | Do not exit using error (1, ..) but gracefully handle the error using argp_error. Also fix a typo ("the a user") while touching these lines. * procfs/main.c (argp_parser): Proper error handling. (argp_parser): Fix typo.
| * Remove old hack for the "stat" permissionsPino Toscano2013-03-021-8/+0
| | | | | | | | | | | | | | 7550343b09a94dc1c659ad74dc75b3b77e7ab0bc added a better way to set the permissions of that file, so this old hack is not needed anymore. * process.c (process_lookup_pid): Do not change the mode of ENTRIES[2].hook.
| * Report VM cache size in meminfoRichard Braun2013-01-121-1/+8
| | | | | | | | | | * rootdir.c: Include <mach/gnumach.h> and <mach/vm_cache_statistics.h>. (rootdir_gc_meminfo): Call vm_cache_statistics and return the VM cache size.
| * Simple implementation of statfsPino Toscano2012-12-061-1/+6
| | | | | | | | | | | | | | Initial implementation of statfs reply, just returning the filesystem type and its id. * netfs.c: Include <sys/statvfs.h> and <unistd.h>. (netfs_attempt_statfs): Implement.
| * Move procfs to pthreadsRichard Braun2012-11-271-4/+4
| |
| * Fix procfs linkCyril Roelandt2012-10-191-1/+1
| | | | | | | | Makefile (LIBS): Add -lfshelp
| * Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/procfs into ↵Samuel Thibault2012-09-111-0/+6
| |\ | | | | | | | | | jkoenig/master
| | * Merge jkoenig/master into master.Thomas Schwinge2012-07-1222-2772/+2177
| | |\ | | | | | | | | | | | | This branch supersedes the previous one.
| | * | Implement /proc/mounts as a symlink to /etc/mtabJeremie Koenig2010-08-182-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * procfs_nonpid_files.c (procfs_create_mounts): New function. * procfs_dir.c (procfs_fill_root_dir): Call procfs_create_mounts. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
| | * | Set an appropriate st_mode on symlinks.Jeremie Koenig2010-08-181-1/+10
| | | | | | | | | | | | | | | | | | | | * procfs_pid_files.c (update_pid_entries): When symlink_target is not NULL, set st_size to the symlink length and st_mode to S_IFLNK | 0777.
| | * | update_pid_entries(): fix awkwardly indented uninitialized memory leakJeremie Koenig2010-08-181-6/+4
| | | | | | | | | | | | | | | | | | | | * procfs_pid_files.c (update_pid_entries): Replace dynamic allocation of `stat' with automatic allocation. Memset `stat' to 0.
| | * | Switch to the new ChangeLog style.Thomas Schwinge2010-08-011-175/+4
| | | | | | | | | | | | | | | | * ChangeLog: Wipe out content, and add instructions about how to get it back.
| | * | 2010-05-31 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault2010-08-012-2/+7
| | | | | | | | | | | | | | | | | | | | * procfs_nonpid_files.c (procfs_read_nonpid_meminfo): Print swap sizes using %llu.