summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-18Make make install idempotentSamuel Thibault
* sutils/Makefile ($(prefix)/dev/MAKEDEV): Add -f to ln command.
2016-04-17utils/settrans: add option to specify the underlying nodeJustus Winter
* utils/settrans.c (options): Add '--underlying'. (main): Handle new option. (open_node): Open the node if given.
2016-04-17utils/settrans: get an authenticated root node in chroot modeJustus Winter
* utils/settrans.c (get_credentials): New function. (main): Get an authenticated root node for the process we are chrooting. Signed-off-by: Justus Winter <justus@gnupg.org>
2016-04-17isofs: make superblock detection more robustJustus Winter
* isofs/isofs.h (disk_image_len): New variable. * isofs/main.c (read_sblock): Avoid out of bounds access. * isofs/pager.c (disk_image_len): New variable. (create_disk_pager): Initialize 'disk_image_len'.
2016-04-15Update NEWS fileJustus Winter
2016-04-04Use posix types for mig definitions.Flavio Cruz
* hurd/hurd_types.defs: Use posix types. * libfshelp/start-translator-long.c: Use uint32_t instead of unsigned32_t.
2016-03-24Use swapon path as pager partition pathSamuel Thibault
When /dev/hd* entries are parted-partition storeio, the store name is only the disk name, thus not unique. We should just use the path being used instead. * sutils/swapon.c (swaponoff): Use `file' instead of `store->name' to default_pager_paging_file. (main): Drop hardcoded "/dev/". * procfs/rootdir.c (rootdir_gc_swaps): Drop hardcoded "/dev/".
2016-03-24Fix swap information numbersSamuel Thibault
* procfs/rootdir.c (rootdir_gc_swaps): Fix default_pager_storage_info call parameter order. * sutils/swapon.c (main): Likewise.
2016-03-21netfs: Remove global reference count lock.Flavio Cruz
* libnetfs/drop-node.c: Remove use of netfs_node_refcnt_lock. * libnetfs/init-init.c: Remove netfs_node_refcnt_lock. * libnetfs/make-node.c: Initialize refcounts in refcounts_init. * libnetfs/netfs.h: Use refcounts_t for tracking node references. Remove netfs_node_refcnt_lock. Add netfs_nref_light, netfs_nrele_light and handler netfs_try_dropping_softrefs. Adjust comments. * libnetfs/nput.c: Use refcounts_t. Call netfs_try_dropping_softrefs to remove any soft reference that the translator might have acquired during the lifetime of the node. Implement empty netfs_try_dropping_softrefs. * libnetfs/nref.c: Implement netfs_nref_light. * libnetfs/nrele.c: Use refcounts_t and netfs_try_dropping_softrefs. Implement netfs_nrele_light. * ftpfs/dir.c: Use netfs_nref without locking the old netfs_node_refcnt_lock. * ftpfs/node.c: Likewise. * usermux/mux.c: Use netfs_nref to increase hard references of the node. * hostmux/mux.c: Use netfs_nref to increase hard references of the node. * trans/fakeroot.c (new_node): Use a light reference when storing a node in the hash table. * trans/fakeroot.c (netfs_try_dropping_softrefs): Implement netfs_try_dropping_softrefs to remove the node from the hash table. * trans/fakeroot.c (netfs_node_norefs): Remove code to remove the node from the hash table. * trans/fakeroot.c (netfs_S_dir_lookup): Simplify lookup code since we don't need to lock netfs_node_refcnt_lock anymore. * procfs/netfs.c: Remove use of netfs_node_refcnt_lock. * nfs/cache.c: Add mutex to handle exclusive access to nodehash. This replaces the use of netfs_node_refcnt_lock. * nfs/cache.c (lookup_handle): Use nodehash_ihash_lock when accessing nodehash. Use netfs_nref_light to add one soft reference to the node just added to nodehash. * nfs/cache.c (netfs_node_norefs): Use netfs_nref. Don't use netfs_node_refcnt_lock and don't remove the node from nodehash here. * nfs/cache.c (netfs_try_dropping_softrefs): Drop the light reference when the node has no more hard references. * nfs/cache.c (recache_handle): Use nodehash_ihash_lock instead. * nfs/ops.c (netds_attempt_unlink): Use refcounts_references. * console/console.c (netfs_node_norefs): Use a soft reference to store a node in dir_node, cons_node, disp_node, inp_node. * console/console.c (netfs_try_dropping_softrefs): When dropping all soft references remove node pointer from the fields above.
2016-03-20pflocal: Add support for access() on pipesSamuel Thibault
bash's '<(' helper creates a pipe and gives /dev/fd/63 to the program, and gcc would then run access() on it. So we actually need to support at least some FS operations on pipes. * pflocal/fs.c: New file. * pflocal/mig-mutate.h (FILE_INTRAN, FILE_INTRAN_PAYLOAD, FILE_DESTRUCTOR, FILE_IMPORTS): New macros. * pflocal/sserver.c: Include "fs_S.h". (sock_demuxer): Call fs_server_routine. * pflocal/Makefile (SRCS): Add fs.c. (MIGSTUBS): Add fsServer.o.
2016-03-19Fix spurious port deallocationSamuel Thibault
* libfshelp/fetch-root.c (fshelp_fetch_root): When translator has died, do not deallocate its control port twice.
2016-03-18ext2fs: Fix off-by-oneSamuel Thibault
* ext2fs/pager.c (disk_cache_init): Do not add disk_cache_info[disk_cache_blocks] to disk_cache_info_free.
2016-03-16Add getting swap information from swapon and procfsSamuel Thibault
* hurd/default_pager.defs (default_pager_storage_info): New RPC. * hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC. * hurd/default_pager_types.h: Include <mach/machine/vm_types.h>. (vm_size_array_t): New type. * mach-defpager/priv.h (part): Add `name' field. * mach-defpager/default_pager.c (new_partition): Allocate and fill `part->name' field. Free it on error. (destroy_paging_partition): Free `part->name' field. (S_default_pager_storage_info): New function. * procfs/Makefile (SRCS): Add default_pagerUser.c. * procfs/rootdir.c: Include "default_pager_U.h". (rootdir_gc_swaps): New function. (rootdir_entries): Add "swaps" entry. * sutils/swapon.c: Include <argz.h> (show): New variable. (options): Add --show/-S option. (def_pager, dev_master): New variables (swaponoff): Move getting `def_pager' to... (get_def_pager): ... new function. (main): Support 'S' option. * trans/proxy-defpager.c (S_default_pager_storage_info): New function.
2016-03-15Show firmlink mounts to mount pointsSamuel Thibault
* trans/mtab.c (mtab_populate): Always open the underlying node, and pass it to mtab_mark_as_seen instead of the translated node.
2016-03-15Add get_source support to firmlinkSamuel Thibault
* trans/firmlink.c (trivfs_get_source): New function.
2016-03-15ext2fs: Fix adding blocks to free blocks cacheSamuel Thibault
* ext2fs/pager.c (disk_cache_info_free_push): Add prototype. (disk_pager_notify_evict): When dropping DC_INCORE flag, if the block becomes free (no reference and no DC_DONT_REUSE flags), call disk_cache_info_free_push. (disk_cache_block_deref): Only call disk_cache_info_free_push if the flags of the block do not contain DC_DONT_REUSE flags.
2016-03-13Add missing RPC definitionsSamuel Thibault
* hurd/process_request.defs (proc_make_task_namespace_request): New definition. * hurd/process_reply.defs (proc_make_task_namespace_reply): Skip definition.
2016-03-07utils/fakeauth: fix invocation of programs from PATHJustus Winter
* utils/fakeauth.c (main): Replace the right element of the argument vector. This fixes running scripts from PATH using fakeroot.
2016-02-29Fix parallel buildSamuel Thibault
* console-client/Makefile (parser.tab.h): Redefine the standard yacc rule to make it build the header too, to avoid concurrency between the standard yacc rule and the rule that builds the header. * sutils/Makefile (OBJS): Append .o suffix to $(progs) instead of .c.
2016-02-28Fix use-after-free in libps.Esa Peuha
* libps/fmt.c (_fmt_create): Free new_fmt->src before new_fmt if reallocating fields fails.
2016-02-28Fix mustbedir mechanism for symlinksSamuel Thibault
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): When following a symlink, if mustbedir is true, always append a slash to the symlink target, not only when the target is absolute. Reset mustbedir to 0 before continuing the lookup loop. * libnetfs/dir-lookup.c (netfs_S_dir_lookup): When following a symlink, if mustbedir is true, append a slash to the symlink target. Reset mustbedir to 0 before continuing the lookup loop. * libtreefs/dir-lookup.c (_treefs_s_dir_lookup): Likewise.
2016-02-27Fix parallel installSamuel Thibault
* sutils/Makefile (install): Do not depend on $(prefix)/dev. ($(prefix)/dev/MAKEDEV): Depend on $(prefix)/dev²
2016-02-23libports: preserve the complex message flagJustus Winter
* libports/manage-multithread.c (internal_demuxer): Preserve all message flags when we store the objects address as payload in the message. * libports/manage-one-thread.c (internal_demuxer): Likewise.
2016-02-23procfs: adapt to kernel interface changeJustus Winter
procfs makes use of the debug interface which is subject to change. * procfs/rootdir.c (rootdir_gc_slabinfo): The flag CACHE_FLAGS_NO_RECLAIM is no longer used.
2016-02-22fix Xioctl-proto.defs creationBartlomiej Puget
* hurd/Makefile (%.h): Remove heading spaces. (%ioctl-requests.list): Protect asterisk. * hurd/gensym.awk: Do not print newline in __asm statement.
2016-02-22utils/mount: start translators with stderr closedJustus Winter
Apparently some users of 'mount' do not cope with any output being generated from the spawned translator. * utils/mount.c (do_mount): Start translators with stderr closed.
2016-02-21trans/crash: fix suspending taskJustus Winter
* trans/crash.c (S_crash_dump_task): Fix looking up 'user_proc'.
2016-02-16nfs: fix deallocation of struct node.Flavio Cruz
* nfs/cache.c: Do not free np->nn since np and np->nn are being allocated contiguously.
2016-02-15Make fakeroot forward send errors instead of crashingSamuel Thibault
* trans/fakeroot.c (netfs_demuxer): When forwarding an unknown request fail, forward the error instead of crashing.
2016-02-15libnetfs: remove unused fields.Flavio Cruz
* libnetfs/netfs.h: Remove prevp and next fields from struct node.
2016-02-15libdiskfs: fix and improve locking in nrefs/nput.Flavio Cruz
* libnetfs/node-nput.c: Do not unlock the node since it will be unlocked later. * libnetfs/node-nrele.c: Do not lock the node twice if not needed.
2016-02-15nfs: Use libihash for the node cache.Flavio Cruz
* nfs/cache.c: Remove old node cache and use libihash. Use a pointer to the node handle as the key and the node itself as the value. Use netfs_make_node_alloc to allow libihash to set 'slot'. * nfs/nfs.c: Pass in a struct handle instead. * nfs/nfs.h: Add a hurd_ihash_locp_t field and remove hnext and hprevp.
2016-02-14Fix function nameSamuel Thibault
* procfs/main.c (set_default_options): Rename to set_compatibility_options. (argp_parser): Update call accordingly.
2016-02-14Fix hang on reauthenticationSamuel Thibault
One needs to keep the port being reauthenticated alive until we are sure the server has complete authentication. * libfshelp/fetch-root.c (fshelp_fetch_root): Deallocate `port' after auth_user_authenticate has completed. * trans/fakeroot.c (netfs_S_dir_lookup): Likewise with `file'.
2016-02-14Make sure to complete auth_server_authenticateSamuel Thibault
* boot/boot.c (S_io_reauthenticate): Keep calling auth_server_authenticate while it returns EINTR. * proc/mgt.c (S_proc_reauthenticate): Likewise.
2016-02-13Use libihash to store directory entries in ftpfs.Flavio Cruz
* ftpfs/ftpfs.h: Add dir_locp for each directory entry and replace the table with a libihash table. * ftpfs/dir.c: Modify the code to use libihash. Remove several functions such as rehash and insert.
2016-02-13utils/vmallocate: new utilityJustus Winter
* utils/Makefile (targets): Add 'vmallocate'. * utils/vmallocate.c: New file.
2016-02-08Fixed leaks in _netfs_translator_callback2_fnJames Clarke
* libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Fixed leaking iouser and peropen structs on error.
2016-02-07Check for a return value in netfs_make_peropen before using it in ↵Flavio Cruz
netfs_make_protid. * libnetfs/trans-callback.c: Add check for netfs_make_peropen.
2016-02-07devnode: fix falling back to the kernel driverJustus Winter
* devnode/devnode.c (ds_device_open): Do not exit if opening the master device fails. (parse_opt): Likewise.
2016-02-07mach-defpager: link dynamicallyJustus Winter
* mach-defpager/Makefile (LDFLAGS): Drop.
2016-02-07Remove libfshelp/trans.h and libfshelp/locks.h.Flavio Cruz
* libfshelp/locks.h: Remove. * libfshelp/trans.h: Remove. struct transboot is not used anywhere. * libfshelp/fetch-root.c: Adjust includes. * libfshelp/lock-acquire.c: Likewise. * libfshelp/lock-init.c: Likewise.
2016-02-07Use refcount_t for peropen reference counting in libnetfs.Flavio Cruz
* libnetfs/netfs.h: Use refcount_t. * libnetfs/make-peropen.c: Initialize to 1 with refcount_init just like in libdiskfs. * libnetfs/make-protid.c: Don't increment the count here. Do it like libdiskfs. * libnetfs/io-duplicate.c: Add refcount_ref since netfs_make_protid no longer increments the refcount. * libnetfs/io-reauthenticate.c: Likewise. * libnetfs/io-restrict-auth.c: Likewise. * libnetfs/release-peropen.c: Dereference without locking.
2016-02-05utils/settrans: improve --chroot functionalityJustus Winter
Add an option '--chroot-chdir' to settrans and make it chdir to this directory before executing the target program. Also, look up the executable in PATH. With these changes we no longer need to use the shell inside the chroot in the convenience scripts, and hence do not require it to be installed inside the chroot. * utils/fakeroot.sh: Simplify using the new option. * utils/remap.sh: Likewise. * utils/settrans.c (OPT_CHROOT_CHDIR): New constant. (options): New option 'chroot-chdir'. (main): Handle new option. Search for target executable in PATH. * utils/fakeauth.c (main): Likewise.
2016-02-04exec: remove duplicate function callEsa Peuha
* exec/main.c (main) Remove second call to trivfs_startup from commit a5d384c.
2016-01-19procfs: Move setting default parameters to a separate functionSamuel Thibault
* procfs/main.c (set_default_options): New function (argp_parser): Call `set_default_options'.
2016-01-19Fix typoSamuel Thibault
* exec/Makefile (targets): Rename to target.
2016-01-17Also build exec.staticSamuel Thibault
Which can be more convenient than using ld.so to boot the Hurd * exec/Makefile (targets): Add exec.static
2016-01-14Fix gcc signedness warningsSamuel Thibault
* pfinet/linux-src/include/linux/skbuff.h (__skb_pull): Return unsigned char * instead of char *.
2016-01-13Fix O_DIRECTORY lookup on trivial translatorsFlavio Cruz
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): If mustbedir, make sure entry is a directory by retrying "/", or starting the translator and retrying "/". * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.