Commit Graph

4307 Commits

Author SHA1 Message Date
jmmv b077bb7f72 Honor the user's umask while creating local sockets. Several other systems
do already this (such as FreeBSD, OpenBSD and Linux), so it will improve
portability of some third-party programs.  No objections in tech-kern@.
2005-08-30 15:03:04 +00:00
jmmv 0562a5484c Make all creation operations (mkdir, create, mknod and symlink) consistent
by changing the symlink one to set vap's vatype to VLNK.  All the other three
already set vatype to the correct type.  Note that, however, in the mkdir
case (and now symlink too) this is not strictly necessary.
2005-08-30 09:37:41 +00:00
drochner a45a6c9839 in mapply(), call config_match() instead duplicating its code 2005-08-29 19:13:48 +00:00
reinoud f4a3f04cb2 Create functions ioctl_copyin() and ioctl_copyout(). They are meant to be
used in ioctl routines to do the right thing when the FKIOCTL flag is
passed to the IOCTL routine indicating its a in-kernel VOP_IOCTL call and
indirect addresses provided in the arguments are to be seen as kernel
adresses rather than userland adresses.

A simple substitution and prepending of the `flags' passed on to the ioctl
handler is enough to DTRT.
2005-08-28 20:58:14 +00:00
yamt 9020ca379a protect p_nrlwps by sched_lock. no objection on tech-kern@. PR/29652. 2005-08-28 14:57:18 +00:00
drochner f557755d9f nuke locdesc_t from orbit 2005-08-26 14:20:40 +00:00
drochner 90c378642f now that we have information about default locator values
we can implement an universal submatch() function covering all
the standard cases:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function
2005-08-25 22:17:19 +00:00
drochner fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
drochner 6036af9fc4 Replace the "locnames", attached to cfdata, which was solely good for
userconf, by more complete information (including default values) about
interface attributes, attached to the drivers which provide them.
2005-08-25 15:06:28 +00:00
simonb fbcb9c4760 Fix a tyop in a comment. 2005-08-24 16:00:54 +00:00
christos 62ea392e41 in setgroups(), sort -u the gid_t array to make sure that comparisons are
consistent.
2005-08-23 07:58:58 +00:00
rillig 20f0c3a484 Bugfix: In crcmp, compare n group IDs instead of only n bytes.
Added a big FIXME because two group lists containing the same entries,
but ordered differently, still compare as unequal. The same holds if one
group list contains an entry twice while the other does not. ok'ed by
christos.
2005-08-22 15:10:50 +00:00
yamt ebfab35576 old_sysctl: fix null dereference when oldlenp == NULL. 2005-08-21 13:14:54 +00:00
yamt 6f645a09cb introduce a variant of disk_attach/detach, for pseudo disks
which is opened by user before being attached.
2005-08-20 12:00:01 +00:00
christos b33f6da979 more 64 bit inode lossage. 2005-08-19 16:58:29 +00:00
elad 5f794fb20d Introduce veriexec_renamechk().
Rename policy:
  - Strict levels 0, 1: Log renames of monitored files.
  - Strict level 2: Prevent renames of monitored files.
  - Strict level 3: Prevent renames.
2005-08-19 12:30:02 +00:00
christos 50f8955b6e 64 bit inode changes. 2005-08-19 02:04:03 +00:00
christos d2d5cc4265 Better debugging info on failure 2005-08-19 02:04:02 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
yamt 2e85eff671 - introduce M_MOVE_PKTHDR and use it where appropriate.
intended to be mostly API compatible with openbsd/freebsd.
- remove a glue #define in netipsec/ipsec_osdep.h.
2005-08-18 00:30:58 +00:00
elad c62f8b0f18 The veriexec API uses dev_t and ino_t for device and inode numbers.
VOP_GETATTR() fills a struct vattr, where va_fsid and va_fileid (device
and inode..) are typed as long.

Add some casts when using these values and surround them with XXXs about
the potential size mismatch, as long can be 64 bits but dev_t and ino_t
are always 32 bits. This is safe because *for now* we're still using
32 bit inode numbers.

Discussed with blymn@.
2005-08-13 12:56:44 +00:00
elad 79b2f66712 Fix printing formats.
- size_t is %zu
  - dev_t is uint32_t is %u
  - long is %ld
2005-08-13 12:08:34 +00:00
blymn 01d37a82c0 Remove the tape stats from here, they caused issues on non-scsipi
architectures.
2005-08-13 10:48:27 +00:00
yamt 5a3ce82137 exit_lwps: fix a race with eg. sa_setwoken.
ie. "exit_lwps: lwp_wait1 failed with error 11"
PR/30689.
2005-08-10 09:44:02 +00:00
yamt 98d4a17db9 exit_lwps: fix a race which causes a panic "setrunnable: lwp %p state was %d". 2005-08-10 09:42:03 +00:00
blymn c0065dc0df Don't include tape stats functions if no devices configured. 2005-08-08 12:12:30 +00:00
blymn ad6c334dcd Add tape statistics gathering functions. 2005-08-07 12:28:34 +00:00
yamt f37bf52fce sysctl_create: remove an unused variable. 2005-08-07 04:54:07 +00:00
jmmv 5aff10d277 Fix some typos in comments. 2005-08-05 13:22:23 +00:00
jmmv 060dc147c7 Fix wording in a comment. 2005-08-05 13:18:32 +00:00
junyoung fb1a9a3413 Use NULL where appropriate. 2005-08-05 11:14:32 +00:00
junyoung 28f7bf4885 Cosmetic changes. 2005-08-05 11:05:44 +00:00
junyoung 683f615a8f Move proc0 initialization from main() in init_main.c and proc0_insert() in
kern_proc.c into a new function proc0_init() in kern_proc.c, as suggested
on tech-kern@ days ago.
2005-08-05 11:03:18 +00:00
elad 6e4a854552 Support multiple entry types. Direct, indirect, and file can now be
combined in the signatures file using commas.
2005-08-02 16:14:10 +00:00
elad f73e4c7b31 Simplify previous commit. 2005-07-29 22:57:34 +00:00
elad 3c0a7f641b Use real executed program in logs instead of the script that was executed.
For example, this used to give false logs of matching fingerprint for
foo.sh while foo.sh don't have an entry, and the program executed (and
matching the fingerprint) is the interpreter - /bin/sh.
2005-07-29 22:37:11 +00:00
elad 753edff337 #ifdef VERIFIED_EXEC 2005-07-29 14:49:00 +00:00
christos 5d719b264e In the SIGIO case, only check that we are the controlling tty if we are a
session leader.
2005-07-25 17:32:03 +00:00
peter cea97248d3 Fix an off-by-one in checking the return value of strlcpy(9).
Reviewed by atatat.
2005-07-23 23:34:52 +00:00
cube 875e65cda6 Introduce __sigtimedwait1 which will help adding COMPAT_NETBSD32 support
for __sigtimedwait(2).
2005-07-23 22:02:13 +00:00
cube 2844b7b432 Split sys_timer_create, sys_timer_gettime and sys_timer_settime so they
can be easily used by netbsd32 code.

XXX Meanwhile, introduce a copyinout_t type that matches the prototype of
XXX copyin(9) and copyout(9).  Its logical place would be in systm.h, near
XXX the definition of copyin, but, well, see the comment.
2005-07-23 18:54:07 +00:00
erh 5a521f35e0 Fix a null vp panic when creating a file at veriexec strict level 3. 2005-07-23 18:19:51 +00:00
yamt b7bfe82866 update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.
2005-07-23 12:18:41 +00:00
junyoung 06e730ed76 More cosmetic changes. 2005-07-17 23:53:57 +00:00
junyoung a226b79f42 Make code prettier. 2005-07-17 23:49:49 +00:00
christos 9213de1869 catch up with verified exec defopt changes. 2005-07-17 05:22:34 +00:00
christos 1510fe1543 defopt verified_exec. 2005-07-16 22:47:18 +00:00
simonb bf458186f4 White space KNF nit. 2005-07-15 03:59:31 +00:00
christos 190b607a00 Add missing const. Reported by Allar Ritter in tech-kern. 2005-07-13 04:24:26 +00:00
cube 355bcba766 Split sys_execve() and add execve1() that does most of the work, and takes
as an argument a function that will retrieve an element of the pointer
arrays in user space.  This allows COMPAT_NETBSD32 to share the code for
the emulated version of execve(2), and fixes various issues that came from
the slow drift between the two implementations.

Note:  when splitting up a syscall function, I'll use two different ways
       of naming the resulting helper function.  If it stills does
       copyin/out operations, it will be named <syscall>1().  If it does
       not (as it was the case for get/setitimer), it will be named
       do<syscall>.
2005-07-11 20:15:26 +00:00