CVS commit: src/lib/libperfuse

2010-09-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep  9 09:12:35 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h

Log Message:
- call FSYNCDIR for directories
- directories can be open R/W (for FSYNCDIR)
- do not skip calls to FSYNC or FSYNCDIR if the filesystem returned ENOSYS:
it may change its mind, and it may also actually do something when retunring
ENOSYS
- When FSYNC and FSYNCDIR return ENOSYS, do not report it to kernel (silent
failure)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse_priv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.13 src/lib/libperfuse/ops.c:1.14
--- src/lib/libperfuse/ops.c:1.13	Tue Sep  7 16:58:13 2010
+++ src/lib/libperfuse/ops.c	Thu Sep  9 09:12:35 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.13 2010/09/07 16:58:13 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.14 2010/09/09 09:12:35 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -62,7 +62,7 @@
 static void requeue_request(struct puffs_usermount *, 
 puffs_cookie_t opc, enum perfuse_qtype);
 static int dequeue_requests(struct perfuse_state *, 
- puffs_cookie_t opc, enum perfuse_qtype, int);
+puffs_cookie_t opc, enum perfuse_qtype, int);
 #define DEQUEUE_ALL 0
 
 /* 
@@ -359,6 +359,10 @@
 	 */
 	error = XCHG_MSG(ps, pu, pm, sizeof(struct fuse_attr_out));
 
+	/*
+	 * The parent directory needs a sync
+	 */
+	PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_DIRTY;
 out:
 	ps-ps_destroy_msg(pm);
 
@@ -1010,6 +1014,10 @@
 	fuse_attr_to_vap(ps, pn-pn_va, feo-attr);
 	puffs_newinfo_setcookie(pni, pn);
 
+	/*
+	 * The parent directory needs a sync
+	 */
+	PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_DIRTY;
 out: 
 	ps-ps_destroy_msg(pm);
 
@@ -1132,11 +1140,7 @@
 	/*
 	 * Do not open twice, and do not reopen for reading
 	 * if we already have write handle.
-	 * Directories are always open with read access only, 
-	 * whatever flags we get.
 	 */
-	if (op == FUSE_OPENDIR)
-		mode = (mode  ~(FREAD|FWRITE)) | FREAD;
 	if ((mode  FREAD)  (pnd-pnd_flags  PND_RFH))
 		return 0;
 	if ((mode  FWRITE)  (pnd-pnd_flags  PND_WFH))
