summaryrefslogtreecommitdiff
path: root/security/sfs
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2006-10-21 11:53:13 +0000
committeragc <agc@pkgsrc.org>2006-10-21 11:53:13 +0000
commit94df3e688cac5144cf434b7934396ecf03cf7160 (patch)
tree8eb2eba29304cfef5372605e2a4748693d54c4a5 /security/sfs
parent2d3543e64fc48a08a0b41e60eb5ab49b3795c447 (diff)
downloadpkgsrc-94df3e688cac5144cf434b7934396ecf03cf7160.tar.gz
Update sfs to 0.7.2nb7
+ add support for gcc4
Diffstat (limited to 'security/sfs')
-rw-r--r--security/sfs/Makefile6
-rw-r--r--security/sfs/distinfo48
-rw-r--r--security/sfs/patches/patch-aa53
-rw-r--r--security/sfs/patches/patch-ab13
-rw-r--r--security/sfs/patches/patch-ac13
-rw-r--r--security/sfs/patches/patch-ad13
-rw-r--r--security/sfs/patches/patch-ae35
-rw-r--r--security/sfs/patches/patch-af28
-rw-r--r--security/sfs/patches/patch-ag14
-rw-r--r--security/sfs/patches/patch-ah46
-rw-r--r--security/sfs/patches/patch-ai12
-rw-r--r--security/sfs/patches/patch-aj13
-rw-r--r--security/sfs/patches/patch-ak29
-rw-r--r--security/sfs/patches/patch-al63
-rw-r--r--security/sfs/patches/patch-am13
-rw-r--r--security/sfs/patches/patch-an31
-rw-r--r--security/sfs/patches/patch-ao18
-rw-r--r--security/sfs/patches/patch-ap13
-rw-r--r--security/sfs/patches/patch-aq31
-rw-r--r--security/sfs/patches/patch-ar76
-rw-r--r--security/sfs/patches/patch-as13
-rw-r--r--security/sfs/patches/patch-at149
-rw-r--r--security/sfs/patches/patch-au15
-rw-r--r--security/sfs/patches/patch-av12
-rw-r--r--security/sfs/patches/patch-aw65
-rw-r--r--security/sfs/patches/patch-ax17
-rw-r--r--security/sfs/patches/patch-ay52
-rw-r--r--security/sfs/patches/patch-az42
-rw-r--r--security/sfs/patches/patch-ba101
-rw-r--r--security/sfs/patches/patch-bb138
-rw-r--r--security/sfs/patches/patch-bc39
-rw-r--r--security/sfs/patches/patch-bd30
-rw-r--r--security/sfs/patches/patch-be40
-rw-r--r--security/sfs/patches/patch-bf22
-rw-r--r--security/sfs/patches/patch-bg130
-rw-r--r--security/sfs/patches/patch-bh22
-rw-r--r--security/sfs/patches/patch-bi13
-rw-r--r--security/sfs/patches/patch-bj31
-rw-r--r--security/sfs/patches/patch-bk13
-rw-r--r--security/sfs/patches/patch-bl13
-rw-r--r--security/sfs/patches/patch-bm27
-rw-r--r--security/sfs/patches/patch-bn49
-rw-r--r--security/sfs/patches/patch-bo40
-rw-r--r--security/sfs/patches/patch-bp58
-rw-r--r--security/sfs/patches/patch-bq31
-rw-r--r--security/sfs/patches/patch-br49
-rw-r--r--security/sfs/patches/patch-bs29
-rw-r--r--security/sfs/patches/patch-bt76
48 files changed, 1879 insertions, 5 deletions
diff --git a/security/sfs/Makefile b/security/sfs/Makefile
index 512f0197c05..c2b86d2091f 100644
--- a/security/sfs/Makefile
+++ b/security/sfs/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.27 2006/10/04 21:58:14 wiz Exp $
+# $NetBSD: Makefile,v 1.28 2006/10/21 11:53:13 agc Exp $
#
DISTNAME= sfs-0.7.2
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= net security
MASTER_SITES= http://www.fs.net/sfswww/dist/
@@ -21,8 +21,6 @@ CONFIGURE_ARGS+= --disable-uvfs
USE_LANGUAGES= c c++
USE_TOOLS+= makeinfo perl:run
-GCC_REQD+= 2.95.3
-
INFO_FILES= # PLIST
PKG_SYSCONFSUBDIR= sfs
diff --git a/security/sfs/distinfo b/security/sfs/distinfo
index de171105380..d0d73f9c9d4 100644
--- a/security/sfs/distinfo
+++ b/security/sfs/distinfo
@@ -1,5 +1,51 @@
-$NetBSD: distinfo,v 1.2 2005/02/24 13:10:13 agc Exp $
+$NetBSD: distinfo,v 1.3 2006/10/21 11:53:13 agc Exp $
SHA1 (sfs-0.7.2.tar.gz) = 3619afc9b785e4aa41f7cdf202c5b233a6b5fe08
RMD160 (sfs-0.7.2.tar.gz) = 30cd5e21c4f63292ef0f5671720f6036d08e5ff1
Size (sfs-0.7.2.tar.gz) = 1283652 bytes
+SHA1 (patch-aa) = 32bf5ca41bf588bdd4f2471c727822aac2906472
+SHA1 (patch-ab) = 7719eda254e57d7cc6cf3ae06db7b3beb30b9f94
+SHA1 (patch-ac) = 3afc535280b6f58090159fd9242edc63563e108d
+SHA1 (patch-ad) = f662ca56204ae71c64b2bdbb8a09384f868107c9
+SHA1 (patch-ae) = 80222c0384e5d746d1fce66231c0f35e32a572fd
+SHA1 (patch-af) = dd5c53e2971e7ad317578e136bac5f239ccdf00d
+SHA1 (patch-ag) = 963134e5b5746600dc184f4651bb70cdfaebf125
+SHA1 (patch-ah) = b411915bed2f6e008c2fa577aae4a96d2a45b2ab
+SHA1 (patch-ai) = c3c9cc83d07eb423c6732bbfe4191793c2f6dfd8
+SHA1 (patch-aj) = 46c78b2a5aa2f479eb8b71076883eace9070bfdc
+SHA1 (patch-ak) = 749ea20cb94f4cf58e753245824ac15617643beb
+SHA1 (patch-al) = 9ead095b5321ccf7ae969313253b143b37e1e201
+SHA1 (patch-am) = d17ab985f9959678d0d3b4b205f4fdd2d68d9eb1
+SHA1 (patch-an) = 85749b62a79924f67205f8d2113a6d42e60a6bdc
+SHA1 (patch-ao) = 598a061792b37b537bea29987645e8a72250bee2
+SHA1 (patch-ap) = 0edbc273d983bfa97df16d7e7ab6070b82d09726
+SHA1 (patch-aq) = c401278ff8c7499e006ff629f1583d6d02982388
+SHA1 (patch-ar) = 9b8e5fbc3d68883755378c6b010c22f387910c5d
+SHA1 (patch-as) = 6fdeac607eacb5f0a9364195f915b6addbc5e705
+SHA1 (patch-at) = c7ca70c5a5741cd55444d66de475788eda331ca0
+SHA1 (patch-au) = 80b0fb5b855860b0706e74ef113dd1f72366da62
+SHA1 (patch-av) = bc68e7066c0208933b5b1b006d884ffd7eb0c8bf
+SHA1 (patch-aw) = 17d79ef557b937acd726464791b07c459e667f45
+SHA1 (patch-ax) = 70fb501167632dbb9d748c49ac70d8836c1024bd
+SHA1 (patch-ay) = 96f5ed64cbf1d63916feed80548088afb74ada67
+SHA1 (patch-az) = e3037f63a5b9aac21a939904951c3524a8ee1dce
+SHA1 (patch-ba) = 09862e798fa38eff4333fbd810d439761b352d64
+SHA1 (patch-bb) = 0d055f44a9d98c06d6b86dbcfa8e0573b81370a4
+SHA1 (patch-bc) = 3f54e5fd0fc2d3b251c50759fa4b4f07155c012f
+SHA1 (patch-bd) = 238b103ece240f8a3d962400bf3858bf69d62f18
+SHA1 (patch-be) = c58facf1a383b8ca7599a425f6b4ec3ffe5e15cc
+SHA1 (patch-bf) = 9d2288f6307aeb661e444ceb33d1b67d9062fd33
+SHA1 (patch-bg) = 2c3d76bb6858e6edf800d6c362d0a079d6208cd5
+SHA1 (patch-bh) = 1f85d5ce9f3e36685b3a18b638fa7c75a577eaaf
+SHA1 (patch-bi) = 1354d1cc7da39e91515dbb53e31e8c19976341f8
+SHA1 (patch-bj) = 8fe2fe0a1e1bcd339cc2f791c18a392c401cc630
+SHA1 (patch-bk) = d7ae5c0b7dc0092e605695b7ca0feb8274fac575
+SHA1 (patch-bl) = 73eb190aa378c8d1d01fd93cc7c17f657d887d6e
+SHA1 (patch-bm) = 21a453088da17fc0ec67501168eef8493238a8cf
+SHA1 (patch-bn) = fa92872cd5d9e10a1ef45ccef11aa7b3e507b3ca
+SHA1 (patch-bo) = 1d812c99e3b75c1296dc17120f82411714f7d8fd
+SHA1 (patch-bp) = 4c550d82a7b85900cca30003c0faaba967c99108
+SHA1 (patch-bq) = df81507b2e2fd5d40a6759bf063229ef3e0fa301
+SHA1 (patch-br) = 411b894e043d105402ab7d0622fc843703457639
+SHA1 (patch-bs) = a426787d1b2a74a92a091046c1c9fdf7696a87f4
+SHA1 (patch-bt) = 41b1359d716493aadd861818c9a377247191ecec
diff --git a/security/sfs/patches/patch-aa b/security/sfs/patches/patch-aa
new file mode 100644
index 00000000000..1d3ebb90b31
--- /dev/null
+++ b/security/sfs/patches/patch-aa
@@ -0,0 +1,53 @@
+$NetBSD: patch-aa,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/aiod.C.orig 2002-09-09 19:58:48.000000000 +0100
++++ ./async/aiod.C
+@@ -277,7 +277,7 @@ void
+ aiosrv::pathop (aiomsg_t msg)
+ {
+ static int fd = -1;
+- aiod_pathop *rq = buf->template getptr<aiod_pathop> (msg);
++ aiod_pathop *rq = buf->getptr<aiod_pathop> (msg);
+ errno = 0;
+ switch (rq->op) {
+ case AIOD_UNLINK:
+@@ -324,8 +324,8 @@ aiosrv::pathop (aiomsg_t msg)
+ void
+ aiosrv::fhop (aiomsg_t msg)
+ {
+- aiod_fhop *rq = buf->template getptr<aiod_fhop> (msg);
+- aiod_file *af = buf->template getptr<aiod_file> (rq->fh);
++ aiod_fhop *rq = buf->getptr<aiod_fhop> (msg);
++ aiod_file *af = buf->getptr<aiod_file> (rq->fh);
+
+ if (rq->op == AIOD_OPEN) {
+ fht.create (af, rq->mode, &rq->err);
+@@ -387,8 +387,8 @@ aiosrv::fhop (aiomsg_t msg)
+ void
+ aiosrv::fstat (aiomsg_t msg)
+ {
+- aiod_fstat *rq = buf->template getptr<aiod_fstat> (msg);
+- aiod_file *af = buf->template getptr<aiod_file> (rq->fh);
++ aiod_fstat *rq = buf->getptr<aiod_fstat> (msg);
++ aiod_file *af = buf->getptr<aiod_file> (rq->fh);
+
+ if (rq->op != AIOD_FSTAT)
+ panic ("aiosrv::fstat: bad op %d\n", rq->op);
+@@ -407,7 +407,7 @@ void
+ aiosrv::nop (aiomsg_t msg)
+ {
+ /* If the shmfile is sparse, a nop forces allocation. */
+- aiod_nop *rq = buf->template getptr<aiod_nop> (msg);
++ aiod_nop *rq = buf->getptr<aiod_nop> (msg);
+ size_t sz = 0;
+ bool touchable = rq->nopsize;
+ if (lseek (buf->fd, msg, SEEK_SET) != -1) {
+@@ -466,7 +466,7 @@ aiosrv::getmsg (aiomsg_t msg)
+ fatal ("bad opcode %d from client\n", op);
+
+ if (aiodtrace)
+- aiod_dump (buf->template getptr<void> (msg));
++ aiod_dump (buf->getptr<void> (msg));
+ if (write (fd, &msg, sizeof (msg)) != sizeof (msg)) {
+ if (errno != EPIPE)
+ fatal ("aiosrv::write: %m\n");
diff --git a/security/sfs/patches/patch-ab b/security/sfs/patches/patch-ab
new file mode 100644
index 00000000000..fc4ad4cbf03
--- /dev/null
+++ b/security/sfs/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/dnsparse.C.orig 2002-06-26 07:36:31.000000000 +0100
++++ ./async/dnsparse.C
+@@ -323,7 +323,7 @@ dnsparse::tomxlist ()
+ n_chars += strlen (name) + 1;
+
+ ref <mxlist> mxl = refcounted<mxlist, vsize>::alloc
+- (offsetof (mxlist, m_mxes[nmx]) + n_chars);
++ (((unsigned int)&(((mxlist *)0)->m_mxes[nmx])) + n_chars);
+ mxrec *mxrecs = mxl->m_mxes;
+ char *np = (char *) &mxrecs[nmx];
+
diff --git a/security/sfs/patches/patch-ac b/security/sfs/patches/patch-ac
new file mode 100644
index 00000000000..333c4e2628f
--- /dev/null
+++ b/security/sfs/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/ihash.h.orig 2002-05-28 11:29:16.000000000 +0100
++++ ./async/ihash.h
+@@ -213,7 +213,7 @@ class ihash
+ const H hash;
+
+ public:
+- ihash () {}
++ ihash () : eq (E ()), hash (H ()) {}
+ ihash (const E &e, const H &h) : eq (e), hash (h) {}
+
+ void insert (V *elm) { insert_val (elm, hash (elm->*key)); }
diff --git a/security/sfs/patches/patch-ad b/security/sfs/patches/patch-ad
new file mode 100644
index 00000000000..e8c0c285017
--- /dev/null
+++ b/security/sfs/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/qhash.h.orig 2002-05-28 11:50:37.000000000 +0100
++++ ./async/qhash.h
+@@ -166,7 +166,7 @@ class bhash // <K, void, H, E, kludge>
+
+ public:
+ bhash () {}
+- void clear () { deleteall (); }
++ void clear () { this->deleteall (); }
+ ~bhash () { clear (); }
+
+ bool insert (const K &k) {
diff --git a/security/sfs/patches/patch-ae b/security/sfs/patches/patch-ae
new file mode 100644
index 00000000000..fe81eda0e68
--- /dev/null
+++ b/security/sfs/patches/patch-ae
@@ -0,0 +1,35 @@
+$NetBSD: patch-ae,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/refcnt.h.orig 2002-09-21 00:05:21.000000000 +0100
++++ ./async/refcnt.h
+@@ -408,6 +408,8 @@ template<class T>
+ class ref : public refpriv, public refops<T> {
+ friend class refpriv;
+
++ refops<T>::p;
++
+ friend ref<T> mkref<T> (T *);
+ ref (T *pp, refcount *cc) : refpriv (cc) { p = pp; inc (); }
+
+@@ -455,6 +457,8 @@ template<class T>
+ class ptr : public refpriv, public refops <T> {
+ friend class refpriv;
+
++ refops<T>::p;
++
+ void inc () const { if (c) (rinc (c)); }
+ void dec () const { if (c) (rdec (c)); }
+
+@@ -509,10 +513,11 @@ public:
+
+ template<class T>
+ struct bssptr : ptr<T> {
++
+ // Don't initialize (assume we were 0 initialized in the BSS)
+ bssptr () : ptr<T> (__bss_init ()) {}
+ // Override the effects of destruction
+- ~bssptr () { assert (globaldestruction); if (*this != NULL) Xleak (); }
++ ~bssptr () { assert (globaldestruction); if (*this != NULL) this->Xleak (); }
+ ptr<T> &operator= (refpriv::privtype *p) { return ptr<T>::operator= (p); }
+ template<class U> ptr<T> &operator= (const ptr<U> &r)
+ { return ptr<T>::operator= (r); }
diff --git a/security/sfs/patches/patch-af b/security/sfs/patches/patch-af
new file mode 100644
index 00000000000..c2f5bc4ae2b
--- /dev/null
+++ b/security/sfs/patches/patch-af
@@ -0,0 +1,28 @@
+$NetBSD: patch-af,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/vec.h.orig 2002-05-28 11:29:16.000000000 +0100
++++ ./async/vec.h
+@@ -72,7 +72,14 @@ public:
+ };
+
+ template<class T, size_t N = 0> class vec : public vec_base<T, N> {
++
+ typedef typename vec_base<T, N>::elm_t elm_t;
++
++ vec_base<T, N>::basep;
++ vec_base<T, N>::firstp;
++ vec_base<T, N>::lastp;
++ vec_base<T, N>::limp;
++
+ void move (elm_t *dst) {
+ if (dst == firstp)
+ return;
+@@ -92,7 +99,7 @@ template<class T, size_t N = 0> class ve
+ { return *new (implicit_cast<void *> (&e)) elm_t (v); }
+ static void destroy (elm_t &e) { e.~elm_t (); }
+
+- void init () { lastp = firstp = basep = def_basep (); limp = def_limp (); }
++ void init () { lastp = firstp = basep = this->def_basep (); limp = this->def_limp (); }
+ void del () { while (firstp < lastp) firstp++->~elm_t (); bfree (basep); }
+
+ #define append(v) \
diff --git a/security/sfs/patches/patch-ag b/security/sfs/patches/patch-ag
new file mode 100644
index 00000000000..d963216db66
--- /dev/null
+++ b/security/sfs/patches/patch-ag
@@ -0,0 +1,14 @@
+$NetBSD: patch-ag,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./async/aiod.h.orig 2002-10-29 06:29:02.000000000 +0000
++++ ./async/aiod.h
+@@ -32,6 +32,9 @@
+
+ struct aiod_req;
+
++class aiod;
++class aiofh;
++
+ class aiobuf {
+ friend class aiod;
+ friend class aiofh;
diff --git a/security/sfs/patches/patch-ah b/security/sfs/patches/patch-ah
new file mode 100644
index 00000000000..83cee92d1a9
--- /dev/null
+++ b/security/sfs/patches/patch-ah
@@ -0,0 +1,46 @@
+$NetBSD: patch-ah,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./arpc/rpctypes.h.orig 2002-05-28 11:29:15.000000000 +0100
++++ ./arpc/rpctypes.h
+@@ -173,7 +173,7 @@ public:
+ template<size_t m> rpc_vec &set (const array<T, m> &v)
+ { switch (0) case 0: case m <= max:; assign (v); return *this; }
+ #endif
+- rpc_vec &set (elm_t *base, size_t len, freemode_t m = NOFREE)
++ rpc_vec &set (elm_t *base, size_t len, freemode_t m = freemode::NOFREE)
+ { mcheck (len); del (); mode = m; nelm = len; vec = base; return *this; }
+ template<size_t m> rpc_vec &set (const ::vec<T, m> &v)
+ { set (v.base (), v.size ()); }
+@@ -266,6 +266,8 @@ swap (rpc_vec<T, max> &a, rpc_vec<T, max
+ a.swap (b);
+ }
+
++extern const str rpc_emptystr;
++
+ template<size_t max = RPC_INFINITY> struct rpc_str : str
+ {
+ enum { maxsize = max };
+@@ -301,12 +303,12 @@ public:
+ };
+
+ template<size_t n = RPC_INFINITY> struct rpc_opaque : array<char, n> {
+- rpc_opaque () { bzero (base (), size ()); }
++ rpc_opaque () { bzero (this->base (), this->size ()); }
+ };
+ template<size_t n = RPC_INFINITY> struct rpc_bytes : rpc_vec<char, n> {
+- void setstrmem (const str &s) { set (s.cstr (), s.len (), NOFREE); }
++ void setstrmem (const str &s) { this->set (s.cstr (), s.len (), freemode::NOFREE); }
+ rpc_bytes &operator= (const str &s)
+- { setsize (s.len ()); memcpy (base (), s.cstr (), size ()); return *this; }
++ { this->setsize (s.len ()); memcpy (this->base (), s.cstr (), this->size ()); return *this; }
+ template<size_t m> rpc_bytes &operator= (const rpc_vec<char, m> &v)
+ { rpc_vec<char, n>::operator= (v); return *this; }
+ template<size_t m> rpc_bytes &operator= (const array<char, m> &v)
+@@ -519,7 +521,6 @@ stompcast (T &t)
+
+ struct rpc_clear_t {};
+ extern struct rpc_clear_t _rpcclear;
+-extern const str rpc_emptystr;
+
+ inline bool
+ rpc_traverse (rpc_clear_t &, u_int32_t &obj)
diff --git a/security/sfs/patches/patch-ai b/security/sfs/patches/patch-ai
new file mode 100644
index 00000000000..d64377ef0b1
--- /dev/null
+++ b/security/sfs/patches/patch-ai
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./arpc/xdrmisc.h.orig 2002-05-28 07:43:37.000000000 +0100
++++ ./arpc/xdrmisc.h
+@@ -79,6 +79,7 @@ extern "C" {
+ typedef BOOL (*xdrproc_t) (XDR *, void *);
+
+ #include "rpctypes.h"
++#include "wmstr.h"
+
+ #ifdef __APPLE__
+ # define XDROPS_KNRPROTO 1
diff --git a/security/sfs/patches/patch-aj b/security/sfs/patches/patch-aj
new file mode 100644
index 00000000000..ae1d2f2b539
--- /dev/null
+++ b/security/sfs/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./arpc/Makefile.in.orig 2002-12-20 14:54:00.000000000 +0000
++++ ./arpc/Makefile.in
+@@ -406,7 +406,7 @@ pmap_prot.C: $(srcdir)/pmap_prot.x
+ (echo '#define proc XXX_egcs_bug_proc'; \
+ echo '#include "sysconf.h"'; \
+ echo '#undef proc') > $@~
+- -$(RPCC) -c $(srcdir)/pmap_prot.x -o- >> $@~ \
++ -$(RPCC) -c $(srcdir)/pmap_prot.x -o- | awk '/panic/ { printf("%s return false;\n", $$0); next } { print }' >> $@~ \
+ && mv -f $@~ $@
+
+ dist-hook:
diff --git a/security/sfs/patches/patch-ak b/security/sfs/patches/patch-ak
new file mode 100644
index 00000000000..aa07ace27af
--- /dev/null
+++ b/security/sfs/patches/patch-ak
@@ -0,0 +1,29 @@
+$NetBSD: patch-ak,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/afsdir.C.orig 2001-10-08 23:40:13.000000000 +0100
++++ ./sfsmisc/afsdir.C
+@@ -122,21 +122,21 @@ afsdir::xdr (XDR *x, void *_sbp)
+ bool (*putentry) (XDR *, afsnode *, filename, u_int32_t);
+
+ if (v2) {
+- const readdirargs *arg = sbp->template getarg<readdirargs> ();
++ const readdirargs *arg = sbp->getarg<readdirargs> ();
+ d = static_cast<afsdir *> (afsnode::fh2node (&arg->dir));
+ cookie = getint (arg->cookie.base ());
+ count = arg->count;
+ putentry = xdr_putentry;
+ }
+ else if (sbp->proc () == NFSPROC3_READDIR) {
+- const readdir3args *arg = sbp->template getarg<readdir3args> ();
++ const readdir3args *arg = sbp->getarg<readdir3args> ();
+ d = static_cast<afsdir *> (afsnode::fh3node (&arg->dir));
+ cookie = arg->cookie;
+ count = arg->count;
+ putentry = xdr_putentry3;
+ }
+ else if (sbp->proc () == NFSPROC3_READDIRPLUS) {
+- const readdirplus3args *arg = sbp->template getarg<readdirplus3args> ();
++ const readdirplus3args *arg = sbp->getarg<readdirplus3args> ();
+ d = static_cast<afsdir *> (afsnode::fh3node (&arg->dir));
+ cookie = arg->cookie;
+ count = arg->dircount;
diff --git a/security/sfs/patches/patch-al b/security/sfs/patches/patch-al
new file mode 100644
index 00000000000..20d60633879
--- /dev/null
+++ b/security/sfs/patches/patch-al
@@ -0,0 +1,63 @@
+$NetBSD: patch-al,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/afsnode.C.orig 2001-04-09 03:24:50.000000000 +0100
++++ ./sfsmisc/afsnode.C
+@@ -333,7 +333,7 @@ afsnode::nfs3_access (svccb *sbp)
+ access3res res (NFS3_OK);
+ mkpoattr (res.resok->obj_attributes, sbp2aid (sbp));
+ res.resok->access = ((ACCESS3_READ | ACCESS3_LOOKUP | ACCESS3_EXECUTE)
+- & sbp->template getarg<access3args> ()->access);
++ & sbp->getarg<access3args> ()->access);
+ sbp->reply (&res);
+ }
+
+@@ -370,11 +370,11 @@ sbp2node (svccb *sbp)
+ static ref<stalenode_t> stalenode = New refcounted<stalenode_t>;
+ switch (sbp->vers ()) {
+ case 2:
+- if (afsnode *a = afsnode::fh2node (sbp->template getarg<nfs_fh> ()))
++ if (afsnode *a = afsnode::fh2node (sbp->getarg<nfs_fh> ()))
+ return a;
+ break;
+ case 3:
+- if (afsnode *a = afsnode::fh3node (sbp->template getarg<nfs_fh3> ()))
++ if (afsnode *a = afsnode::fh3node (sbp->getarg<nfs_fh3> ()))
+ return a;
+ break;
+ }
+@@ -392,7 +392,7 @@ afsnode::dispatch (svccb *sbp)
+ sbp2node (sbp)->nfs_getattr (sbp);
+ break;
+ case NFSPROC_LOOKUP:
+- sbp2node (sbp)->nfs_lookup (sbp, sbp->template getarg<diropargs> ()->name);
++ sbp2node (sbp)->nfs_lookup (sbp, sbp->getarg<diropargs> ()->name);
+ break;
+ case NFSPROC_READLINK:
+ sbp2node (sbp)->nfs_readlink (sbp);
+@@ -457,7 +457,7 @@ afsnode::dispatch3 (svccb *sbp)
+ break;
+ case NFSPROC3_LOOKUP:
+ sbp2node (sbp)->nfs_lookup (sbp,
+- sbp->template getarg<diropargs3> ()->name);
++ sbp->getarg<diropargs3> ()->name);
+ break;
+ case NFSPROC3_ACCESS:
+ sbp2node (sbp)->nfs3_access (sbp);
+@@ -528,7 +528,7 @@ void
+ afsreg::nfs_read (svccb *sbp)
+ {
+ if (sbp->vers () == 3) {
+- read3args *arg = sbp->template getarg<read3args> ();
++ read3args *arg = sbp->getarg<read3args> ();
+ read3res res (NFS3_OK);
+ res.resok->eof = arg->offset + arg->count >= contents.len ();
+ if (arg->offset >= contents.len ())
+@@ -544,7 +544,7 @@ afsreg::nfs_read (svccb *sbp)
+ sbp->replyref (res);
+ }
+ else if (sbp->vers () == 2) {
+- readargs *arg = sbp->template getarg<readargs> ();
++ readargs *arg = sbp->getarg<readargs> ();
+ readres res (NFS_OK);
+ if (arg->offset < contents.len ()) {
+ res.reply->data.setsize (min<u_int32_t> (arg->count,
diff --git a/security/sfs/patches/patch-am b/security/sfs/patches/patch-am
new file mode 100644
index 00000000000..d9b9b40e384
--- /dev/null
+++ b/security/sfs/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/afsnode.h.orig 2001-07-27 03:13:07.000000000 +0100
++++ ./sfsmisc/afsnode.h
+@@ -168,7 +168,7 @@ public:
+ void mkfattr3 (fattr3 *, sfs_aid aid);
+ void setres (nfsstat err);
+ void setres (nfspath path);
+- str readlink () const { return res.status ? str (NULL) : *res.data; }
++ str readlink () const { return res.status ? str (NULL) : str(*res.data); }
+ bool resset () { return resok; }
+
+ void nfs_readlink (svccb *sbp);
diff --git a/security/sfs/patches/patch-an b/security/sfs/patches/patch-an
new file mode 100644
index 00000000000..d48d8c118f2
--- /dev/null
+++ b/security/sfs/patches/patch-an
@@ -0,0 +1,31 @@
+$NetBSD: patch-an,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/attrcache.C.orig 2002-09-19 21:04:20.000000000 +0100
++++ ./sfsmisc/attrcache.C
+@@ -154,7 +154,7 @@ void
+ nfsserv_ac::getcall (nfscall *nc)
+ {
+ if (nc->proc () == NFSPROC3_GETATTR) {
+- const fattr3exp *f = ac.attr_lookup (*nc->template getarg<nfs_fh3> ());
++ const fattr3exp *f = ac.attr_lookup (*nc->getarg<nfs_fh3> ());
+ if (f) {
+ getattr3res res (NFS3_OK);
+ *res.attributes = *reinterpret_cast<const fattr3 *> (f);
+@@ -163,7 +163,7 @@ nfsserv_ac::getcall (nfscall *nc)
+ }
+ }
+ else if (nc->proc () == NFSPROC3_ACCESS) {
+- access3args *a = nc->template getarg<access3args> ();
++ access3args *a = nc->getarg<access3args> ();
+ int32_t perm = ac.access_lookup (a->object, nc->getaid (), a->access);
+ if (perm > 0) {
+ access3res res (NFS3_OK);
+@@ -192,7 +192,7 @@ nfsserv_ac::getreply (nfscall *nc)
+
+ if (nc->proc () == NFSPROC3_ACCESS) {
+ access3res *ares = static_cast<access3res *> (nc->resp);
+- access3args *a = nc->template getarg<access3args> ();
++ access3args *a = nc->getarg<access3args> ();
+ if (ares->status)
+ ac.flush_access (a->object, nc->getaid ());
+ else
diff --git a/security/sfs/patches/patch-ao b/security/sfs/patches/patch-ao
new file mode 100644
index 00000000000..c0b1e8002b6
--- /dev/null
+++ b/security/sfs/patches/patch-ao
@@ -0,0 +1,18 @@
+$NetBSD: patch-ao,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/closesim.C.orig 2001-04-05 06:15:42.000000000 +0100
++++ ./sfsmisc/closesim.C
+@@ -188,11 +188,11 @@ closesim::getcall (nfscall *nc)
+ break;
+ case NFSPROC3_RENAME:
+ dofh (nc->getfh3arg ());
+- dofh (&nc->template getarg<rename3args> ()->to.dir);
++ dofh (&nc->getarg<rename3args> ()->to.dir);
+ break;
+ case NFSPROC3_LINK:
+ dofh (nc->getfh3arg ());
+- dofh (&nc->template getarg<link3args> ()->link.dir);
++ dofh (&nc->getarg<link3args> ()->link.dir);
+ break;
+ default:
+ dofh (nc->getfh3arg ());
diff --git a/security/sfs/patches/patch-ap b/security/sfs/patches/patch-ap
new file mode 100644
index 00000000000..4fbac30bf74
--- /dev/null
+++ b/security/sfs/patches/patch-ap
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/nfsserv.C.orig 2002-09-19 21:04:20.000000000 +0100
++++ ./sfsmisc/nfsserv.C
+@@ -253,7 +253,7 @@ nfsserv_fixup::getreply (nfscall *nc)
+ {
+ /* After JUKEBOX errors, FreeBSD resends requests using the same xid. */
+ if (nc->proc () != NFSPROC3_NULL
+- && *nc->template getres<nfsstat3> () == NFS3ERR_JUKEBOX)
++ && *nc->getres<nfsstat3> () == NFS3ERR_JUKEBOX)
+ nc->nocache = true;
+
+ /* Many NFS3 clients flip out if lookups replies don't have attributes */
diff --git a/security/sfs/patches/patch-aq b/security/sfs/patches/patch-aq
new file mode 100644
index 00000000000..6bce825937b
--- /dev/null
+++ b/security/sfs/patches/patch-aq
@@ -0,0 +1,31 @@
+$NetBSD: patch-aq,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/nfsserv.h.orig 2002-09-19 21:04:20.000000000 +0100
++++ ./sfsmisc/nfsserv.h
+@@ -116,9 +116,7 @@ template<int N> class nfscall_cb : publi
+ typedef ref<callback<void, res_type> > cb_t;
+ cb_t cb;
+ public:
+- nfscall_cb (const authunix_parms *au, arg_type a, cb_t c,
+- nfsserv *srv = NULL)
+- : nfscall (au, N, a), cb (c) { if ((stopserv = srv)) srv->mkcb (this); }
++ nfscall_cb (const authunix_parms *au, arg_type a, cb_t c, nfsserv *srv);
+ ~nfscall_cb () {
+ /* Note, if xdr_res is not the default, we could always marshall
+ * and unmarshall the result to get it in the right type. That
+@@ -149,6 +147,15 @@ struct nfsserv : public virtual refcount
+ virtual bool encodefh (nfs_fh3 &fh);
+ };
+
++template<int N> inline
++nfscall_cb<N>::nfscall_cb (const authunix_parms *au, arg_type a, cb_t c,
++ nfsserv *srv = NULL)
++ : nfscall (au, N, a), cb (c)
++{
++ if ((stopserv = srv))
++ srv->mkcb (this);
++}
++
+ class nfsserv_udp : public nfsserv {
+ int fd;
+ ptr<axprt> x;
diff --git a/security/sfs/patches/patch-ar b/security/sfs/patches/patch-ar
new file mode 100644
index 00000000000..79153c6ca95
--- /dev/null
+++ b/security/sfs/patches/patch-ar
@@ -0,0 +1,76 @@
+$NetBSD: patch-ar,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/rex.C.orig 2002-11-28 16:21:03.000000000 +0000
++++ ./sfsmisc/rex.C
+@@ -91,7 +91,7 @@ unixfd::newfd (svccb *sbp)
+ {
+ assert (paios_out);
+
+- rexcb_newfd_arg *argp = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *argp = sbp->getarg<rexcb_newfd_arg> ();
+
+ int s[2];
+
+@@ -115,7 +115,7 @@ unixfd::data (svccb *sbp)
+ {
+ assert (paios_out);
+
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+
+ if (argp->data.size () > 0) {
+ if (weof) {
+@@ -133,7 +133,7 @@ unixfd::data (svccb *sbp)
+
+ //we don't shutdown immediately to give data a chance to
+ //asynchronously flush
+- paios_out->setwcb (wrap (this, &unixfd::update_connstate, SHUT_WR));
++ paios_out->setwcb (wrap (this, &unixfd::update_connstate, (int)SHUT_WR));
+ }
+ }
+
+@@ -227,7 +227,7 @@ void
+ rexchannel::data(svccb *sbp)
+ {
+ assert (sbp->prog () == REXCB_PROG && sbp->proc () == REXCB_DATA);
+- rex_payload *dp = sbp->template getarg<rex_payload> ();
++ rex_payload *dp = sbp->getarg<rex_payload> ();
+ assert (dp->channel == channo);
+ if (dp->fd < 0 ||
+ implicit_cast<size_t> (dp->fd) >= vfds.size () ||
+@@ -245,7 +245,7 @@ void
+ rexchannel::newfd (svccb *sbp)
+ {
+ assert (sbp->prog () == REXCB_PROG && sbp->proc () == REXCB_NEWFD);
+- rexcb_newfd_arg *arg = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *arg = sbp->getarg<rexcb_newfd_arg> ();
+
+ int fd = arg->fd;
+
+@@ -308,7 +308,7 @@ rexsession::rexcb_dispatch (svccb *sbp)
+
+ case REXCB_EXIT:
+ {
+- rex_int_arg *argp = sbp->template getarg<rex_int_arg> ();
++ rex_int_arg *argp = sbp->getarg<rex_int_arg> ();
+ rexchannel *chan = channels[argp->channel];
+
+ if (chan) {
+@@ -326,7 +326,7 @@ rexsession::rexcb_dispatch (svccb *sbp)
+
+ case REXCB_DATA:
+ {
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+ rexchannel *chan = channels[argp->channel];
+
+ if (chan)
+@@ -338,7 +338,7 @@ rexsession::rexcb_dispatch (svccb *sbp)
+
+ case REXCB_NEWFD:
+ {
+- rex_int_arg *argp = sbp->template getarg<rex_int_arg> ();
++ rex_int_arg *argp = sbp->getarg<rex_int_arg> ();
+ rexchannel *chan = channels[argp->channel];
+ if (chan)
+ chan->newfd (sbp);
diff --git a/security/sfs/patches/patch-as b/security/sfs/patches/patch-as
new file mode 100644
index 00000000000..938ce32f283
--- /dev/null
+++ b/security/sfs/patches/patch-as
@@ -0,0 +1,13 @@
+$NetBSD: patch-as,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/rex.h.orig 2002-11-27 17:54:15.000000000 +0000
++++ ./sfsmisc/rex.h
+@@ -272,7 +272,7 @@ rexfd::abort ()
+ inline void
+ rexfd::data (svccb *sbp)
+ {
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+ if (!argp->data.size ()) {
+ rex_payload payarg;
+ payarg.channel = channo;
diff --git a/security/sfs/patches/patch-at b/security/sfs/patches/patch-at
new file mode 100644
index 00000000000..96406e070f2
--- /dev/null
+++ b/security/sfs/patches/patch-at
@@ -0,0 +1,149 @@
+$NetBSD: patch-at,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/sfsclient.C.orig 2002-10-24 22:09:40.000000000 +0100
++++ ./sfsmisc/sfsclient.C
+@@ -342,7 +342,7 @@ sfsserver::getnfscall (nfscall *nc)
+ return;
+ }
+ if (nc->proc () != NFSPROC3_GETATTR
+- || nc->template getarg<nfs_fh3> ()->data != rootfh.data) {
++ || nc->getarg<nfs_fh3> ()->data != rootfh.data) {
+ touch ();
+ if (!authok (nc))
+ return;
+@@ -383,13 +383,13 @@ sfsprog::cddispatch (svccb *sbp)
+ sbp->reply (NULL);
+ break;
+ case SFSCDPROC_INIT:
+- sfs_suidserv (sbp->template getarg<sfscd_initarg> ()->name,
++ sfs_suidserv (sbp->getarg<sfscd_initarg> ()->name,
+ wrap (this, &sfsprog::ctlaccept));
+ sbp->reply (NULL);
+ break;
+ case SFSCDPROC_MOUNT:
+ {
+- sfscd_mountarg *arg = sbp->template getarg<sfscd_mountarg> ();
++ sfscd_mountarg *arg = sbp->getarg<sfscd_mountarg> ();
+ ref<nfsserv> nns = nd->servalloc ();
+ if (needclose)
+ nns = close_simulate (nns);
+@@ -400,20 +400,20 @@ sfsprog::cddispatch (svccb *sbp)
+ break;
+ }
+ case SFSCDPROC_UNMOUNT:
+- if (sfsserver *s = pathtab[*sbp->template getarg<nfspath3> ()])
++ if (sfsserver *s = pathtab[*sbp->getarg<nfspath3> ()])
+ s->destroy ();
+ sbp->reply (NULL);
+ break;
+ case SFSCDPROC_FLUSHAUTH:
+ {
+- sfs_aid aid = *sbp->template getarg<sfs_aid> ();
++ sfs_aid aid = *sbp->getarg<sfs_aid> ();
+ for (sfsserver *s = pathtab.first (); s; s = pathtab.next (s))
+ s->authclear (aid);
+ sbp->reply (NULL);
+ break;
+ }
+ case SFSCDPROC_CONDEMN:
+- if (sfsserver *s = pathtab[*sbp->template getarg<nfspath3> ()])
++ if (sfsserver *s = pathtab[*sbp->getarg<nfspath3> ()])
+ s->condemn ();
+ sbp->reply (NULL);
+ break;
+@@ -486,7 +486,7 @@ sfsprog::linkdispatch (nfscall *nc)
+ switch (nc->proc ()) {
+ case NFSPROC3_GETATTR:
+ {
+- nfs_fh3 *arg = nc->template getarg<nfs_fh3> ();
++ nfs_fh3 *arg = nc->getarg<nfs_fh3> ();
+ getattr3res res (NFS3_OK);
+ mklnkfattr (res.attributes.addr (), arg);
+ nc->reply (&res);
+@@ -494,7 +494,7 @@ sfsprog::linkdispatch (nfscall *nc)
+ }
+ case NFSPROC3_READLINK:
+ {
+- nfs_fh3 *arg = nc->template getarg<nfs_fh3> ();
++ nfs_fh3 *arg = nc->getarg<nfs_fh3> ();
+ readlink3res res (NFS3_OK);
+ res.resok->symlink_attributes.set_present (true);
+ mklnkfattr (res.resok->symlink_attributes.attributes.addr (), arg);
+@@ -532,7 +532,7 @@ sfsprog::intercept (sfsserver *s, nfscal
+ switch (nc->proc ()) {
+ case NFSPROC3_SETATTR:
+ {
+- setattr3args *sar = nc->template getarg<setattr3args> ();
++ setattr3args *sar = nc->getarg<setattr3args> ();
+ sattr3 &sa = sar->new_attributes;
+ if (sa.mode.set || sa.size.set || sa.atime.set || sa.mtime.set
+ || !sa.uid.set || !sa.gid.set || *sa.uid.val != (u_int32_t) -2)
+@@ -544,7 +544,7 @@ sfsprog::intercept (sfsserver *s, nfscal
+ }
+ case NFSPROC3_LOOKUP:
+ {
+- diropargs3 *arg = nc->template getarg<diropargs3> ();
++ diropargs3 *arg = nc->getarg<diropargs3> ();
+ if (strncmp (arg->name, SFSPREF, sizeof (SFSPREF) - 1))
+ return false;
+ lookup3res res (NFS3_OK);
+@@ -701,12 +701,12 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ sbp->reply (NULL);
+ return;
+ case SFSCTL_SETPID:
+- setpid (*sbp->template getarg<int32_t> ());
++ setpid (*sbp->getarg<int32_t> ());
+ sbp->reply (NULL);
+ return;
+ }
+
+- sfsserver *si = prog->pathtab[*sbp->template getarg<filename3> ()];
++ sfsserver *si = prog->pathtab[*sbp->getarg<filename3> ()];
+ if (!si) {
+ sfsctl_err (sbp, NFS3ERR_STALE);
+ return;
+@@ -733,7 +733,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ case SFSCTL_GETIDNAMES:
+ {
+ sfsctl_getidnames_arg *argp
+- = sbp->template getarg<sfsctl_getidnames_arg> ();
++ = sbp->getarg<sfsctl_getidnames_arg> ();
+ sfs_idnames *resp = New sfs_idnames;
+ si->sfsc->call (SFSPROC_IDNAMES, &argp->nums, resp,
+ wrap (idnames_cb, sbp, resp), auth);
+@@ -743,7 +743,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ case SFSCTL_GETIDNUMS:
+ {
+ sfsctl_getidnums_arg *argp
+- = sbp->template getarg<sfsctl_getidnums_arg> ();
++ = sbp->getarg<sfsctl_getidnums_arg> ();
+ sfs_idnums *resp = New sfs_idnums;
+ si->sfsc->call (SFSPROC_IDNUMS, &argp->names, resp,
+ wrap (idnums_cb, sbp, resp), auth);
+@@ -761,7 +761,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ case SFSCTL_LOOKUP:
+ {
+ sfsctl_lookup_arg *argp
+- = sbp->template getarg<sfsctl_lookup_arg> ();
++ = sbp->getarg<sfsctl_lookup_arg> ();
+ lookup3res *resp = New lookup3res;
+ si->sfsc->call (NFSPROC3_LOOKUP, &argp->arg, resp,
+ wrap (lookup_cb, sbp, resp), auth,
+@@ -772,7 +772,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ case SFSCTL_GETACL:
+ {
+ sfsctl_getacl_arg *argp
+- = sbp->template getarg<sfsctl_getacl_arg> ();
++ = sbp->getarg<sfsctl_getacl_arg> ();
+ ex_read3res *resp = New ex_read3res;
+ si->sfsc->call (ex_NFSPROC3_GETACL, &argp->arg, resp,
+ wrap (getacl_cb, sbp, resp), auth,
+@@ -783,7 +783,7 @@ sfsprog::sfsctl::dispatch (svccb *sbp)
+ case SFSCTL_SETACL:
+ {
+ sfsctl_setacl_arg *argp
+- = sbp->template getarg<sfsctl_setacl_arg> ();
++ = sbp->getarg<sfsctl_setacl_arg> ();
+ ex_write3res *resp = New ex_write3res;
+ si->sfsc->call (ex_NFSPROC3_SETACL, &argp->arg, resp,
+ wrap (setacl_cb, sbp, resp), auth,
diff --git a/security/sfs/patches/patch-au b/security/sfs/patches/patch-au
new file mode 100644
index 00000000000..2cf1f6aba1d
--- /dev/null
+++ b/security/sfs/patches/patch-au
@@ -0,0 +1,15 @@
+$NetBSD: patch-au,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/sfsclient.h.orig 2002-09-19 21:04:20.000000000 +0100
++++ ./sfsmisc/sfsclient.h
+@@ -30,9 +30,9 @@
+ #include "vec.h"
+ #include "qhash.h"
+ #include "axprt_crypt.h"
++#include "sfscd_prot.h"
+ #include "sfscrypt.h"
+
+-struct sfscd_mountarg;
+ class rabin_priv;
+ class sfsprog;
+
diff --git a/security/sfs/patches/patch-av b/security/sfs/patches/patch-av
new file mode 100644
index 00000000000..a9175ed51c1
--- /dev/null
+++ b/security/sfs/patches/patch-av
@@ -0,0 +1,12 @@
+$NetBSD: patch-av,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/sfscrypt.h.orig 2002-10-23 23:01:54.000000000 +0100
++++ ./sfsmisc/sfscrypt.h
+@@ -89,7 +89,6 @@ protected:
+ virtual u_char get_bad_opts () const { return (SFS_DECRYPT | SFS_SIGN); }
+ bool get_opt (u_char o) const { return (opts & o); }
+ const sfs_keytype ktype;
+- const int eksb_id;
+ const u_char opts;
+ };
+
diff --git a/security/sfs/patches/patch-aw b/security/sfs/patches/patch-aw
new file mode 100644
index 00000000000..10e89edf4d6
--- /dev/null
+++ b/security/sfs/patches/patch-aw
@@ -0,0 +1,65 @@
+$NetBSD: patch-aw,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/sfsserv.C.orig 2002-12-01 01:11:21.000000000 +0000
++++ ./sfsmisc/sfsserv.C
+@@ -177,7 +177,7 @@ sfsserv::sfs_connect (svccb *sbp)
+ return;
+ }
+ cd.alloc ();
+- cd->ci = *sbp->template getarg <sfs_connectarg> ();
++ cd->ci = *sbp->getarg <sfs_connectarg> ();
+ cd->cr.set_status (SFS_OK);
+ cd->cr.reply->charge.bitcost = sfs_hashcost;
+ rnd.getbytes (cd->cr.reply->charge.target.base (), charge.target.size ());
+@@ -267,7 +267,7 @@ sfs_login2_cb (ref<bool> destroyed, sfss
+ return;
+ }
+
+- sfs_loginarg *argp = sbp->template getarg<sfs_loginarg> ();
++ sfs_loginarg *argp = sbp->getarg<sfs_loginarg> ();
+ sfs_loginres res (resp->status);
+ switch (resp->status) {
+ case SFSLOGIN_OK:
+@@ -306,13 +306,13 @@ sfsserv::sfs_login (svccb *sbp)
+ }
+ if (c->rp.versno == 1) {
+ sfsauth_loginres *resp = New sfsauth_loginres;
+- c->call (SFSAUTHPROC_LOGIN, sbp->template getarg<sfs_loginarg> (), resp,
++ c->call (SFSAUTHPROC_LOGIN, sbp->getarg<sfs_loginarg> (), resp,
+ wrap (sfs_login_cb, destroyed, this, sbp, resp));
+ return;
+ }
+ ref<sfsauth2_loginres> resp = New refcounted<sfsauth2_loginres> ();
+ sfsauth2_loginarg arg;
+- arg.arg = *sbp->template getarg<sfs_loginarg> ();
++ arg.arg = *sbp->getarg<sfs_loginarg> ();
+ arg.authid = authid;
+ arg.source = strbuf () << client_name << "!"
+ << (progname ? progname : str ("???"));
+@@ -323,7 +323,7 @@ sfsserv::sfs_login (svccb *sbp)
+ void
+ sfsserv::sfs_logout (svccb *sbp)
+ {
+- authfree (*sbp->template getarg<u_int32_t> ());
++ authfree (*sbp->getarg<u_int32_t> ());
+ sbp->reply (NULL);
+ }
+
+@@ -337,7 +337,7 @@ sfsserv::sfs_idnames (svccb *sbp)
+ return;
+ }
+
+- ::sfs_idnums *argp = sbp->template getarg< ::sfs_idnums> ();
++ ::sfs_idnums *argp = sbp->getarg< ::sfs_idnums> ();
+ ::sfs_idnames res;
+ if (argp->uid != -1)
+ if (struct passwd *p = getpwuid (argp->uid)) {
+@@ -362,7 +362,7 @@ sfsserv::sfs_idnums (svccb *sbp)
+ return;
+ }
+
+- ::sfs_idnames *argp = sbp->template getarg< ::sfs_idnames> ();
++ ::sfs_idnames *argp = sbp->getarg< ::sfs_idnames> ();
+ ::sfs_idnums res = { -1, -1 };
+ if (argp->uidname.present)
+ if (struct passwd *p = getpwnam (argp->uidname.name->cstr ()))
diff --git a/security/sfs/patches/patch-ax b/security/sfs/patches/patch-ax
new file mode 100644
index 00000000000..5efa1885de5
--- /dev/null
+++ b/security/sfs/patches/patch-ax
@@ -0,0 +1,17 @@
+$NetBSD: patch-ax,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsmisc/sfssesskey.C.orig 2002-09-27 20:18:18.000000000 +0100
++++ ./sfsmisc/sfssesskey.C
+@@ -144,10 +144,10 @@ sfs_server_crypt (svccb *sbp, sfspriv *s
+ sfs_encryptarg2 *arg2 = NULL;
+
+ if (pvers == 1) {
+- arg = sbp->template getarg<sfs_encryptarg> ();
++ arg = sbp->getarg<sfs_encryptarg> ();
+ clntpub = sfscrypt.alloc (arg->pubkey, SFS_ENCRYPT);
+ } else {
+- arg2 = sbp->template getarg<sfs_encryptarg2> ();
++ arg2 = sbp->getarg<sfs_encryptarg2> ();
+ clntpub = sfscrypt.alloc (arg2->pubkey, SFS_ENCRYPT);
+ }
+
diff --git a/security/sfs/patches/patch-ay b/security/sfs/patches/patch-ay
new file mode 100644
index 00000000000..cbbc8dc2b31
--- /dev/null
+++ b/security/sfs/patches/patch-ay
@@ -0,0 +1,52 @@
+$NetBSD: patch-ay,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./nfsmounter/nfsmounter.C.orig 2001-07-01 22:36:11.000000000 +0100
++++ ./nfsmounter/nfsmounter.C
+@@ -119,7 +119,7 @@ proc_mount_3 (svccb *sbp, int closefd, i
+ static void
+ proc_mount_2n (svccb *sbp, ref<nfsfd> nf, mpfsnode *n, int err)
+ {
+- mountarg *ma = sbp->template getarg<mountarg> ();
++ mountarg *ma = sbp->getarg<mountarg> ();
+ if (err) {
+ warn << "mount " << ma->path << ": " << strerror (errno) << "\n";
+ reply (sbp, err);
+@@ -131,7 +131,7 @@ proc_mount_2n (svccb *sbp, ref<nfsfd> nf
+ static void
+ proc_mount_2u (svccb *sbp, ref<uvfsfd> u, mpfsnode *n, int err)
+ {
+- mountarg *ma = sbp->template getarg<mountarg> ();
++ mountarg *ma = sbp->getarg<mountarg> ();
+ if (err) {
+ warn << "mount " << ma->path << ": " << strerror (errno) << "\n";
+ reply (sbp, err);
+@@ -144,7 +144,7 @@ proc_mount_2u (svccb *sbp, ref<uvfsfd> u
+ static void
+ proc_mount_2x (svccb *sbp, int devfd, str devname, mpfsnode *n, int err)
+ {
+- mountarg *ma = sbp->template getarg<mountarg> ();
++ mountarg *ma = sbp->getarg<mountarg> ();
+ if (err) {
+ warn << "mount " << ma->path << ": " << strerror (errno) << "\n";
+ reply (sbp, err);
+@@ -246,16 +246,16 @@ dispatch (svccb *sbp)
+ sbp->reply (NULL);
+ break;
+ case NFSMOUNTER_MOUNT:
+- proc_mount (sbp, sbp->template getarg<mountarg> ());
++ proc_mount (sbp, sbp->getarg<mountarg> ());
+ break;
+ case NFSMOUNTER_REMOUNT:
+- proc_remount (sbp, sbp->template getarg<remountarg> ());
++ proc_remount (sbp, sbp->getarg<remountarg> ());
+ break;
+ case NFSMOUNTER_UMOUNT:
+- proc_unmount (sbp, sbp->template getarg<umountarg> ());
++ proc_unmount (sbp, sbp->getarg<umountarg> ());
+ break;
+ case NFSMOUNTER_UMOUNTALL:
+- proc_umountall (sbp, sbp->template getarg<int> ());
++ proc_umountall (sbp, sbp->getarg<int> ());
+ break;
+ }
+ }
diff --git a/security/sfs/patches/patch-az b/security/sfs/patches/patch-az
new file mode 100644
index 00000000000..826d0e1b915
--- /dev/null
+++ b/security/sfs/patches/patch-az
@@ -0,0 +1,42 @@
+$NetBSD: patch-az,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./nfsmounter/staleserv.C.orig 1999-03-23 05:57:05.000000000 +0000
++++ ./nfsmounter/staleserv.C
+@@ -101,7 +101,7 @@ stalesrv::dispatch (srvelm *s, svccb *sb
+ nfsmnt_handle h;
+ if (sbp->proc () != 0) {
+ h.setsize (NFS_FHSIZE);
+- memcpy (h.base (), sbp->template getarg<nfs_fh> (), NFS_FHSIZE);
++ memcpy (h.base (), sbp->getarg<nfs_fh> (), NFS_FHSIZE);
+ }
+ switch (sbp->proc ()) {
+ case NFSPROC_GETATTR:
+@@ -115,8 +115,8 @@ stalesrv::dispatch (srvelm *s, svccb *sb
+ break;
+ case NFSPROC_LOOKUP:
+ if (mpfsnode *n = getnode (nf->nfs2nodes[h])) {
+- if (sbp->template getarg<diropargs> ()->name == "."
+- || (n = n->dir->lookup(sbp->template getarg<diropargs> ()
++ if (sbp->getarg<diropargs> ()->name == "."
++ || (n = n->dir->lookup(sbp->getarg<diropargs> ()
+ ->name))) {
+ diropres res (NFS_OK);
+ memcpy (res.reply->file.data.base (),
+@@ -142,7 +142,7 @@ stalesrv::dispatch (srvelm *s, svccb *sb
+ //warn ("staleserv: %s\n", nfs_program_3.tbl[sbp->proc ()].name);
+ nfsmnt_handle h;
+ if (sbp->proc () != 0)
+- h = sbp->template getarg<nfs_fh3> ()->data;
++ h = sbp->getarg<nfs_fh3> ()->data;
+ switch (sbp->proc ()) {
+ case NFSPROC3_GETATTR:
+ if (mpfsnode *n = getnode (nf->nfs3nodes[h])) {
+@@ -155,7 +155,7 @@ stalesrv::dispatch (srvelm *s, svccb *sb
+ break;
+ case NFSPROC3_LOOKUP:
+ if (mpfsnode *n = getnode (nf->nfs3nodes[h])) {
+- diropargs3 *arg = sbp->template getarg<diropargs3> ();
++ diropargs3 *arg = sbp->getarg<diropargs3> ();
+ if (arg->name == "." || (n = n->dir->lookup(arg->name))) {
+ lookup3res res (NFS3_OK);
+ res.resok->object.data = n->fh;
diff --git a/security/sfs/patches/patch-ba b/security/sfs/patches/patch-ba
new file mode 100644
index 00000000000..3683462e2f4
--- /dev/null
+++ b/security/sfs/patches/patch-ba
@@ -0,0 +1,101 @@
+$NetBSD: patch-ba,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfscd/afsroot.C.orig 2002-11-27 22:51:39.000000000 +0000
++++ ./sfscd/afsroot.C
+@@ -154,7 +154,7 @@ afsroot::nfs3_access (svccb *sbp)
+ mkpoattr (res.resok->obj_attributes, aid);
+ res.resok->access = (ACCESS3_READ | ACCESS3_LOOKUP | ACCESS3_EXECUTE
+ | ACCESS3_DELETE);
+- res.resok->access &= sbp->template getarg<access3args> ()->access;
++ res.resok->access &= sbp->getarg<access3args> ()->access;
+ sbp->reply (&res);
+ }
+ }
+@@ -169,8 +169,8 @@ void
+ afsroot::nfs_remove (svccb *sbp)
+ {
+ str name = sbp->vers () == 2
+- ? str (sbp->template getarg<diropargs> ()->name)
+- : str (sbp->template getarg<diropargs3> ()->name);
++ ? str (sbp->getarg<diropargs> ()->name)
++ : str (sbp->getarg<diropargs3> ()->name);
+
+ if (srvinfo *si = srvinfo::lookup (name)) {
+ si->unmount (0);
+@@ -186,8 +186,8 @@ void
+ afsroot::nfs_symlink (svccb *sbp)
+ {
+ str name = sbp->vers () == 2
+- ? str (sbp->template getarg<symlinkargs> ()->from.name)
+- : str (sbp->template getarg<symlink3args> ()->where.name);
++ ? str (sbp->getarg<symlinkargs> ()->from.name)
++ : str (sbp->getarg<symlink3args> ()->where.name);
+
+ if (entries[name])
+ nfs_error (sbp, NFSERR_EXIST);
+@@ -201,8 +201,8 @@ void
+ afsroot::nfs_mkdir (svccb *sbp)
+ {
+ str name = sbp->vers () == 2
+- ? str (sbp->template getarg<createargs> ()->where.name)
+- : str (sbp->template getarg<mkdir3args> ()->where.name);
++ ? str (sbp->getarg<createargs> ()->where.name)
++ : str (sbp->getarg<mkdir3args> ()->where.name);
+
+ if (entries[name])
+ nfs_error (sbp, nfsstat (NFSERR_EXIST));
+@@ -315,7 +315,7 @@ afsusrdir::nfs3_access (svccb *sbp)
+ mkpoattr (res.resok->obj_attributes, sbp2aid (sbp));
+ res.resok->access = ACCESS3_READ | ACCESS3_LOOKUP | ACCESS3_EXECUTE
+ | ACCESS3_DELETE | ACCESS3_EXTEND | ACCESS3_MODIFY;
+- res.resok->access &= sbp->template getarg<access3args> ()->access;
++ res.resok->access &= sbp->getarg<access3args> ()->access;
+ sbp->reply (&res);
+ }
+
+@@ -326,8 +326,8 @@ afsusrdir::nfs_remove (svccb *sbp)
+ return;
+
+ str name = sbp->vers () == 2 ?
+- str (sbp->template getarg<diropargs> ()->name)
+- : str (sbp->template getarg<diropargs3> ()->name);
++ str (sbp->getarg<diropargs> ()->name)
++ : str (sbp->getarg<diropargs3> ()->name);
+ if (!entries[name])
+ nfs_error (sbp, NFSERR_NOENT);
+ else if (!nameok (name) && !sfs_parsepath (name))
+@@ -345,8 +345,8 @@ void
+ afsusrdir::nfs_mkdir (svccb *sbp)
+ {
+ str name = sbp->vers () == 2 ?
+- str (sbp->template getarg<createargs> ()->where.name)
+- : str (sbp->template getarg<mkdir3args> ()->where.name);
++ str (sbp->getarg<createargs> ()->where.name)
++ : str (sbp->getarg<mkdir3args> ()->where.name);
+
+ if (entries[name]) {
+ nfs_error (sbp, NFSERR_EXIST);
+@@ -369,12 +369,12 @@ afsusrdir::nfs_symlink (svccb *sbp)
+ return;
+ str name, contents;
+ if (sbp->vers () == 2) {
+- symlinkargs *argp = sbp->template getarg<symlinkargs> ();
++ symlinkargs *argp = sbp->getarg<symlinkargs> ();
+ name = argp->from.name;
+ contents = argp->to;
+ }
+ else {
+- symlink3args *argp = sbp->template getarg<symlink3args> ();
++ symlink3args *argp = sbp->getarg<symlink3args> ();
+ name = argp->where.name;
+ contents = argp->symlink.symlink_data;
+ }
+@@ -616,7 +616,7 @@ afsrootfile::nfs3_access (svccb *sbp)
+ res.resok->access = 0;
+ else
+ res.resok->access = (ACCESS3_READ
+- & sbp->template getarg<access3args> ()->access);
++ & sbp->getarg<access3args> ()->access);
+ sbp->reply (&res);
+ }
+
diff --git a/security/sfs/patches/patch-bb b/security/sfs/patches/patch-bb
new file mode 100644
index 00000000000..0e1628a85e1
--- /dev/null
+++ b/security/sfs/patches/patch-bb
@@ -0,0 +1,138 @@
+$NetBSD: patch-bb,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfscd/ctlnode.C.orig 2002-09-26 20:10:30.000000000 +0100
++++ ./sfscd/ctlnode.C
+@@ -34,9 +34,9 @@ void
+ fh2bytes (fhbytes *data, const svccb *sbp)
+ {
+ if (sbp->vers () == 2)
+- *data = sbp->template getarg<nfs_fh> ()->data;
++ *data = sbp->getarg<nfs_fh> ()->data;
+ else
+- *data = sbp->template getarg<nfs_fh3> ()->data;
++ *data = sbp->getarg<nfs_fh3> ()->data;
+ }
+
+ inline afsnode::inum_t
+@@ -55,7 +55,7 @@ getsattr3 (sattr3 *s, svccb *sbp)
+ switch (sbp->vers ()) {
+ case 2:
+ {
+- sattr *sp = &sbp->template getarg<sattrargs> ()->attributes;
++ sattr *sp = &sbp->getarg<sattrargs> ()->attributes;
+ const u_int32_t nochange ((u_int32_t) -1);
+ if (sp->mode != nochange) {
+ s->mode.set_set (true);
+@@ -85,7 +85,7 @@ getsattr3 (sattr3 *s, svccb *sbp)
+ }
+ }
+ case 3:
+- *s = sbp->template getarg<setattr3args> ()->new_attributes;
++ *s = sbp->getarg<setattr3args> ()->new_attributes;
+ break;
+ default:
+ panic ("getsattr3: bad NFS version %d\n", sbp->vers ());
+@@ -209,12 +209,12 @@ msgnode::nfs_setattr (svccb *sbp)
+ }
+
+ if (sbp->vers () == 2) {
+- attrstat *resp = sbp->template getres<attrstat> ();
++ attrstat *resp = sbp->getres<attrstat> ();
+ resp->set_status (NFS_OK);
+ mkfattr (resp->attributes.addr (), sbp2aid (sbp));
+ }
+ else {
+- wccstat3 *resp = sbp->template getres<wccstat3> ();
++ wccstat3 *resp = sbp->getres<wccstat3> ();
+ resp->set_status (NFS3_OK);
+ mkpoattr (resp->wcc->after, sbp2aid (sbp));
+ }
+@@ -237,13 +237,13 @@ msgnode::nfs_write (svccb *sbp)
+ const char *data;
+
+ if (sbp->vers () == 2) {
+- writeargs *argp = sbp->template getarg<writeargs> ();
++ writeargs *argp = sbp->getarg<writeargs> ();
+ off = argp->offset;
+ len = argp->data.size ();
+ data = argp->data.base ();
+ }
+ else {
+- write3args *argp = sbp->template getarg<write3args> ();
++ write3args *argp = sbp->getarg<write3args> ();
+ off = argp->offset;
+ len = argp->data.size ();
+ data = argp->data.base ();
+@@ -261,12 +261,12 @@ msgnode::nfs_write (svccb *sbp)
+ memcpy (buf + off, data, len);
+
+ if (sbp->vers () == 2) {
+- attrstat *resp = sbp->template getres<attrstat> ();
++ attrstat *resp = sbp->getres<attrstat> ();
+ resp->set_status (NFS_OK);
+ mkfattr (resp->attributes.addr (), sbp2aid (sbp));
+ }
+ else {
+- write3res *resp = sbp->template getres<write3res> ();
++ write3res *resp = sbp->getres<write3res> ();
+ resp->set_status (NFS3_OK);
+ resp->resok->count = len;
+ // resp->resok->committed = sbp->template getarg<write3args> ()->stable;
+@@ -290,12 +290,12 @@ msgnode::nfs_read (svccb *sbp)
+
+ size_t off, len;
+ if (sbp->vers () == 2) {
+- readargs *argp = sbp->template getarg<readargs> ();
++ readargs *argp = sbp->getarg<readargs> ();
+ off = argp->offset;
+ len = argp->count;
+ }
+ else {
+- read3args *argp = sbp->template getarg<read3args> ();
++ read3args *argp = sbp->getarg<read3args> ();
+ off = argp->offset;
+ len = argp->count;
+ }
+@@ -398,7 +398,7 @@ ctlnode::nfs3_access (svccb *sbp)
+ if (sbp2aid (sbp) == aid)
+ res.resok->access = ((ACCESS3_READ | ACCESS3_LOOKUP
+ | ACCESS3_MODIFY | ACCESS3_EXTEND)
+- & sbp->template getarg<access3args> ()->access);
++ & sbp->getarg<access3args> ()->access);
+ else
+ res.resok->access = 0;
+ sbp->reply (&res);
+@@ -437,8 +437,8 @@ void
+ ctldir::nfs_remove (svccb *sbp)
+ {
+ str name = sbp->vers () == 2
+- ? str (sbp->template getarg<diropargs> ()->name)
+- : str (sbp->template getarg<diropargs3> ()->name);
++ ? str (sbp->getarg<diropargs> ()->name)
++ : str (sbp->getarg<diropargs3> ()->name);
+
+ if (!unlink (name))
+ nfs_error (sbp, NFSERR_NOENT);
+@@ -454,11 +454,11 @@ ctldir::nfs_create (svccb *sbp)
+ str name;
+
+ if (sbp->vers () == 2) {
+- createargs *ca = sbp->template getarg<createargs> ();
++ createargs *ca = sbp->getarg<createargs> ();
+ name = ca->where.name;
+ }
+ else {
+- create3args *ca = sbp->template getarg<create3args> ();
++ create3args *ca = sbp->getarg<create3args> ();
+ name = ca->where.name;
+ if (ca->how.mode == GUARDED && lookup (name, sbp2aid (sbp))) {
+ nfs3_err (sbp, NFS3ERR_EXIST);
+@@ -492,7 +492,7 @@ ctldir::nfs3_access (svccb *sbp)
+ res.resok->access = ACCESS3_READ | ACCESS3_LOOKUP | ACCESS3_EXECUTE;
+ if (sbp2aid (sbp) == aid)
+ res.resok->access |= ACCESS3_DELETE | ACCESS3_EXTEND | ACCESS3_MODIFY;
+- res.resok->access &= sbp->template getarg<access3args> ()->access;
++ res.resok->access &= sbp->getarg<access3args> ()->access;
+ sbp->reply (&res);
+ }
+
diff --git a/security/sfs/patches/patch-bc b/security/sfs/patches/patch-bc
new file mode 100644
index 00000000000..2bd49e0366f
--- /dev/null
+++ b/security/sfs/patches/patch-bc
@@ -0,0 +1,39 @@
+$NetBSD: patch-bc,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfscd/sfscd.C.orig 2002-05-23 21:01:17.000000000 +0100
++++ ./sfscd/sfscd.C
+@@ -127,7 +127,7 @@ cdaemon::dispatch (svccb *sbp)
+ break;
+ case SFSCDCBPROC_AGENTREQ:
+ {
+- sfscd_agentreq_arg *aa = sbp->template getarg<sfscd_agentreq_arg> ();
++ sfscd_agentreq_arg *aa = sbp->getarg<sfscd_agentreq_arg> ();
+ if (aa->agentreq.type == AGENTCB_AUTHINIT) {
+ if (aa->agentreq.init->requestor.len ())
+ aa->agentreq.init->requestor
+@@ -142,20 +142,20 @@ cdaemon::dispatch (svccb *sbp)
+ break;
+ }
+ case SFSCDCBPROC_IDLE:
+- srvinfo::idle (*sbp->template getarg<nfspath3> (), this);
++ srvinfo::idle (*sbp->getarg<nfspath3> (), this);
+ sbp->reply (NULL);
+ break;
+ case SFSCDCBPROC_DELFS:
+- srvinfo::destroy (*sbp->template getarg<nfspath3> (), this, false);
++ srvinfo::destroy (*sbp->getarg<nfspath3> (), this, false);
+ sbp->reply (NULL);
+ break;
+ case SFSCDCBPROC_HIDEFS:
+- //flushpath (*sbp->template getarg<nfspath3> ());
+- srvinfo::show (*sbp->template getarg<nfspath3> (), this, false);
++ //flushpath (*sbp->getarg<nfspath3> ());
++ srvinfo::show (*sbp->getarg<nfspath3> (), this, false);
+ sbp->reply (NULL);
+ break;
+ case SFSCDCBPROC_SHOWFS:
+- srvinfo::show (*sbp->template getarg<nfspath3> (), this, true);
++ srvinfo::show (*sbp->getarg<nfspath3> (), this, true);
+ sbp->reply (NULL);
+ break;
+ }
diff --git a/security/sfs/patches/patch-bd b/security/sfs/patches/patch-bd
new file mode 100644
index 00000000000..5320460b0f0
--- /dev/null
+++ b/security/sfs/patches/patch-bd
@@ -0,0 +1,30 @@
+$NetBSD: patch-bd,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfscd/usrinfo.C.orig 2002-09-19 05:15:19.000000000 +0100
++++ ./sfscd/usrinfo.C
+@@ -73,7 +73,7 @@ agent_default (svccb *sbp, sfs_aid aid)
+ sbp->reply (NULL);
+ break;
+ case AGENT_REVOKE:
+- revocation::alloc (*sbp->template getarg<sfs_pathrevoke> ());
++ revocation::alloc (*sbp->getarg<sfs_pathrevoke> ());
+ sbp->reply (NULL);
+ break;
+ case AGENT_RNDSEED:
+@@ -269,14 +269,14 @@ usrinfo::dispatch (svccb *sbp)
+ case AGENT_SYMLINK:
+ {
+ sfsagent_symlink_arg *ssa
+- = sbp->template getarg<sfsagent_symlink_arg> ();
++ = sbp->getarg<sfsagent_symlink_arg> ();
+ root->mkulink (ssa->contents, ssa->name);
+ sbp->reply (NULL);
+ break;
+ }
+ case AGENT_FLUSHNAME:
+ {
+- str name = *sbp->template getarg<sfs_filename> ();
++ str name = *sbp->getarg<sfs_filename> ();
+ root->clrulink (name);
+ sbp->reply (NULL);
+ break;
diff --git a/security/sfs/patches/patch-be b/security/sfs/patches/patch-be
new file mode 100644
index 00000000000..a6d27938c2b
--- /dev/null
+++ b/security/sfs/patches/patch-be
@@ -0,0 +1,40 @@
+$NetBSD: patch-be,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsrwcd/server.C.orig 2002-09-19 21:04:20.000000000 +0100
++++ ./sfsrwcd/server.C
+@@ -47,7 +47,7 @@ server::getreply (time_t rqtime, nfscall
+
+ if (nc->proc () == NFSPROC3_ACCESS) {
+ ex_access3res *ares = static_cast<ex_access3res *> (res);
+- access3args *a = nc->template getarg<access3args> ();
++ access3args *a = nc->getarg<access3args> ();
+ if (ares->status)
+ ac.flush_access (a->object, nc->getaid ());
+ else
+@@ -72,7 +72,7 @@ server::cbdispatch (svccb *sbp)
+ break;
+ case ex_NFSCBPROC3_INVALIDATE:
+ {
+- ex_invalidate3args *xa = sbp->template getarg<ex_invalidate3args> ();
++ ex_invalidate3args *xa = sbp->getarg<ex_invalidate3args> ();
+ ex_fattr3 *a = NULL;
+ if (xa->attributes.present && xa->attributes.attributes->expire) {
+ a = xa->attributes.attributes.addr ();
+@@ -140,7 +140,7 @@ server::dispatch (nfscall *nc)
+
+ #ifndef NO_ACACHE
+ if (nc->proc () == NFSPROC3_GETATTR) {
+- const ex_fattr3 *f = ac.attr_lookup (*nc->template getarg<nfs_fh3> ());
++ const ex_fattr3 *f = ac.attr_lookup (*nc->getarg<nfs_fh3> ());
+ if (f) {
+ getattr3res res (NFS3_OK);
+ *res.attributes = *reinterpret_cast<const fattr3 *> (f);
+@@ -149,7 +149,7 @@ server::dispatch (nfscall *nc)
+ }
+ }
+ else if (nc->proc () == NFSPROC3_ACCESS) {
+- access3args *a = nc->template getarg<access3args> ();
++ access3args *a = nc->getarg<access3args> ();
+ int32_t perm = ac.access_lookup (a->object, nc->getaid (), a->access);
+ if (perm > 0) {
+ access3res res (NFS3_OK);
diff --git a/security/sfs/patches/patch-bf b/security/sfs/patches/patch-bf
new file mode 100644
index 00000000000..0e2ee80506e
--- /dev/null
+++ b/security/sfs/patches/patch-bf
@@ -0,0 +1,22 @@
+$NetBSD: patch-bf,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/agentrex.C.orig 2002-11-27 18:51:05.000000000 +0000
++++ ./agent/agentrex.C
+@@ -68,7 +68,7 @@ public:
+ virtual void
+ newfd (svccb *sbp)
+ {
+- rexcb_newfd_arg *argp = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *argp = sbp->getarg<rexcb_newfd_arg> ();
+
+ waitnewfd = false;
+
+@@ -98,7 +98,7 @@ public:
+ }
+
+ virtual void data (svccb *sbp) {
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+ if (waitnewfd && !argp->data.size ()) {
+ warn ("agent forward channel failure: EOF from suidconnect agent\n");
+ warn ("NOTE: sfscd must be running on the remote machine for agent "
diff --git a/security/sfs/patches/patch-bg b/security/sfs/patches/patch-bg
new file mode 100644
index 00000000000..318a81d0b55
--- /dev/null
+++ b/security/sfs/patches/patch-bg
@@ -0,0 +1,130 @@
+$NetBSD: patch-bg,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/sfsagent.C.orig 2002-11-27 22:51:39.000000000 +0000
++++ ./agent/sfsagent.C
+@@ -148,7 +148,7 @@ sfsagent::agentdisp (svccb *sbp)
+ break;
+ case AGENTCB_AUTHINIT:
+ if (name) {
+- sfsagent_authinit_arg *aa = sbp->template getarg<sfsagent_authinit_arg> ();
++ sfsagent_authinit_arg *aa = sbp->getarg<sfsagent_authinit_arg> ();
+ if (aa->requestor) {
+ str s;
+ if (name == "sfscd")
+@@ -164,10 +164,10 @@ sfsagent::agentdisp (svccb *sbp)
+ gmgr.authmore (sbp);
+ break;
+ case AGENTCB_LOOKUP:
+- sfslookup (*sbp->template getarg<sfs_filename> (), wrap (lookupres, sbp));
++ sfslookup (*sbp->getarg<sfs_filename> (), wrap (lookupres, sbp));
+ break;
+ case AGENTCB_REVOKED:
+- revcheck (*sbp->template getarg<filename3> (), wrap (revokedres, sbp));
++ revcheck (*sbp->getarg<filename3> (), wrap (revokedres, sbp));
+ break;
+ case AGENTCB_CLONE:
+ if (axprt_unix *ux = xprt2unix (x)) {
+@@ -223,7 +223,7 @@ sfsagent::ctldisp (svccb *sbp)
+ case AGENTCTL_ADDEXTAUTH:
+ {
+ sfsagent_addextauth_arg *aa =
+- sbp->template getarg<sfsagent_addextauth_arg> ();
++ sbp->getarg<sfsagent_addextauth_arg> ();
+ extauth *ea = New extauth (x, &gmgr, this);
+ ea->pid = aa->pid;
+ ea->expire = aa->expire;
+@@ -244,7 +244,7 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_ADDKEY:
+ {
+- sfs_addkey_arg *aa = sbp->template getarg<sfs_addkey_arg> ();
++ sfs_addkey_arg *aa = sbp->getarg<sfs_addkey_arg> ();
+ key *nk;
+ nk = New key (&gmgr);
+ // XXX - hack for testing new version of protocol.
+@@ -268,7 +268,7 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_REMAUTH:
+ {
+- sfs_remauth_arg *ra = sbp->template getarg<sfs_remauth_arg> ();
++ sfs_remauth_arg *ra = sbp->getarg<sfs_remauth_arg> ();
+ authmeth *a;
+ bool ok = false;
+ switch (ra->type) {
+@@ -318,7 +318,7 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_ADDCERTPROG:
+ {
+- sfsagent_certprog *arg = sbp->template getarg<sfsagent_certprog> ();
++ sfsagent_certprog *arg = sbp->getarg<sfsagent_certprog> ();
+ str av0;
+ if (arg->av.size () > 0 && (av0 = find_program (arg->av[0]))) {
+ bool found = false;
+@@ -351,7 +351,7 @@ sfsagent::ctldisp (svccb *sbp)
+ size_t n = certprogs.size ();
+ sfsagent_certprog cp;
+ rxfilter rxf;
+- sfsauth_realm *arg = sbp->template getarg<sfsauth_realm> ();
++ sfsauth_realm *arg = sbp->getarg<sfsauth_realm> ();
+ bool found = false;
+
+ while (n--) {
+@@ -383,7 +383,7 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_ADDREVOKEPROG:
+ {
+- sfsagent_revokeprog *arg = sbp->template getarg<sfsagent_revokeprog> ();
++ sfsagent_revokeprog *arg = sbp->getarg<sfsagent_revokeprog> ();
+ str av0;
+ if (arg->av.size () > 0 && (av0 = find_program (arg->av[0]))) {
+ arg->av[0] = av0;
+@@ -416,7 +416,7 @@ sfsagent::ctldisp (svccb *sbp)
+ case AGENTCTL_SETNOREVOKE:
+ {
+ sfsagent_norevoke_list *arg
+- = sbp->template getarg<sfsagent_norevoke_list> ();
++ = sbp->getarg<sfsagent_norevoke_list> ();
+ for (sfs_hash *hid = arg->base (); hid < arg->lim (); hid++)
+ norevoke.insert (*hid);
+ sbp->reply (NULL);
+@@ -445,13 +445,13 @@ sfsagent::ctldisp (svccb *sbp)
+ else if (name)
+ sbp->replyref ((int32_t) EBUSY);
+ else {
+- setname (*sbp->template getarg<sfs_hostname> ());
++ setname (*sbp->getarg<sfs_hostname> ());
+ sbp->replyref ((int32_t) 0);
+ }
+ break;
+ case AGENTCTL_REX:
+ {
+- sfsagent_rex_arg *prca = sbp->template getarg<sfsagent_rex_arg> ();
++ sfsagent_rex_arg *prca = sbp->getarg<sfsagent_rex_arg> ();
+ if (name) {
+ warn << name << ": " << prca->dest << "(rexsess)\n";
+ }
+@@ -465,13 +465,13 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_KILLSESS:
+ {
+- sbp->replyref (kill_rexsess (*sbp->template getarg<sfs_hostname> ()));
++ sbp->replyref (kill_rexsess (*sbp->getarg<sfs_hostname> ()));
+ break;
+ }
+ case AGENTCTL_ADDSRPNAME:
+ {
+ sfsagent_srpname_pair *arg =
+- sbp->template getarg<sfsagent_srpname_pair> ();
++ sbp->getarg<sfsagent_srpname_pair> ();
+
+ if (arg->srpname && arg->srpname.len () > 0
+ && arg->sfsname && arg->sfsname.len () > 0) {
+@@ -500,7 +500,7 @@ sfsagent::ctldisp (svccb *sbp)
+ }
+ case AGENTCTL_LOOKUPSRPNAME:
+ {
+- sfsagent_srpname *arg = sbp->template getarg<sfsagent_srpname> ();
++ sfsagent_srpname *arg = sbp->getarg<sfsagent_srpname> ();
+ str *sfsname = srpnames[*arg];
+
+ sfsagent_srpname_res res (false);
diff --git a/security/sfs/patches/patch-bh b/security/sfs/patches/patch-bh
new file mode 100644
index 00000000000..9dbc647f2ff
--- /dev/null
+++ b/security/sfs/patches/patch-bh
@@ -0,0 +1,22 @@
+$NetBSD: patch-bh,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/sfsauthmgr.C.orig 2002-10-08 21:05:01.000000000 +0100
++++ ./agent/sfsauthmgr.C
+@@ -283,7 +283,7 @@ extauth::~extauth ()
+ void
+ authmgr::authinit (svccb *s)
+ {
+- sfsagent_authinit_arg *aa = s->template getarg<sfsagent_authinit_arg> ();
++ sfsagent_authinit_arg *aa = s->getarg<sfsagent_authinit_arg> ();
+
+ authmeth *k = lookup_by_index (aa->ntries);
+ if (!k || aa->authinfo.type != SFS_AUTHINFO) {
+@@ -298,7 +298,7 @@ authmgr::authinit (svccb *s)
+ void
+ authmgr::authmore (svccb *s)
+ {
+- sfsagent_authmore_arg *aa = s->template getarg<sfsagent_authmore_arg> ();
++ sfsagent_authmore_arg *aa = s->getarg<sfsagent_authmore_arg> ();
+ sfs_hash dummy;
+ authmeth *k = asmgr.retrieve (aa->authinfo, aa->seqno, dummy);
+ if (!k || aa->authinfo.type != SFS_AUTHINFO) {
diff --git a/security/sfs/patches/patch-bi b/security/sfs/patches/patch-bi
new file mode 100644
index 00000000000..c43358dae09
--- /dev/null
+++ b/security/sfs/patches/patch-bi
@@ -0,0 +1,13 @@
+$NetBSD: patch-bi,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/sfsdea.C.orig 2002-11-13 17:49:59.000000000 +0000
++++ ./agent/sfsdea.C
+@@ -53,7 +53,7 @@ void
+ sfsdea::authinit (svccb *sbp)
+ {
+ ref<sfsagent_auth_res> res = New refcounted<sfsagent_auth_res> ();
+- sfsextauth_init *aa = sbp->template getarg<sfsextauth_init> ();
++ sfsextauth_init *aa = sbp->getarg<sfsextauth_init> ();
+
+ if (opt_confirm && !confirmed (aa))
+ sbp->replyref (sfsagent_auth_res (false));
diff --git a/security/sfs/patches/patch-bj b/security/sfs/patches/patch-bj
new file mode 100644
index 00000000000..6ffcc991ffb
--- /dev/null
+++ b/security/sfs/patches/patch-bj
@@ -0,0 +1,31 @@
+$NetBSD: patch-bj,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/sfsproac.C.orig 2002-11-21 18:54:56.000000000 +0000
++++ ./agent/sfsproac.C
+@@ -61,7 +61,7 @@ sfsproac::set_name (str &n)
+ void
+ sfsproac::authinit (svccb *sbp)
+ {
+- sfsextauth_init *aa = sbp->template getarg<sfsextauth_init> ();
++ sfsextauth_init *aa = sbp->getarg<sfsextauth_init> ();
+ ptr<sfs_authreq2> authreq = New refcounted<sfs_authreq2>;
+
+ authreq->type = SFS_SIGNED_AUTHREQ;
+@@ -87,7 +87,7 @@ void
+ sfsproac::authinitcb (svccb *sbp, ptr<sfs_authreq2> ar,
+ str err, ptr<sfs_sig2> sig)
+ {
+- sfsagent_auth_res *res = sbp->template getres<sfsagent_auth_res> ();
++ sfsagent_auth_res *res = sbp->getres<sfsagent_auth_res> ();
+
+ if (!sig) {
+ warn << "sfsproac::authinit: sign failure on request: " << err << "\n";
+@@ -107,7 +107,7 @@ sfsproac::authinitcb (svccb *sbp, ptr<sf
+
+ if (!xdr2bytes (*(res->certificate), ar)) {
+ warn ("sfsproac::authinit: xdr failure on request:\n");
+- rpc_print(warn, sbp->template getarg<sfsextauth_init> ());
++ rpc_print(warn, sbp->getarg<sfsextauth_init> ());
+ res->set_authenticate (false);
+ }
+ }
diff --git a/security/sfs/patches/patch-bk b/security/sfs/patches/patch-bk
new file mode 100644
index 00000000000..b541c50c730
--- /dev/null
+++ b/security/sfs/patches/patch-bk
@@ -0,0 +1,13 @@
+$NetBSD: patch-bk,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./agent/agent.h.orig 2002-11-27 22:51:39.000000000 +0000
++++ ./agent/agent.h
+@@ -151,7 +151,7 @@ struct authsess {
+ tailq_entry<authsess> link;
+ ihash_entry<authsess> hlink;
+
+- authsess::authsess (authmeth *a, u_int i);
++ authsess (authmeth *a, u_int i);
+
+ void to_str (strbuf &b)
+ {
diff --git a/security/sfs/patches/patch-bl b/security/sfs/patches/patch-bl
new file mode 100644
index 00000000000..f57f71f52d2
--- /dev/null
+++ b/security/sfs/patches/patch-bl
@@ -0,0 +1,13 @@
+$NetBSD: patch-bl,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfssd/sfssd.C.orig 2002-12-20 14:50:40.000000000 +0000
++++ ./sfssd/sfssd.C
+@@ -405,7 +405,7 @@ sclone (ref<asrv> s, ref<axprt_clone> x,
+ return;
+ }
+
+- sfs_connectarg *arg = sbp->template getarg<sfs_connectarg> ();
++ sfs_connectarg *arg = sbp->getarg<sfs_connectarg> ();
+ u_int32_t rel;
+ sfs_service service;
+ str name;
diff --git a/security/sfs/patches/patch-bm b/security/sfs/patches/patch-bm
new file mode 100644
index 00000000000..a0dddb34119
--- /dev/null
+++ b/security/sfs/patches/patch-bm
@@ -0,0 +1,27 @@
+$NetBSD: patch-bm,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsrwsd/client.C.orig 2002-08-21 14:54:50.000000000 +0100
++++ ./sfsrwsd/client.C
+@@ -80,7 +80,7 @@ client::renamecb_1 (svccb *sbp, void *_r
+ }
+
+ lookup3res *ares = New lookup3res;
+- rqs.c->call (NFSPROC3_LOOKUP, &sbp->template getarg<rename3args> ()->to,
++ rqs.c->call (NFSPROC3_LOOKUP, &sbp->getarg<rename3args> ()->to,
+ ares, wrap (mkref (this), &client::renamecb_2,
+ sbp, res, rqs, ares), auth);
+ }
+@@ -113,11 +113,11 @@ client::nfs3dispatch (svccb *sbp)
+
+ void *res = nfs_program_3.tbl[sbp->proc ()].alloc_res ();
+ if (sbp->proc () == NFSPROC3_RENAME)
+- rqs.c->call (sbp->proc (), sbp->template getarg<void> (), res,
++ rqs.c->call (sbp->proc (), sbp->getarg<void> (), res,
+ wrap (mkref (this), &client::renamecb_1, sbp, res, rqs),
+ authtab[authno]);
+ else
+- rqs.c->call (sbp->proc (), sbp->template getarg<void> (), res,
++ rqs.c->call (sbp->proc (), sbp->getarg<void> (), res,
+ wrap (mkref (this), &client::nfs3reply, sbp, res, rqs),
+ authtab[authno]);
+ }
diff --git a/security/sfs/patches/patch-bn b/security/sfs/patches/patch-bn
new file mode 100644
index 00000000000..c32d292b122
--- /dev/null
+++ b/security/sfs/patches/patch-bn
@@ -0,0 +1,49 @@
+$NetBSD: patch-bn,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsrwsd/filesrv.C.orig 2002-08-21 14:54:50.000000000 +0100
++++ ./sfsrwsd/filesrv.C
+@@ -358,7 +358,7 @@ bool
+ filesrv::fixarg (svccb *sbp, reqstate *rqsp)
+ {
+ fh3trans fht (fh3trans::DECODE, fhkey);
+- if (!nfs3_transarg (fht, sbp->template getarg<void> (), sbp->proc ())) {
++ if (!nfs3_transarg (fht, sbp->getarg<void> (), sbp->proc ())) {
+ nfs3exp_err (sbp, nfsstat3 (fht.err));
+ return false;
+ }
+@@ -378,7 +378,7 @@ filesrv::fixarg (svccb *sbp, reqstate *r
+ * creating multiple mount points for each server. Is this bad? */
+ if (!sbp->getaui ()
+ && !anon_checkperm (sbp, fsp->options,
+- *sbp->template getarg<nfs_fh3> () == fsp->fh_root))
++ *sbp->getarg<nfs_fh3> () == fsp->fh_root))
+ return false;
+ #else
+ /* The other option is to disallow this. Then commands like "ls
+@@ -386,7 +386,7 @@ filesrv::fixarg (svccb *sbp, reqstate *r
+ if (!sbp->getaui ()
+ && !anon_checkperm (sbp, fsp->options,
+ (fsp == fstab.base ()
+- && (*sbp->template getarg<nfs_fh3> ()
++ && (*sbp->getarg<nfs_fh3> ()
+ == fsp->fh_root))))
+ return false;
+ #endif
+@@ -394,7 +394,7 @@ filesrv::fixarg (svccb *sbp, reqstate *r
+ switch (sbp->proc ()) {
+ case NFSPROC3_LOOKUP:
+ {
+- diropargs3 *doa = sbp->template getarg<diropargs3> ();
++ diropargs3 *doa = sbp->getarg<diropargs3> ();
+ if (doa->name == ".." && doa->dir == fsp->fh_root) {
+ if (!getfsno (fsp)) {
+ nfs3exp_err (sbp, NFS3ERR_ACCES);
+@@ -411,7 +411,7 @@ filesrv::fixarg (svccb *sbp, reqstate *r
+ case NFSPROC3_READDIR:
+ case NFSPROC3_READDIRPLUS:
+ {
+- nfs_fh3 *rpa = sbp->template getarg<nfs_fh3> ();
++ nfs_fh3 *rpa = sbp->getarg<nfs_fh3> ();
+ if (*rpa == fsp->fh_root)
+ rqsp->rootfh = true;
+ break;
diff --git a/security/sfs/patches/patch-bo b/security/sfs/patches/patch-bo
new file mode 100644
index 00000000000..86c35ff8876
--- /dev/null
+++ b/security/sfs/patches/patch-bo
@@ -0,0 +1,40 @@
+$NetBSD: patch-bo,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./rex/chan.C.orig 2002-07-31 22:42:16.000000000 +0100
++++ ./rex/chan.C
+@@ -39,7 +39,7 @@ void
+ chanbase::kill (svccb *sbp)
+ {
+ assert (sbp->prog () == REX_PROG && sbp->proc () == REX_KILL);
+- rex_int_arg *argp = sbp->template getarg<rex_int_arg> ();
++ rex_int_arg *argp = sbp->getarg<rex_int_arg> ();
+ assert (argp->channel == channo);
+ sbp->replyref (bool (pid != -1 && ::kill (pid, argp->val) >= 0));
+ }
+@@ -245,7 +245,7 @@ void
+ chanfd::data (svccb *sbp)
+ {
+ assert (sbp->prog () == REX_PROG && sbp->proc () == REX_DATA);
+- rex_payload *dp = sbp->template getarg<rex_payload> ();
++ rex_payload *dp = sbp->getarg<rex_payload> ();
+ assert (dp->channel == channo);
+ if (dp->fd < 0 || implicit_cast<size_t> (dp->fd) >= fdi.size ()) {
+ warn ("payload fd %d out of range\n", dp->fd);
+@@ -267,7 +267,7 @@ chanfd::data (svccb *sbp)
+ }
+ else {
+ fdi[fdn].weof = true;
+- fdi[fdn].wuio.iovcb (wrap (this, &chanfd::voidshut, fdn, SHUT_WR));
++ fdi[fdn].wuio.iovcb (wrap (this, &chanfd::voidshut, fdn, (int)SHUT_WR));
+ sbp->replyref (true);
+ }
+ }
+@@ -276,7 +276,7 @@ void
+ chanfd::close (svccb *sbp)
+ {
+ assert (sbp->prog () == REX_PROG && sbp->proc () == REX_CLOSE);
+- rex_int_arg *argp = sbp->template getarg<rex_int_arg> ();
++ rex_int_arg *argp = sbp->getarg<rex_int_arg> ();
+ assert (argp->channel == channo);
+ fdi[argp->val].close ();
+ sbp->replyref (true);
diff --git a/security/sfs/patches/patch-bp b/security/sfs/patches/patch-bp
new file mode 100644
index 00000000000..91b36b3f42a
--- /dev/null
+++ b/security/sfs/patches/patch-bp
@@ -0,0 +1,58 @@
+$NetBSD: patch-bp,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./rex/proxy.C.orig 2002-11-26 23:13:00.000000000 +0000
++++ ./rex/proxy.C
+@@ -76,7 +76,7 @@ rexclnt::dispatch (svccb *sbp)
+ break;
+ case REX_DATA:
+ {
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+ if (argp->fd < 0) {
+ chantab.remove (argp->channel);
+ sbp->replyref (false);
+@@ -90,7 +90,7 @@ rexclnt::dispatch (svccb *sbp)
+ case REX_CLOSE:
+ case REX_KILL:
+ {
+- rex_int_arg *argp = sbp->template getarg<rex_int_arg> ();
++ rex_int_arg *argp = sbp->getarg<rex_int_arg> ();
+ if (chanbase *c = chantab[argp->channel]) {
+ if (sbp->proc () == REX_KILL)
+ c->kill (sbp);
+@@ -103,7 +103,7 @@ rexclnt::dispatch (svccb *sbp)
+ }
+ case REX_MKCHANNEL:
+ {
+- rex_mkchannel_arg *argp = sbp->template getarg<rex_mkchannel_arg> ();
++ rex_mkchannel_arg *argp = sbp->getarg<rex_mkchannel_arg> ();
+ ptr<chanbase> cb;
+
+ int cn = chanalloc ();
+@@ -120,7 +120,7 @@ rexclnt::dispatch (svccb *sbp)
+ }
+ case REX_SETENV:
+ {
+- rex_setenv_arg *arg = sbp->template getarg<rex_setenv_arg> ();
++ rex_setenv_arg *arg = sbp->getarg<rex_setenv_arg> ();
+ if (!arg->name.len ()) {
+ warn ("received REX_SETENV with null name\n");
+ sbp->replyref (false);
+@@ -143,7 +143,7 @@ rexclnt::dispatch (svccb *sbp)
+ case REX_UNSETENV:
+ {
+ #ifdef HAVE_UNSETENV
+- rex_unsetenv_arg *arg = sbp->template getarg<rex_unsetenv_arg> ();
++ rex_unsetenv_arg *arg = sbp->getarg<rex_unsetenv_arg> ();
+ if (arg->len ())
+ unsetenv (arg->cstr ());
+ else
+@@ -176,7 +176,7 @@ ctldispatch (svccb *sbp)
+ break;
+ case REXCTL_CONNECT:
+ {
+- sfs_sessinfo *argp = sbp->template getarg<sfs_sessinfo> ();
++ sfs_sessinfo *argp = sbp->getarg<sfs_sessinfo> ();
+ int fd = rxprt->recvfd ();
+ if (fd >= 0) {
+ ref<axprt_crypt> x (axprt_crypt::alloc (fd));
diff --git a/security/sfs/patches/patch-bq b/security/sfs/patches/patch-bq
new file mode 100644
index 00000000000..8c9ebcd5de9
--- /dev/null
+++ b/security/sfs/patches/patch-bq
@@ -0,0 +1,31 @@
+$NetBSD: patch-bq,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./rex/ptyd.C.orig 2002-09-21 04:28:08.000000000 +0100
++++ ./rex/ptyd.C
+@@ -53,7 +53,7 @@ struct ptyclient {
+ const uid_t uid;
+ ihash<const str, pty, &pty::path, &pty::link> ptys;
+
+- ptyclient::ptyclient (ref<axprt_unix> xx, uid_t u)
++ ptyclient (ref<axprt_unix> xx, uid_t u)
+ : x (xx), s (asrv::alloc (x, ptyd_prog_1)), uid (u) {}
+ ~ptyclient ();
+ void dispatch (svccb *sbp);
+@@ -185,7 +185,7 @@ ptyclient::dispatch (svccb *sbp)
+ str path;
+ pty_alloc_res res (0);
+ if (pty_alloc (&fd, &path)) {
+- New pty (this, path, *sbp->template getarg<utmphost> ());
++ New pty (this, path, *sbp->getarg<utmphost> ());
+ x->sendfd (fd);
+ *res.path = path;
+ }
+@@ -197,7 +197,7 @@ ptyclient::dispatch (svccb *sbp)
+ case PTYD_PTY_FREE:
+ {
+ int32_t res = 0;
+- if (pty *p = ptys[*sbp->template getarg<utmphost> ()])
++ if (pty *p = ptys[*sbp->getarg<utmphost> ()])
+ delete p;
+ else
+ res = ENOENT;
diff --git a/security/sfs/patches/patch-br b/security/sfs/patches/patch-br
new file mode 100644
index 00000000000..fa37429bfc2
--- /dev/null
+++ b/security/sfs/patches/patch-br
@@ -0,0 +1,49 @@
+$NetBSD: patch-br,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./rex/rex.C.orig 2002-11-19 19:58:44.000000000 +0000
++++ ./rex/rex.C
+@@ -230,7 +230,7 @@ public:
+ void
+ newfd (svccb *sbp)
+ {
+- rexcb_newfd_arg *arg = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *arg = sbp->getarg<rexcb_newfd_arg> ();
+
+ masterfd = arg->newfd;
+ vNew refcounted<ttyfd> (pch, masterfd, fd_in, fd_out);
+@@ -358,7 +358,7 @@ public:
+ return;
+ }
+
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+ size_t len = argp->data.size ();
+
+ if (len) {
+@@ -514,7 +514,7 @@ class xsocklistenfd : public rexfd {
+ }
+ tcp_nodelay (fd);
+
+- rexcb_newfd_arg *parg = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *parg = sbp->getarg<rexcb_newfd_arg> ();
+ vNew refcounted<xclientfd> (pch, parg->newfd, fd, x11_real_data,
+ x11_fake_data, x11_data_len,
+ implicit_cast<char *> (x11_proto));
+@@ -583,7 +583,7 @@ public:
+
+ void
+ newfd (svccb *sbp) {
+- rexcb_newfd_arg *parg = sbp->template getarg<rexcb_newfd_arg> ();
++ rexcb_newfd_arg *parg = sbp->getarg<rexcb_newfd_arg> ();
+
+ if (isunix) {
+ int fd = unixsocket_connect (unixpath.cstr ());
+@@ -658,7 +658,7 @@ public:
+
+ void
+ data (svccb *sbp) {
+- rex_payload *argp = sbp->template getarg<rex_payload> ();
++ rex_payload *argp = sbp->getarg<rex_payload> ();
+
+ // length w/o newline
+ size_t lenwonl = argp->data.size ();
diff --git a/security/sfs/patches/patch-bs b/security/sfs/patches/patch-bs
new file mode 100644
index 00000000000..92bceca34e6
--- /dev/null
+++ b/security/sfs/patches/patch-bs
@@ -0,0 +1,29 @@
+$NetBSD: patch-bs,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./rex/rexd.C.orig 2002-11-28 16:20:55.000000000 +0000
++++ ./rex/rexd.C
+@@ -213,7 +213,7 @@ rexsess::attach (svccb *sbp)
+ * file descriptor off to the child process and discard any extra
+ * data we have read and buffered). */
+ xhinfo::xon (xs, false);
+- rexd_attach_arg *argp = sbp->template getarg<rexd_attach_arg> ();
++ rexd_attach_arg *argp = sbp->getarg<rexd_attach_arg> ();
+
+ sfs_hash sid;
+ ref<sfs_sessinfo> si = New refcounted<sfs_sessinfo>;
+@@ -283,13 +283,13 @@ rexclient::dispatch (svccb *sbp)
+ }
+ rexd_spawn_res res;
+ vNew rexsess (&credtab[authno],
+- sbp->template getarg<rexd_spawn_arg> (), &res);
++ sbp->getarg<rexd_spawn_arg> (), &res);
+ sbp->replyref (res);
+ break;
+ }
+ case REXD_ATTACH:
+ {
+- rexd_attach_arg *argp = sbp->template getarg<rexd_attach_arg> ();
++ rexd_attach_arg *argp = sbp->getarg<rexd_attach_arg> ();
+ if (rexsess *sp = sesstab[argp->sessid]) {
+ sp->attach (sbp);
+ delete this;
diff --git a/security/sfs/patches/patch-bt b/security/sfs/patches/patch-bt
new file mode 100644
index 00000000000..487ba95e980
--- /dev/null
+++ b/security/sfs/patches/patch-bt
@@ -0,0 +1,76 @@
+$NetBSD: patch-bt,v 1.1 2006/10/21 11:53:13 agc Exp $
+
+--- ./sfsauthd/authclnt.C.orig 2002-12-01 02:45:25.000000000 +0000
++++ ./sfsauthd/authclnt.C
+@@ -336,7 +336,7 @@ authclnt::dispatch (svccb *sbp)
+ case SFSAUTH2_LOGIN:
+ {
+ sfsauth2_loginres res;
+- sfsauth_login (&res, sbp->template getarg<sfsauth2_loginarg> (),
++ sfsauth_login (&res, sbp->getarg<sfsauth2_loginarg> (),
+ sfsauth_login_srp);
+ sbp->replyref (res);
+ break;
+@@ -359,7 +359,7 @@ authclnt::dispatch (svccb *sbp)
+ void
+ authclnt::sfsauth_sign (svccb *sbp)
+ {
+- sfsauth2_sign_arg *arg = sbp->template getarg<sfsauth2_sign_arg> ();
++ sfsauth2_sign_arg *arg = sbp->getarg<sfsauth2_sign_arg> ();
+ sfsauth2_sign_res res (true);
+ u_int32_t authno = sbp->getaui ();
+ sfsauth_dbrec db;
+@@ -514,7 +514,7 @@ authclnt::sfsauth_update (svccb *sbp)
+ return;
+ }
+
+- sfsauth2_update_arg *argp = sbp->template getarg<sfsauth2_update_arg> ();
++ sfsauth2_update_arg *argp = sbp->getarg<sfsauth2_update_arg> ();
+ if (argp->req.type != SFS_UPDATEREQ
+ || (argp->req.rec.type != SFSAUTH_USER
+ && argp->req.rec.type != SFSAUTH_GROUP)) {
+@@ -752,7 +752,7 @@ authclnt::get_user_cursor (dbfile **dbpp
+ void
+ authclnt::query_user (svccb *sbp)
+ {
+- sfsauth2_query_arg *arg = sbp->template getarg<sfsauth2_query_arg> ();
++ sfsauth2_query_arg *arg = sbp->getarg<sfsauth2_query_arg> ();
+ ptr<authcursor> ac;
+ sfsauth2_query_res res;
+
+@@ -808,7 +808,7 @@ authclnt::query_certinfo (svccb *sbp)
+ void
+ authclnt::query_group (svccb *sbp)
+ {
+- sfsauth2_query_arg *arg = sbp->template getarg<sfsauth2_query_arg> ();
++ sfsauth2_query_arg *arg = sbp->getarg<sfsauth2_query_arg> ();
+ sfsauth2_query_res res;
+ if (arg->key.type != SFSAUTH_DBKEY_NAME
+ && arg->key.type != SFSAUTH_DBKEY_ID) {
+@@ -854,7 +854,7 @@ authclnt::query_group (svccb *sbp)
+ void
+ authclnt::sfsauth_query (svccb *sbp)
+ {
+- sfsauth2_query_arg *arg = sbp->template getarg<sfsauth2_query_arg> ();
++ sfsauth2_query_arg *arg = sbp->getarg<sfsauth2_query_arg> ();
+ switch (arg->type) {
+ case SFSAUTH_USER:
+ query_user (sbp);
+@@ -885,7 +885,7 @@ authclnt::sfs_login (svccb *sbp)
+ return;
+ }
+ sfsauth2_loginarg la;
+- la.arg = *sbp->template getarg<sfs_loginarg> ();
++ la.arg = *sbp->getarg<sfs_loginarg> ();
+ la.authid = authid;
+ la.source = client_name << "!" << progname;
+
+@@ -937,7 +937,7 @@ authclnt::utab_insert (u_int32_t authno,
+ void
+ authclnt::sfs_logout (svccb *sbp)
+ {
+- u_int32_t authno = *sbp->template getarg<u_int32_t> ();
++ u_int32_t authno = *sbp->getarg<u_int32_t> ();
+ urec_t *u = utab[authno];
+ if (u)
+ urecfree (u);