the previous patch removed some patches by mistake, please use
this one. spotted by brad.
diff -urN -x CVS samba/Makefile /usr/myports/net/samba/Makefile
--- samba/Makefile Fri May 27 06:54:40 2005
+++ /usr/myports/net/samba/Makefile Tue Aug 9 09:16:10 2005
@@ -1,11 +1,10 @@
-# $OpenBSD: Makefile,v 1.53 2005/05/27 04:54:40 sturm Exp $
+# $OpenBSD: Makefile,v 1.52 2005/05/03 04:33:24 sturm Exp $
COMMENT= "SMB and CIFS client and server for UNIX"
COMMENT-docs= "documentation and examples for samba"
-DISTNAME= samba-3.0.13
-PKGNAME= ${DISTNAME}p0
-FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}p0
+DISTNAME= samba-3.0.14a
+FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/}
CATEGORIES= net
@@ -50,7 +49,8 @@
--with-swatdir="${PREFIX}/share/swat" \
--with-ssl \
--with-sslinc="/usr/include/ssl" \
- --with-ssllib="/usr/lib"
+ --with-ssllib="/usr/lib" \
+ --with-utmp
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
diff -urN -x CVS samba/distinfo /usr/myports/net/samba/distinfo
--- samba/distinfo Sun Apr 3 13:20:37 2005
+++ /usr/myports/net/samba/distinfo Fri Jul 1 08:31:32 2005
@@ -1,4 +1,4 @@
-MD5 (samba-3.0.13.tar.gz) = 262c9f8b2f2d6910f5b3472e215eddf6
-RMD160 (samba-3.0.13.tar.gz) = 15ffb41d2b7162e87c7e09fd898b450d201a1a97
-SHA1 (samba-3.0.13.tar.gz) = 619b506295c48c54d20b40f5e3359b359691097c
-SIZE (samba-3.0.13.tar.gz) = 15584244
+MD5 (samba-3.0.14a.tar.gz) = ebee37e66a8b5f6fd328967dc09088e8
+RMD160 (samba-3.0.14a.tar.gz) = 69993b25fc5d4d172fc70e26b9e5e4b5b9ab0c0f
+SHA1 (samba-3.0.14a.tar.gz) = 978ff392d575c717069c66e918f6bbbf815b84b1
+SIZE (samba-3.0.14a.tar.gz) = 15605851
diff -urN -x CVS samba/patches/patch-smbd_utmp_c
/usr/myports/net/samba/patches/patch-smbd_utmp_c
--- samba/patches/patch-smbd_utmp_c Thu Jan 1 01:00:00 1970
+++ /usr/myports/net/samba/patches/patch-smbd_utmp_c Wed Jun 15 19:36:40 2005
@@ -0,0 +1,64 @@
+$OpenBSD$
+--- smbd/utmp.c.orig Fri Feb 25 18:59:26 2005
++++ smbd/utmp.c Wed Jun 15 19:36:32 2005
+@@ -245,6 +245,7 @@ static void uw_pathname(pstring fname, c
+ }
+
+ #ifndef HAVE_PUTUTLINE
++#include <ttyent.h>
+
+ /****************************************************************************
+ Update utmp file directly. No subroutine interface: probably a BSD system.
+@@ -252,8 +253,50 @@ static void uw_pathname(pstring fname, c
+
+ static void pututline_my(pstring uname, struct utmp *u, BOOL claim)
+ {
+- DEBUG(1,("pututline_my: not yet implemented\n"));
+- /* BSD implementor: may want to consider (or not) adjusting "lastlog" */
++ int fd, topslot;
++ struct utmp ubuf;
++
++ if ((fd = open(uname, O_RDWR, 0)) < 0)
++ return;
++
++ if (!setttyent())
++ return;
++
++ for (topslot = 0; getttyent() != (struct ttyent *)NULL; )
++ topslot++;
++
++ if (!endttyent())
++ return;
++
++ (void) lseek(fd, (off_t)(topslot * sizeof(struct utmp)), SEEK_SET);
++
++ DEBUG(1,("pututline(%s, %s, %d); topslot=%d\n",
++ u->ut_line, u->ut_name, claim, topslot));
++
++ while (1) {
++ if (read(fd, &ubuf, sizeof(ubuf)) == sizeof(ubuf)) {
++ if ((claim && !ubuf.ut_name[0]) ||
++ (!claim && ubuf.ut_name[0] &&
++ !strncmp(ubuf.ut_line, u->ut_line, UT_LINESIZE))) {
++ (void) lseek(fd, -(off_t)sizeof(struct utmp),
++ SEEK_CUR);
++ break;
++ }
++ topslot++;
++ } else {
++ (void) lseek(fd, (off_t)(topslot *
++ sizeof(struct utmp)), SEEK_SET);
++ break;
++ }
++ }
++
++ if (!claim) {
++ memset((char *)&u->ut_name, '\0', sizeof(u->ut_name));
++ memset((char *)&u->ut_host, '\0', sizeof(u->ut_host));
++ }
++ (void) write(fd, u, sizeof(struct utmp));
++
++ (void) close(fd);
+ }
+ #endif /* HAVE_PUTUTLINE */
+