@@ -1543,6 +1547,7 @@
 	off_t offlo;
 	off_t offhi;
 {
+	int op;
 	perfuse_msg_t *pm;
 	struct perfuse_state *ps;
 	struct perfuse_node_data *pnd;
@@ -1553,18 +1558,16 @@
 	
 	pm = NULL;
 	open_self = 0;	
-
-	/* 
-	 * If we previously detected it as unimplemented,
-	 * skip the call to the filesystem.
-	 */
 	ps = puffs_getspecific(pu);
-	if (ps-ps_flags == PS_NO_FSYNC)
-		return ENOSYS;
+
+	if (puffs_pn_getvap((struct puffs_node *)opc)-va_type == VDIR) 
+		op = FUSE_FSYNCDIR;
+	else 		/* VREG but also other types such as VLNK */
+		op = FUSE_FSYNC;
 
 	/*
 	 * Do not sync if there are no change to sync
-	 * XXX remove that test if we implement mmap
+	 * XXX remove that test on files if we implement mmap
 	 */
 	pnd = PERFUSE_NODE_DATA(opc);
 #ifdef PERFUSE_DEBUG
@@ -1582,7 +1585,7 @@
 	 * glusterfs complain in such a situation:
 	 * FSYNC() ERR = -1 (Invalid argument)
 	 */
-	if (!(pnd-pnd_flags  PND_OPEN)) {
+	if (!(pnd-pnd_flags  PND_WFH)) {
 		if ((error = perfuse_node_open(pu, opc, FWRITE, pcr)) != 0)
 			goto out;
 		open_self = 1;
@@ -1593,7 +1596,7 @@
 	/*
 	 * If fsync_flags  is set, meta data should not be flushed.
 	 */
-	pm = ps-ps_new_msg(pu, opc, FUSE_FSYNC, sizeof(*ffi), NULL);
+	pm = ps-ps_new_msg(pu, opc, op, sizeof(*ffi), NULL);
 	ffi = GET_INPAYLOAD(ps, pm, fuse_fsync_in);
 	ffi-fh = fh;
 	ffi-fsync_flags = (flags  FFILESYNC) ? 0 : 1;
@@ -1622,8 +1625,11 @@
 #endif
 
 out:
+	/*
+	 * ENOSYS is not returned to kernel,
+	 */
 	if (error == ENOSYS)
-		ps-ps_flags |= PS_NO_FSYNC;
+		error = 0;
 
 	if (pm != NULL)
 		ps-ps_destroy_msg(pm);
@@ -1683,6 +1689,7 @@
 		DERRX(EX_SOFTWARE, %s: targ is NULL, __func__);
 
 	ps = puffs_getspecific(pu);
+	pnd = PERFUSE_NODE_DATA(opc);
 	pn = (struct puffs_node *)targ;
 	name = basename_r((char *)PNPATH(pn));
 	len = strlen(name) + 1;
@@ -1704,6 +1711,11 @@
 	/*
 	 * Reclaim should take care of decreasing pnd_childcount
 	 */
+
+	/*
+	 * The parent directory needs a sync
+	 */
+	PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_DIRTY;
 out:
 	ps-ps_destroy_msg(pm);
 
@@ -1890,6 +1902,10 @@
 
 	PERFUSE_NODE_DATA(targ)-pnd_flags |= PND_REMOVED;
 
+	/*
+	 * The parent directory needs a sync
+	 */
+	PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_DIRTY;
 out:
 	ps-ps_destroy_msg(pm);
 

Index: src/lib/libperfuse/perfuse_priv.h
diff -u src/lib/libperfuse/perfuse_priv.h:1.8 src/lib/libperfuse/perfuse_priv.h:1.9
--- src/lib/libperfuse/perfuse_priv.h:1.8	Mon Sep  6 01:40:24 2010
+++ src/lib/libperfuse/perfuse_priv.h	Thu Sep  9 09:12:35 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_priv.h,v 1.8 2010/09/06 01:40:24 manu Exp $ */
+/*  $NetBSD: perfuse_priv.h,v 1.9 2010/09/09 09:12:35 manu 

CVS commit: src/sys/rump/librump/rumpvfs

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 09:50:21 UTC 2010

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
Use proper locking before unbusying pages.

Caught after yesterday's changes by the test suite (the ffs snapshot
test, to be precise).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/rump/librump/rumpvfs/vm_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.20 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.21
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.20	Mon Sep  6 21:33:07 2010
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Thu Sep  9 09:50:21 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.20 2010/09/06 21:33:07 pooka Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.21 2010/09/09 09:50:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.20 2010/09/06 21:33:07 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.21 2010/09/09 09:50:21 pooka Exp $);
 
 #include sys/param.h
 
@@ -47,11 +47,13 @@
 void
 uvm_aio_aiodone(struct buf *bp)
 {
+	struct uvm_object *uobj;
 	int i, npages = bp-b_bufsize  PAGE_SHIFT;
 	struct vm_page **pgs;
 	vaddr_t va;
 	int pageout = 0;
 
+	KASSERT(npages  0);
 	pgs = kmem_alloc(npages * sizeof(*pgs), KM_SLEEP);
 	for (i = 0; i  npages; i++) {
 		va = (vaddr_t)bp-b_data + (i  PAGE_SHIFT);
@@ -65,7 +67,16 @@
 
 	uvm_pagermapout((vaddr_t)bp-b_data, npages);
 	uvm_pageout_done(pageout);
+
+	/* get uobj because we need it after pages might be recycled */
+	uobj = pgs[0]-uobject;
+	KASSERT(uobj);
+
+	mutex_enter(uobj-vmobjlock);
+	mutex_enter(uvm_pageqlock);
 	uvm_page_unbusy(pgs, npages);
+	mutex_exit(uvm_pageqlock);
+	mutex_exit(uobj-vmobjlock);
 
 	if (BUF_ISWRITE(bp)  (bp-b_cflags  BC_AGE) != 0) {
 		mutex_enter(bp-b_objlock);



CVS commit: src/tests/rump/kernspace

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 09:59:48 UTC 2010

Modified Files:
src/tests/rump/kernspace: busypage.c

Log Message:
hold object lock across page unbusy


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/rump/kernspace/busypage.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/rump/kernspace/busypage.c
diff -u src/tests/rump/kernspace/busypage.c:1.2 src/tests/rump/kernspace/busypage.c:1.3
--- src/tests/rump/kernspace/busypage.c:1.2	Wed Sep  8 20:40:24 2010
+++ src/tests/rump/kernspace/busypage.c	Thu Sep  9 09:59:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: busypage.c,v 1.2 2010/09/08 20:40:24 pooka Exp $	*/
+/*	$NetBSD: busypage.c,v 1.3 2010/09/09 09:59:48 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: busypage.c,v 1.2 2010/09/08 20:40:24 pooka Exp $);
+__RCSID($NetBSD: busypage.c,v 1.3 2010/09/09 09:59:48 pooka Exp $);
 #endif /* !lint */
 
 #include sys/param.h
@@ -83,9 +83,9 @@
 	mutex_enter(uobj-vmobjlock);
 	while (!threadrun)
 		cv_wait(tcv, uobj-vmobjlock);
-	mutex_exit(uobj-vmobjlock);
 
 	uvm_page_unbusy(testpg, 1);
+	mutex_exit(uobj-vmobjlock);
 
 	rv = kthread_join(newl);
 	if (rv)



CVS commit: src/sys/rump/librump/rumpvfs

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 10:01:25 UTC 2010

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
hold object lock across page unbusy


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/librump/rumpvfs/vm_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.21 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.22
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.21	Thu Sep  9 09:50:21 2010
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Thu Sep  9 10:01:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.21 2010/09/09 09:50:21 pooka Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.22 2010/09/09 10:01:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.21 2010/09/09 09:50:21 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.22 2010/09/09 10:01:25 pooka Exp $);
 
 #include sys/param.h
 
@@ -114,10 +114,10 @@
 		return;
 
 	pgs = kmem_alloc(maxpages * sizeof(pgs), KM_SLEEP);
+	mutex_enter(uobj-vmobjlock);
 	while (len) {
 		npages = MIN(maxpages, round_page(len)  PAGE_SHIFT);
 		memset(pgs, 0, npages * sizeof(struct vm_page *));
-		mutex_enter(uobj-vmobjlock);
 		rv = uobj-pgops-pgo_get(uobj, trunc_page(off),
 		pgs, npages, 0, VM_PROT_READ | VM_PROT_WRITE,
 		0, PAGERFLAGS | PGO_PASTEOF);
@@ -142,8 +142,10 @@
 			off += chunklen;
 			len -= chunklen;
 		}
+		mutex_enter(uobj-vmobjlock);
 		uvm_page_unbusy(pgs, npages);
 	}
+	mutex_exit(uobj-vmobjlock);
 	kmem_free(pgs, maxpages * sizeof(pgs));
 
 	return;
@@ -170,10 +172,10 @@
 	if (flags  UBC_FAULTBUSY)
 		pagerflags |= PGO_OVERWRITE;
 
+	mutex_enter(uobj-vmobjlock);
 	do {
 		npages = len2npages(uio-uio_offset, todo);
 		memset(pgs, 0, pgalloc);
-		mutex_enter(uobj-vmobjlock);
 		rv = uobj-pgops-pgo_get(uobj, trunc_page(uio-uio_offset),
 		pgs, npages, 0, VM_PROT_READ | VM_PROT_WRITE, 0,
 		pagerflags);
@@ -198,8 +200,10 @@
 pg-flags = ~(PG_CLEAN | PG_FAKE);
 			todo -= xfersize;
 		}
+		mutex_enter(uobj-vmobjlock);
 		uvm_page_unbusy(pgs, npages);
 	} while (todo);
+	mutex_exit(uobj-vmobjlock);
 
  out:
 	kmem_free(pgs, pgalloc);



CVS commit: src/sys/rump/librump/rumpkern

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 10:02:14 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
Assert that object is locked in page unbusy.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.93 src/sys/rump/librump/rumpkern/vm.c:1.94
--- src/sys/rump/librump/rumpkern/vm.c:1.93	Wed Sep  8 21:14:32 2010
+++ src/sys/rump/librump/rumpkern/vm.c	Thu Sep  9 10:02:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -484,6 +484,9 @@
 	struct vm_page *pg;
 	int i;
 
+	KASSERT(npgs  0);
+	KASSERT(mutex_owned(pgs[0]-uobject-vmobjlock));
+
 	for (i = 0; i  npgs; i++) {
 		pg = pgs[i];
 		if (pg == NULL)



CVS commit: src/lib/libc/stdlib

2010-09-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep  9 10:19:31 UTC 2010

Modified Files:
src/lib/libc/stdlib: exit.c

Log Message:
Only do the __libc_init hack in libc, i.e. remove it from ld.elf_so.

This fixes hppa ld.elf_so by reducing the number of PLABELs required to
the number before the hack was applied.

Hi Joerg!


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/stdlib/exit.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/exit.c
diff -u src/lib/libc/stdlib/exit.c:1.12 src/lib/libc/stdlib/exit.c:1.13
--- src/lib/libc/stdlib/exit.c:1.12	Mon Jun 28 21:58:02 2010
+++ src/lib/libc/stdlib/exit.c	Thu Sep  9 10:19:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exit.c,v 1.12 2010/06/28 21:58:02 joerg Exp $	*/
+/*	$NetBSD: exit.c,v 1.13 2010/09/09 10:19:31 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)exit.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: exit.c,v 1.12 2010/06/28 21:58:02 joerg Exp $);
+__RCSID($NetBSD: exit.c,v 1.13 2010/09/09 10:19:31 skrll Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -45,10 +45,12 @@
 #include atexit.h
 #endif
 
+#ifdef _LIBC
 extern void __libc_init(void);
 #ifndef __lint
 static void (*force_ref)(void) __used = __libc_init;
 #endif
+#endif
 
 void (*__cleanup) __P((void));
 



CVS commit: src/usr.bin/find

2010-09-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Sep  9 11:42:14 UTC 2010

Modified Files:
src/usr.bin/find: find.1

Log Message:
Fix typos found by Ryo HAYASAKA in PR 43857.
While here, split file systems that grew together.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.bin/find/find.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/find/find.1
diff -u src/usr.bin/find/find.1:1.69 src/usr.bin/find/find.1:1.70
--- src/usr.bin/find/find.1:1.69	Fri Nov  6 21:03:12 2009
+++ src/usr.bin/find/find.1	Thu Sep  9 11:42:13 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: find.1,v 1.69 2009/11/06 21:03:12 dsl Exp $
+.\	$NetBSD: find.1,v 1.70 2010/09/09 11:42:13 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -276,8 +276,8 @@
 The string
 .Dq {}
 must appear, and must appear last.
-Each set is limitted to no more than 5,000 pathnames,
-and is also limitted such that the invokation of
+Each set is limited to no more than 5,000 pathnames,
+and is also limited such that the invocation of
 .Ar utility
 does not exceed
 .Dv ARG_MAX .
@@ -303,7 +303,7 @@
 .It Ic -exit Op Ar n
 This primary causes
 .Nm
-to stop traversing the filesystem and exit immediately if a
+to stop traversing the file system and exit immediately if a
 previous condition was met.
 If no value is specified, the exit value will be 0, else
 .Ar n .
@@ -361,7 +361,7 @@
 .Ar type .
 The
 .Xr sysctl 8
-command can be used to find out the types of filesystems
+command can be used to find out the types of file systems
 that are available on the system:
 .Bd -literal -offset indent
 sysctl vfs.generic.fstypes
@@ -708,7 +708,7 @@
 .Nm
 utility normally exits 0 on success, and exits with 1 under certain
 internal error conditions.
-If any invokations of
+If any invocations of
 .Dq Ic -exec Ar ... No +
 primaries return non-zero exit-status, then
 .Nm
@@ -839,7 +839,7 @@
 .Pp
 The
 .Ic -delete
-primary does not interact well with other options that cause the filesystem
+primary does not interact well with other options that cause the file system
 tree traversal options to be changed.
 .Sh HISTORY
 A much simpler



CVS commit: src/tests/fs/vfs

2010-09-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Sep  9 11:42:52 UTC 2010

Modified Files:
src/tests/fs/vfs: t_vnops.c

Log Message:
s/dirs/symlinks/ in USES_SYMLINKS message.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/vfs/t_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.8 src/tests/fs/vfs/t_vnops.c:1.9
--- src/tests/fs/vfs/t_vnops.c:1.8	Mon Sep  6 15:27:18 2010
+++ src/tests/fs/vfs/t_vnops.c	Thu Sep  9 11:42:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.8 2010/09/06 15:27:18 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.9 2010/09/09 11:42:52 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 
 #define USES_SYMLINKS	\
 if (FSTYPE_SYSVBFS(tc) || FSTYPE_MSDOS(tc))		\
-	atf_tc_skip(dirs not supported by file system)
+	atf_tc_skip(symlinks not supported by file system)
 
 static char *
 md(char *buf, const char *base, const char *tail)



CVS commit: src/sys/rump/librump/rumpvfs

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 12:18:39 UTC 2010

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
Release PG_PAGEOUT pages in aiodone.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/librump/rumpvfs/vm_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.22 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.23
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.22	Thu Sep  9 10:01:25 2010
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Thu Sep  9 12:18:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.22 2010/09/09 10:01:25 pooka Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.23 2010/09/09 12:18:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.22 2010/09/09 10:01:25 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.23 2010/09/09 12:18:39 pooka Exp $);
 
 #include sys/param.h
 
@@ -62,6 +62,7 @@
 			KASSERT((pgs[i]-flags  PG_FAKE) == 0);
 			pageout++;
 			pgs[i]-flags = ~PG_PAGEOUT;
+			pgs[i]-flags |= PG_RELEASED;
 		}
 	}
 



CVS commit: src/sys/rump/librump/rumpkern

2010-09-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Sep  9 12:23:07 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
* unlock object in error branch
* fix typo (not in comment)
* improve indentation tailspin


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.94 src/sys/rump/librump/rumpkern/vm.c:1.95
--- src/sys/rump/librump/rumpkern/vm.c:1.94	Thu Sep  9 10:02:14 2010
+++ src/sys/rump/librump/rumpkern/vm.c	Thu Sep  9 12:23:06 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.95 2010/09/09 12:23:06 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.95 2010/09/09 12:23:06 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -207,6 +207,7 @@
 	struct uvm_object *uobj = pg-uobject;
 
 	KASSERT(mutex_owned(uvm_pageqlock));
+	KASSERT(mutex_owned(uobj-vmobjlock));
 
 	if (pg-flags  PG_WANTED)
 		wakeup(pg);
@@ -815,6 +816,28 @@
 	/* could wakeup waiters, but just let the pagedaemon do it */
 }
 
+static bool
+processpage(struct vm_page *pg)
+{
+	struct uvm_object *uobj;
+
+	uobj = pg-uobject;
+	if (mutex_tryenter(uobj-vmobjlock)) {
+		if ((pg-flags  PG_BUSY) == 0) {
+			mutex_exit(uvm_pageqlock);
+			uobj-pgops-pgo_put(uobj, pg-offset,
+			pg-offset + PAGE_SIZE,
+			PGO_CLEANIT|PGO_FREE);
+			KASSERT(!mutex_owned(uobj-vmobjlock));
+			return true;
+		} else {
+			mutex_exit(uobj-vmobjlock);
+		}
+	}
+
+	return false;
+}
+
 /*
  * The Diabolical pageDaemon Director (DDD).
  */
@@ -832,21 +855,16 @@
 	for (;;) {
 		if (succ) {
 			kernel_map-flags = ~VM_MAP_WANTVA;
-			kmem_map-flags = VM_MAP_WANTVA;
+			kmem_map-flags = ~VM_MAP_WANTVA;
 			timo = 0;
+			if (pdaemon_waiters) {
+pdaemon_waiters = 0;
+cv_broadcast(oomwait);
+			}
 		}
 		succ = false;
 
-		/*
-		 * Wake up everyone regardless of perceived success.
-		 * They will just resleep if we're stil out of juice.
-		 */
-		if (pdaemon_waiters) {
-			pdaemon_waiters = 0;
-			cv_broadcast(oomwait);
-		}
-
-		cv_timedwait(pdaemoncv, pdaemonmtx, 0);
+		cv_timedwait(pdaemoncv, pdaemonmtx, timo);
 		uvmexp.pdwoke++;
 
 		/* tell the world that we are hungry */
@@ -881,7 +899,6 @@
 		while (cleaned  PAGEDAEMON_OBJCHUNK) {
 			skipped = 0;
 			TAILQ_FOREACH(pg, vmpage_lruqueue, pageq.queue) {
-struct uvm_object *uobj;
 
 /*
  * skip over pages we _might_ have tried
@@ -892,17 +909,9 @@
 while (skipped++  skip)
 	continue;
 
-uobj = pg-uobject;
-if (mutex_tryenter(uobj-vmobjlock)) {
-	if ((pg-flags  PG_BUSY) == 0) {
-		mutex_exit(uvm_pageqlock);
-		uobj-pgops-pgo_put(uobj,
-		pg-offset,
-		pg-offset + PAGE_SIZE,
-		PGO_CLEANIT|PGO_FREE);
-		cleaned++;
-		goto again;
-	}
+if (processpage(pg)) {
+	cleaned++;
+	goto again;
 }
 
 skip++;
@@ -957,7 +966,7 @@
 		if (!succ) {
 			rumpuser_dprintf(pagedaemoness: failed to reclaim 
 			memory ... sleeping (deadlock?)\n);
-			kpause(dpdd, false, hz, NULL);
+			timo = hz;
 		}
 
 		mutex_enter(pdaemonmtx);



CVS commit: src/sys/dev/ic

2010-09-09 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Sep  9 14:50:25 UTC 2010

Modified Files:
src/sys/dev/ic: esiop.c siop.c

Log Message:
Allow e?siop_dump_script() to work with on-chip RAM.  Prefix
DUMP_SCRIPT with SIOP_.  Additionally, avoid undefining DEBUG,
condition on SIOP_DEBUG instead.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/esiop.c
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ic/siop.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/esiop.c
diff -u src/sys/dev/ic/esiop.c:1.53 src/sys/dev/ic/esiop.c:1.54
--- src/sys/dev/ic/esiop.c:1.53	Sun May  2 17:37:52 2010
+++ src/sys/dev/ic/esiop.c	Thu Sep  9 14:50:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: esiop.c,v 1.53 2010/05/02 17:37:52 jakllsch Exp $	*/
+/*	$NetBSD: esiop.c,v 1.54 2010/09/09 14:50:25 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2002 Manuel Bouyer.
@@ -28,7 +28,7 @@
 /* SYM53c7/8xx PCI-SCSI I/O Processors driver */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: esiop.c,v 1.53 2010/05/02 17:37:52 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: esiop.c,v 1.54 2010/09/09 14:50:25 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,15 +56,12 @@
 
 #include opt_siop.h
 
-#ifndef DEBUG
-#undef DEBUG
-#endif
 /*
 #define SIOP_DEBUG
 #define SIOP_DEBUG_DR
 #define SIOP_DEBUG_INTR
 #define SIOP_DEBUG_SCHED
-#define DUMP_SCRIPT
+#define SIOP_DUMP_SCRIPT
 */
 
 #define SIOP_STATS
@@ -197,7 +194,7 @@
 	 * siop_reset() will reset the chip, thus clearing pending interrupts
 	 */
 	esiop_reset(sc);
-#ifdef DUMP_SCRIPT
+#ifdef SIOP_DUMP_SCRIPT
 	esiop_dump_script(sc);
 #endif
 
@@ -575,7 +572,7 @@
 			printf(scsi gross error\n);
 			if (esiop_target)
 esiop_target-target_c.flags = ~TARF_DT;
-#ifdef DEBUG
+#ifdef SIOP_DEBUG
 			printf(DSA=0x%x DSP=0x%lx\n,
 			bus_space_read_4(sc-sc_c.sc_rt, sc-sc_c.sc_rh,
 			SIOP_DSA),
@@ -1859,12 +1856,11 @@
 
 	for (i = 0; i  PAGE_SIZE / 4; i += 2) {
 		printf(0x%04x: 0x%08x 0x%08x, i * 4,
-		le32toh(sc-sc_c.sc_script[i]),
-		le32toh(sc-sc_c.sc_script[i + 1]));
-		if ((le32toh(sc-sc_c.sc_script[i])  0xe000) ==
-		0xc000) {
+		esiop_script_read(sc, i),
+		esiop_script_read(sc, i + 1));
+		if ((esiop_script_read(sc, i)  0xe000) == 0xc000) {
 			i++;
-			printf( 0x%08x, le32toh(sc-sc_c.sc_script[i + 1]));
+			printf( 0x%08x, esiop_script_read(sc, i + 1));
 		}
 		printf(\n);
 	}
@@ -1927,7 +1923,7 @@
 		unable to load cbd DMA map, error = %d\n, error);
 		goto bad0;
 	}
-#ifdef DEBUG
+#ifdef SIOP_DEBUG
 	aprint_debug_dev(sc-sc_c.sc_dev, alloc newcdb at PHY addr 0x%lx\n,
 	(unsigned long)newcbd-xferdma-dm_segs[0].ds_addr);
 #endif
@@ -2056,7 +2052,7 @@
 		unable to load tbl DMA map, error = %d\n, error);
 		goto bad0;
 	}
-#ifdef DEBUG
+#ifdef SIOP_DEBUG
 	printf(%s: alloc new tag DSA table at PHY addr 0x%lx\n,
 	device_xname(sc-sc_c.sc_dev),
 	(unsigned long)newtblblk-blkmap-dm_segs[0].ds_addr);

Index: src/sys/dev/ic/siop.c
diff -u src/sys/dev/ic/siop.c:1.96 src/sys/dev/ic/siop.c:1.97
--- src/sys/dev/ic/siop.c:1.96	Sun May  2 17:37:52 2010
+++ src/sys/dev/ic/siop.c	Thu Sep  9 14:50:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop.c,v 1.96 2010/05/02 17:37:52 jakllsch Exp $	*/
+/*	$NetBSD: siop.c,v 1.97 2010/09/09 14:50:25 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -28,7 +28,7 @@
 /* SYM53c7/8xx PCI-SCSI I/O Processors driver */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.96 2010/05/02 17:37:52 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.97 2010/09/09 14:50:25 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,15 +56,12 @@
 
 #include opt_siop.h
 
-#ifndef DEBUG
-#undef DEBUG
-#endif
 /*
 #define SIOP_DEBUG
 #define SIOP_DEBUG_DR
 #define SIOP_DEBUG_INTR
 #define SIOP_DEBUG_SCHED
-#define DUMP_SCRIPT
+#define SIOP_DUMP_SCRIPT
 */
 
 #define SIOP_STATS
@@ -174,7 +171,7 @@
 	 * siop_reset() will reset the chip, thus clearing pending interrupts
 	 */
 	siop_reset(sc);
-#ifdef DUMP_SCRIPT
+#ifdef SIOP_DUMP_SCRIPT
 	siop_dump_script(sc);
 #endif
 
@@ -1604,13 +1601,11 @@
 
 	for (i = 0; i  PAGE_SIZE / 4; i += 2) {
 		printf(0x%04x: 0x%08x 0x%08x, i * 4,
-		siop_ctoh32(sc-sc_c, sc-sc_c.sc_script[i]),
-		siop_ctoh32(sc-sc_c, sc-sc_c.sc_script[i + 1]));
-		if ((siop_ctoh32(sc-sc_c,
-		sc-sc_c.sc_script[i])  0xe000) == 0xc000) {
+		siop_script_read(sc, i),
+		siop_script_read(sc, i + 1));
+		if ((siop_script_read(sc, i)  0xe000) == 0xc000) {
 			i++;
-			printf( 0x%08x, siop_ctoh32(sc-sc_c,
-			 sc-sc_c.sc_script[i + 1]));
+			printf( 0x%08x, siop_script_read(sc, i + 1));
 		}
 		printf(\n);
 	}
@@ -1675,7 +1670,7 @@
 		error);
 		goto bad0;
 	}
