aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove bogus parenthesisSamuel Thibault2010-12-251-1/+1
| | | | * login/utmp.c (return_data): Remove bogus parenthesis.
* Fix NULL dereferenceSamuel Thibault2010-12-251-1/+1
| | | | | * libps/spec.c (ps_emit_user_name): Do not dereference pw when it is NULL, dereference u instead.
* Fix NULL dereferenceSamuel Thibault2010-12-251-2/+4
| | | | * ftpfs/ftpfs.c (parse_startup_opt): Do not derefence sep when it is NULL.
* Avoid accessing invalid memory.Diego Nieto Cid2010-11-201-3/+3
| | | | * console/console.c (vcons_lookup): Unlock using cons instead of vcons->cons.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2010-11-202-1/+10
|\
| * Fix connect(AF_UNSPEC)Samuel Thibault2010-10-302-1/+10
| | | | | | | | | | | | | | | | | | | | Fixes sshd startup on inet6-enabled systems. * pfinet/socket-ops.c (S_socket_create_address): Accept creating AF_UNSPEC addresses too. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udpv6_connect): When address family is AF_UNSPEC, call udp_connect() and clear daddr, saddr, and rcv_saddr.
* | Properly release console lock.Diego Nieto Cid2010-11-201-2/+4
|/ | | | | | | | | | | The console lock was released only when there were no allocation errors leaving it locked in the event mmap failed. This patch moves the mutex_unlock call to a point in the flow of control where it is consistent with the lock acquisition. * console/console.c(netfs_get_dirents): Relocate mutex_unlock call to common return path.
* Fix ipv6 pfinet buildSamuel Thibault2010-10-291-1/+1
| | | | | * pfinet/linux-src/net/ipv6/raw_ipv6.c (rawv6_init_sk): Replace yet-undefined raw6_sk with proper translation.
* ipv6 raw fixesAlexey Kuznetsov2010-10-291-2/+21
| | | | | | | | | | | | | - RFC2292 bis compliance: enable checksumming of ICMPv6 raw sockets by default, reject odd offsets - calculate checksum correctly when user forgets to uninitialize checksum word * net/ipv6/raw_ipv6.c (rawv6_frag_cksum): Fix offset check. Compensate for any user-provided checksum. (rawv6_setsockopt): Reject odd checkum offsets with EINVAL. (rawv6_init_sk): Enable kernel-computed checksum by default for IPPROTO_ICMPV6 sockets.
* Fix _ports_lock usageSamuel Thibault2010-10-281-1/+2
| | | | | * libports/create-internal.c (_ports_create_port_internal): Add label after mutex_unlock(_ports_lock), use it where appropriate.
* Add \n to boot error messageSamuel Thibault2010-10-181-0/+1
| | | | * boot/boot.c (main): Print \n after printing boot_script_error_string().
* Fix return value on `getname' errors.Pino Toscano2010-10-111-1/+1
| | | | | | | | | This fixes the errno return value for getpeername() calls on not connected sockets: the return value of the `getname' call comes from the Linux code, so it is a negative value, in case of error. * pfinet/misc.c (make_sockaddr_port): Turn negative error values returned by `getname' calls into positive values before returning it.
* Add device virtualisation support to bootZheng Da2010-09-201-0/+56
| | | | | | | | | | | * boot/boot.c: Add '-f' option. (dev_map): New structure. (dev_map_head): New variable. (add_dev_map): New function. (lookup_dev): New function. (parse_opt): Handle the '-f' option: call 'add_dev_map'. (ds_device_open): Try to call 'lookup_dev', and open the device from the device file if it succeeds.
* Add support for setting actual device flagsSamuel Thibault2010-09-203-1/+22
| | | | | | | * pfinet/ethernet.c (ethernet_change_flags): New function. * pfinet/pfinet.h (ethernet_change_flags): New declaration. * pfinet/iioctl-ops.c (S_iioctl_siocsifflags): Also call `ethernet_change_flags' after calling `dev_change_flags'.
* Merge remote branch 'origin/master-zhengda'Samuel Thibault2010-09-190-0/+0
|\ | | | | | | | | Conflicts: utils/rpctrace.c
| * fix a bug #20612Zheng Da2009-07-311-1/+1
| | | | | | | | * rpctrace.c (print_contents): Check the number of elements in the port array.
* | Fix port transmission over pflocalManuel Menal2010-09-191-1/+1
| | | | | | | | | | | | * pflocal/socket.c (S_socket_recv): Return transmitted port to caller thanks to MACH_MSG_TYPE_COPY_SEND instead of MACH_MSG_TYPE_MAKE_SEND (since this is a send right here).
* | Obtain number of ports in proc and libpsantrik2010-09-186-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add (and implement) a proc RPC to obtain the number of Mach ports used by the target task. Add infrastructure in libps to read this information. * hurd/process.defs (proc_getnports): New RPC. * hurd/process_request.defs (proc_getnports_request): New RPC. * libps/procstat.c (proc_stat_set_flags): Call proc_getnports RPC if needed. * libps/ps.h (proc_stat): New `num_ports' field. (PSTAT_NUM_PORTS): New macro. (proc_stat_num_ports): New macro. * libps/spec.c (ps_get_num_ports): New function. (ps_num_ports_getter): New variable. (specs): New entry for `ps_num_ports_getter'. * proc/info.c (S_proc_getnports): New function.
* | Fix net_bh_wakeup useSamuel Thibault2010-09-181-4/+4
| | | | | | | | | | * pfinet/sched.c (net_bh_worker): Use the net_bh_lock mutex instead of the global_lock mutex for the net_bh_wakeup condition variable.
* | Protect exec from memory faultsSamuel Thibault2010-09-141-6/+16
| | | | | | | | | | | | | | * exec/exec.c (load_section): Call i`hurd_safe_copyin' instead of `memcpy'. Handle error case. (check_gzip): Likewise. (check_bzip2): Likewise.
* | Fix compressed binaries executionSamuel Thibault2010-09-141-4/+6
| | | | | | | | | | | | | | | | * exec/exec.c (check_gzip.zipread): Add `n' to `zipread_pos' to fix infinite loop. (check_bzip2.zipread): Likewise. (check_gzip): Set `file_data' and `file_size' fields after calling `finish' instead of before. (check_bzip2): Likewise.
* | Fix in-memory mappingSamuel Thibault2010-09-141-2/+7
| | | | | | | | | | | | * exec/exec.c (map): When e->file_data is not NULL, return it plus `posn'. (prepare_in_memory): Call prepare_stream to clear stream positions.
* | Enable debugging in mutex_try_lock tooSamuel Thibault2010-09-031-1/+1
| | | | | | | | | | * libthreads/cthreads.h (mutex_try_lock): Call WAIT_SET_DEBUG when spin_try_lock succeeds.
* | WAIT_DEBUG: permit to get function names instead of threadsSamuel Thibault2010-09-031-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | From the idea of Sergio Lopez. * libthreads/cthreads.h [WAIT_FUNC_DEBUG] (mutex): Replace struct cthread *holder field with const char *fname. (WAIT_CLEAR_DEBUG, WAIT_SET_DEBUG): New macros which clear and set fname or holder according to WAIT_FUNC_DEBUG and WAIT_DEBUG being defined. (mutex_init, mutex_unlock): Call WAIT_CLEAR_DEBUG in all cases instead of setting the `holder' field according to WAIT_DEBUG being defined (mutex_lock): Call WAIT_SET_DEBUG in all cases instead of setting the `holder' field according to WAIT_DEBUG being defined.
* | Document incoherency for storage of task_events_infoSamuel Thibault2010-08-311-0/+2
| | | | | | | | | | | | | | It doesn't produce any bug ATM just because GNU Mach does not support it. * libps/ps.h (struct proc_stat): Document that task_events_info is currently actually fetched into proc_info.
* | Make proc not claim it was able to fetch PI_FETCH_TASKEVENTSSamuel Thibault2010-08-311-0/+6
| | | | | | | | | | * proc/info.c (S_proc_getprocinfo): Clear PI_FETCH_TASKEVENTS from `flags' when task_info.
* | RegenerateSamuel Thibault2010-08-271-1925/+2655
| |
* | Revert "Fix tmpfs assertion"Samuel Thibault2010-08-272-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed up to http://lists.gnu.org/archive/html/bug-hurd/2010-06/msg00021.html this reverts commit 97c5690abeaa88767acf2ffbb55552e8278052c8 and removes the corresponding assertion. This is related to commit 2f7f90ce15cce79ef83a8d273e3a27b5b527c7d7 which changes how much st_size is increased. * tmpfs/tmpfs.h (tmpfs_dirent): Remove `padding' field. * tmpfs/dir.c (diskfs_get_directs): Remove assertion on the position of the `name' field of struct tmpfs_dirent compared to the position of the `d_name' field of struct dirent.
* | Fix malloc size in tmpfsCarl Fredrik Hammar2010-08-271-1/+1
| | | | | | | | * tmpfs/dir.c (diskfs_direnter_hard): Fix malloc size.
* | Fix a gcc warning.Da Zheng2010-08-271-4/+6
| | | | | | | | * utils/rpctrace.c (print_contents): Put the if statement in braces.
* | Fix comment on when Mach would try to clear tmpfs dataSamuel Thibault2010-08-271-1/+1
| | | | | | | | | | * tmpfs/node.c (diskfs_get_filemap): Fix comment according to second patch from Sergio Lopez.
* | Keep a reference on objects to preserve their content.Samuel Thibault2010-08-272-1/+11
| | | | | | | | | | | | | | | | | | | | | | Modify tmpfs to keep a reference (by mapping it into its own space) to each memory object created by the user, so they don't get inmediately terminated at the end of the current operation. * tmpfs/tmpfs.h (struct disknode): Add `memref' field. * tmpfs/node.c (diskfs_get_filemap): vm_map() the first page of the newly-allocated object, store in `memref' field. (diskfs_free_node) vm_deallocate the page pointed by `memref' field.
* | Fix default_pager default_pager_object_set_size parametersSamuel Thibault2010-08-271-1/+1
| | | | | | | | | | | | | | As suggested by Sergio Lopez. * serverboot/default_pager.c (S_default_pager_object_set_size): Exchange `seqno' and `reply_to' parameters.
* | make unblocked reads from external objects return a zeroed page.Sergio Lopez2010-08-271-3/+18
| | | | | | | | | | | | | | | | | | | | | | * serverboot/default_pager.c (struct dstruct): Add boolean_t external field. (default_pager_add): Set ds->external to TRUE or FALSE depending whether the object is external. (default_read): Add external parameter. If no_block(block) returns 1, if external is TRUE, zero fill the page and return PAGER_SUCCESS instead of PAGER_ABSENT. (seqnos_memory_object_data_request): Pass ds->external as additional parameter to default_read.
* | Fix missing mutex unlock.Sergio Lopez2010-08-271-0/+1
| | | | | | | | | | * serverboot/default_pager.c (pager_read_offset): Properly unlock the mutex before returning NO_BLOCK.
* | libps (proc_stat_set_flags): Fix pointer signedness warningJeremie Koenig2010-08-261-1/+1
| | | | | | | | | | * libps/procstat.c (proc_stat_set_flags): Cast &ps->umask into (int*) before calling ps_msg_get_init_int.
* | Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault2010-08-262-1/+5
|\ \
| * | libps (_proc_stat_free): Fix memory leakJeremie Koenig2010-08-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thread_waits field was never freed; this change adds the code to do so if the corresponding flag is set. Users are also warned of the consequences, namely, that they should not free process proc_stats before all their associated thread ones are gone, since the latter may reference the former's thread_waits field. However, with the normal interface (ie. ps_context_free), all proc_stats are freed at once, so this is not an issue. * libps/procstat.c (_proc_stat_free): Free ps->thread_waits if PSTAT_THREAD_WAITS flag is set. * libps/ps.h (_proc_stat_free): Document that thread proc_stats must be freed before process proc_stat can be.
* | | libps (fetch_procinfo): Fix non-set flag PSTAT_TASK_EVENTSJeremie Koenig2010-08-261-22/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fetch_procinfo function failed to set the PSTAT_TASK_EVENTS when those has been retreived. It should be noted that GNU Mach does not support the TASK_EVENTS_INFO flavor, so this is of minor importance. The new code also checks that all the requested proc server flags related to a given proc_stat flags have been returned before setting the proc_stat flag in question. * libps/procstat.c (fetch_procinfo): Add map array containing `ps_flags_t' and `procinfo' flags. Use it in a loop to check for flags in `need' and `have' and set them in `pi_flags'. Likewise to check for flags in `pi_flags' and set them in `have'.
* | libps: Fix deadly typoJeremie Koenig2010-08-261-1/+1
| | | | | | | | | | | | | | | | | | PSTAT_PROCINFO is a set of flags, some of which can be obtained in alternative ways. In this case, _proc_stat_free will try to deallocate an uninitialised field. PSTAT_PROC_INFO is the flag we want. * libps/procstat.c (_proc_stat_free): Use PSTAT_PROC_INFO instead of PSTAT_PROCINFO.
* | Fix the build system to handle part storesJeremie Koenig2010-08-183-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Part stores are used for debian-installer, and they're considered more elegant than kernel partition devices. This patch makes sure they're included in the build unless the user disables them explicitely. * Makeconf: add $(PARTED_LIBS) to static binaries which use libstore_part.a. * configure.in: look for libparted again (see also 7c7a04eb). * libstore/Makefile (store-types): include the 'part' store type when appropriate, remove the previous attempt. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
* | Partially revert 8451b436 to fix halt/rebootSamuel Thibault2010-08-021-10/+2
| | | | | | | | | | | | init/init.c (S_msg_sig_post_untraced): Ignore result of msg_sig_post_untraced_reply. (S_msg_sig_post): Likewise.
* | pfinet: check return value of mmap() in S_io_read() and S_socket_recv()Olaf Buddenhagen2010-08-012-0/+10
| | | | | | | | | | * pfinet/io-ops.c (S_io_read): Check return value. * pfinet/socket-ops.c (S_socket_recv): Likewise.
* | Fix "make dist" in `sutils'.Ludovic Courtès2010-08-011-2/+2
| | | | | | | | * sutils/Makefile (SRCS): Add `clookup.c', `fstab.c', and `update.c'.
* | Fix "make dist" in `libthreads'.Ludovic Courtès2010-08-011-1/+6
| | | | | | | | | | * libthreads/Makefile (lndist, lndist-map-file): New targets. Link `libthreads.map' to the distribution directory.
* | Fix "make dist" in `libcons'.Ludovic Courtès2010-08-011-2/+2
| | | | | | | | * libcons/Makefile (LCLHDRS): Add `$(installhdrs)'.
* | Fix "make dist" in `include'.Ludovic Courtès2010-08-011-1/+4
| | | | | | | | | | * include/Makefile (lndist): New target. Copy `Makefile' and `$(installhdrs)' to the distribution directory.
* | Fix "make dist" in `exec'.Ludovic Courtès2010-08-011-4/+8
| | | | | | | | | | | | | | * exec/Makefile (SRCS): Refer to `$(gzip-sources)' and `$(bzip2-sources)' instead of listing files individually. (gzip-sources, bzip2-sources): New variable. (gzip-objects, bzip2-objects): Derive from the above variables.
* | Fix "make dist" in `daemons'.Ludovic Courtès2010-08-011-2/+2
| | | | | | | | * daemons/Makefile (SRCS): Add `runsystem.sh'.
* | Fix "make dist" in `console-client'.Ludovic Courtès2010-08-011-6/+7
| | | | | | | | | | | | | | | | | | | | | | This patch updates the list of headers to be included in the distribution, and makes it so that `kdioctlServer.c' isn't built and distributed by "make dist". * console-client/Makefile (PC_KBD_SO_SRCS): Remove `kdioctlServer.c'. (LCLHDRS): Remove `vga.h', add `vga-support.h' and `trans.h'. (OBJS): Add `kdioctlServer.o'. (pc_kbd.so.$(hurd-version)): Add dependency on `kdioctlServer_pic.o'.