-#ifdef DEBUG
+#ifdef SIOP_DEBUG
 	printf(%s: alloc newcdb at PHY addr 0x%lx\n,
 	device_xname(sc-sc_c.sc_dev),
 	(unsigned 

CVS commit: src/distrib/sets/lists/tests

2010-09-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep  9 22:20:09 UTC 2010

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
add tests for glob


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/distrib/sets/lists/tests/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.143 src/distrib/sets/lists/tests/mi:1.144
--- src/distrib/sets/lists/tests/mi:1.143	Thu Sep  9 07:38:15 2010
+++ src/distrib/sets/lists/tests/mi	Thu Sep  9 18:20:09 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.143 2010/09/09 11:38:15 njoly Exp $
+# $NetBSD: mi,v 1.144 2010/09/09 22:20:09 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -283,6 +283,8 @@
 ./usr/libdata/debug/usr/tests/lib/csu/h_initfini3.debug			tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/csu/libh_initfini3_dso.so.1.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc	tests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob_star.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/hashtests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/hash/t_sha2.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlibtests-lib-debug
@@ -1425,6 +1427,9 @@
 ./usr/tests/lib/csu/t_crt0			tests-lib-tests		atf
 ./usr/tests/lib/libctests-lib-tests
 ./usr/tests/lib/libc/Atffile			tests-lib-tests		atf
+./usr/tests/lib/libc/gen			tests-lib-tests
+./usr/tests/lib/libc/gen/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/gen/t_glob_star		tests-lib-tests		atf
 ./usr/tests/lib/libc/hash			tests-lib-tests
 ./usr/tests/lib/libc/hash/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/hash/t_sha2		tests-lib-tests		atf



CVS commit: src/etc/mtree

2010-09-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep  9 22:21:41 UTC 2010

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
add glob tests.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/etc/mtree/NetBSD.dist.base

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.49 src/etc/mtree/NetBSD.dist.base:1.50
--- src/etc/mtree/NetBSD.dist.base:1.49	Wed Aug 25 12:44:25 2010
+++ src/etc/mtree/NetBSD.dist.base	Thu Sep  9 18:21:41 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.49 2010/08/25 16:44:25 jmmv Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.50 2010/09/09 22:21:41 christos Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -231,6 +231,7 @@
 ./usr/libdata/debug/usr/tests/lib
 ./usr/libdata/debug/usr/tests/lib/csu
 ./usr/libdata/debug/usr/tests/lib/libc
+./usr/libdata/debug/usr/tests/lib/libc/gen
 ./usr/libdata/debug/usr/tests/lib/libc/hash
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib
 ./usr/libdata/debug/usr/tests/lib/libdes
@@ -1167,6 +1168,7 @@
 ./usr/tests/lib
 ./usr/tests/lib/csu
 ./usr/tests/lib/libc
+./usr/tests/lib/libc/gen
 ./usr/tests/lib/libc/hash
 ./usr/tests/lib/libc/stdlib
 ./usr/tests/lib/libdes



CVS commit: src/tests/lib/libc

2010-09-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep  9 22:25:38 UTC 2010

Modified Files:
src/tests/lib/libc: Makefile

Log Message:
glue glob tests


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/Makefile
diff -u src/tests/lib/libc/Makefile:1.5 src/tests/lib/libc/Makefile:1.6
--- src/tests/lib/libc/Makefile:1.5	Tue Jul 13 17:13:26 2010
+++ src/tests/lib/libc/Makefile	Thu Sep  9 18:25:38 2010
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2010/07/13 21:13:26 jmmv Exp $
+# $NetBSD: Makefile,v 1.6 2010/09/09 22:25:38 christos Exp $
 
 .include bsd.own.mk
 
-TESTS_SUBDIRS+=	hash stdlib
+TESTS_SUBDIRS+=	gen hash stdlib
 
 # Disabled for now, only test in there is very expensive
 #SUBDIR+=	 string



CVS commit: src/crypto/external/bsd/netpgp/dist/src/libpaa

2010-09-09 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Sep 10 05:15:16 UTC 2010

Added Files:
src/crypto/external/bsd/netpgp/dist/src/libpaa:
PubKeyAccessAuthScheme.txt client.c libpaa.3 libpaa.c libpaa.h
server.c

Log Message:
Add an implementation of the Pubkey Access Authentication Scheme proposed
by Oliver Gould in

http://www.olix0r.net/PubKeyAccessAuthScheme.txt

This implementation includes an example client and server program, but
is not (yet) hooked into the build.

To quote from Oliver's RFC:

HTTP services are a core Internet technology, yet the Digest
authentication scheme provided by RFC 2617 only describes
authentication by way of shared-secrets (i.e.  passwords).
This model has operational drawbacks, as authenticating
services are required to have access to a user's secret (or a
hash thereof), or retrograde technologies, such as cookies,
are employed.

Similarly to SSH's publickey authentication method [RFC
4252], the PubKey Access Authentication scheme allows an HTTP
server to authenticate clients using public key credentials.

Like the Digest Access Authentication Scheme [RFC 2617], the
PubKey.v1 scheme is based on a simple challenge-response
paradigm.  The PubKey scheme responds to unauthorized clients
with a challenge value; and a valid response contains a
cryptographic signature of client's id, the authentication
realm, and the server's challenge.

The client's secret never leaves the client.  The server
verifies the client's signed authorization request with the
client's published public keys.

libpaa(3) uses libnetpgp(3) for its digital signatures, SHA1Init(3)
for digests, and base64 encoding for transmission of data.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/crypto/external/bsd/netpgp/dist/src/libpaa/PubKeyAccessAuthScheme.txt \
src/crypto/external/bsd/netpgp/dist/src/libpaa/client.c \
src/crypto/external/bsd/netpgp/dist/src/libpaa/libpaa.3 \
src/crypto/external/bsd/netpgp/dist/src/libpaa/libpaa.c \
src/crypto/external/bsd/netpgp/dist/src/libpaa/libpaa.h \
src/crypto/external/bsd/netpgp/dist/src/libpaa/server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/crypto/external/bsd/netpgp/dist/src/libpaa/PubKeyAccessAuthScheme.txt
diff -u /dev/null src/crypto/external/bsd/netpgp/dist/src/libpaa/PubKeyAccessAuthScheme.txt:1.1
--- /dev/null	Fri Sep 10 05:15:16 2010
+++ src/crypto/external/bsd/netpgp/dist/src/libpaa/PubKeyAccessAuthScheme.txt	Fri Sep 10 05:15:16 2010
@@ -0,0 +1,417 @@
+-BEGIN PGP SIGNED MESSAGE-
+Hash: SHA1
+
+DRAFT VERSION 0.4.2
+
+
+Oliver Vaughn Gould v...@olix0r.net
+July 2010
+
+
+  PubKey Access Authentication Scheme, Version 1
+  --
+
+  0  Introduction
+  --
+
+  0.1  Status of this Memo
+  
+
+This document specifies a DRAFT protocol for the Internet community.
+
+
+  0.2  Copyright Notice
+  -
+
+Copyright (C) Yahoo!, Inc. (2010).  All rights reseved.
+
+
+  0.3  Abstract
+  -
+
+HTTP services are a core Internet technology, yet the Digest authentication
+scheme provided by RFC 2617 only describes authentication by way of
+shared-secrets (i.e. passwords).
+
+The PubKey Access Authentication scheme aims to enhance security on the
+World Wide Web by bringing an equivalent of SSH's publickey authentication
+method to challenge-based HTTP client authentication.
+
+
+  0.4  Table of Contents
+  --
+
+  1  PubKey Access Authentication Scheme, Version 1
+  1.1  Introduction
+  1.1.1  Purpose
+  1.1.2  Overall Operation
+  1.2  Specification of PubKey.v1 Headers
+  1.2.1  The WWW-Authenticate Response Header
+  1.2.2  The Authorize Request Header
+  1.3  Example
+  1.4  Proxy-Authentication and Proxy-Authorization
+  1.5  Operational Considerations
+  1.5.1  Replay Attacks
+  1.5.2  Man-in-the-Middle Attacks
+  1.5.3  Brute Force Attacks
+  1.5.4  Spoofing by Counterfeit Servers
+  2  References
+  A  Appendices
+  A.1  Challenge Generation
+
+
+  1  PubKey Access Authentication Scheme, Version 1
+  -
+
+  1.1  Introduction
+  -
+
+  1.1.1  Purpose
+  --
+
+HTTP services are a core Internet technology, yet the Digest authentication
+scheme provided by RFC 2617 only describes authentication by way of
+shared-secrets (i.e. passwords).  This model has operational drawbacks, as
+authenticating services are required to have access to a user's secret (or
+a hash thereof), or retrograde technologies, such as cookies, are employed.
+
+Similarly to SSH's publickey authentication method [RFC 4252], the PubKey
+Access Authentication scheme 

CVS commit: src/crypto/external/bsd/netpgp/libpaa

2010-09-09 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Sep 10 05:29:12 UTC 2010

Added Files:
src/crypto/external/bsd/netpgp/libpaa: Makefile shlib_version

Log Message:
Add build glue for libpaa (not yet hooked into the build)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/netpgp/libpaa/Makefile \
src/crypto/external/bsd/netpgp/libpaa/shlib_version

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/crypto/external/bsd/netpgp/libpaa/Makefile
diff -u /dev/null src/crypto/external/bsd/netpgp/libpaa/Makefile:1.1
--- /dev/null	Fri Sep 10 05:29:12 2010
+++ src/crypto/external/bsd/netpgp/libpaa/Makefile	Fri Sep 10 05:29:12 2010
@@ -0,0 +1,33 @@
+#	$NetBSD: Makefile,v 1.1 2010/09/10 05:29:12 agc Exp $
+
+.include bsd.own.mk
+
+USE_FORT?= yes
+
+LIB=		paa
+
+SRCS=		b64.c libpaa.c
+CPPFLAGS+=	-I${.CURDIR}/../dist/include -I${.CURDIR}/../dist/src/pgp2ssh
+
+LIBDPLIBS+=	mj	${.CURDIR}/../libmj
+LIBDPLIBS+=	netpgp	${.CURDIR}/../lib
+LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto
+LIBDPLIBS+=	z	${NETBSDSRCDIR}/lib/libz
+LIBDPLIBS+=	bz2	${NETBSDSRCDIR}/lib/libbz2
+
+MAN=		libpaa.3
+WARNS=		4
+
+.PATH: ${.CURDIR}/../dist/src/pgp2ssh ${.CURDIR}/../dist/src/libpaa
+
+INCS+= libpaa.h
+INCSDIR=/usr/include
+
+.include bsd.lib.mk
+
+SUBDIR+=	client server
+
+.include bsd.subdir.mk
+
+t:
+	server/paaserver -r authenticat...@bigco.com
Index: src/crypto/external/bsd/netpgp/libpaa/shlib_version
diff -u /dev/null src/crypto/external/bsd/netpgp/libpaa/shlib_version:1.1
--- /dev/null	Fri Sep 10 05:29:12 2010
+++ src/crypto/external/bsd/netpgp/libpaa/shlib_version	Fri Sep 10 05:29:12 2010
@@ -0,0 +1,2 @@
+major=0
+minor=0