diff --git a/net/samba/Makefile b/net/samba/Makefile index 9e14516847f..ad09c86aba5 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,9 +1,11 @@ # OpenBSD makefile for: samba -# Version required: 1.9.15p8 +# Version required: 1.9.17p4 # Date created: 16 Nov 1997 # Whom: ejovi +# +# $OpenBSD: Makefile,v 1.2 1997/11/16 22:01:36 todd Exp $ -DISTNAME= samba-1.9.17p2 +DISTNAME= samba-1.9.17p4 CATEGORIES= net MASTER_SITES= ftp://samba.anu.edu.au/pub/samba/ WRKSRC= ${WRKDIR}/${DISTNAME}/source @@ -18,4 +20,24 @@ MAN8= smbd.8 nmbd.8 smbpasswd.8 pre-install: @${MKDIR} /usr/local/samba +MAKE_FLAGS= BASEDIR=$(PREFIX) +MAKE_FLAGS+= MANDIR=$(PREFIX)/man +MAKE_FLAGS+= SBINDIR=$(PREFIX)/sbin +MAKE_FLAGS+= LIBDIR=$(PREFIX)/etc +MAKE_FLAGS+= VARDIR=/var/log +MAKE_FLAGS+= SMBLOGFILE=/var/log/smb +MAKE_FLAGS+= NMBLOGFILE=/var/log/nmb +MAKE_FLAGS+= CONFIGFILE=$(PREFIX)/etc/smb.conf +MAKE_FLAGS+= LMHOSTSFILE=$(PREFIX)/etc/lmhosts +MAKE_FLAGS+= LOCKDIR=/var/spool/lock + .include + +.if ${OPSYS} == "FreeBSD" +MAKE_FLAGS+= LIBSM=-lcrypt FLAGSM="-DFreeBSD -DBSD44" +.elif (${OPSYS} == "OpenBSD") +MAKE_FLAGS+= FLAGSM="-DBSD44 -DFAST_SHARE_MODES" LIBSM= +.endif + +MAKE_FLAGS+= -f + diff --git a/net/samba/files/md5 b/net/samba/files/md5 index d89f0c7fae1..7029bc83d15 100644 --- a/net/samba/files/md5 +++ b/net/samba/files/md5 @@ -1 +1 @@ -MD5 (samba-1.9.17p2.tar.gz) = 27ac28ccf084268ba5c8c0b3a0ed12e4 +MD5 (samba-1.9.17p4.tar.gz) = dd8a65242a2bb969a9a5f3d7095df602 diff --git a/net/samba/patches/patch-aa b/net/samba/patches/patch-aa index 6c07f098047..148aa3b0ad2 100644 --- a/net/samba/patches/patch-aa +++ b/net/samba/patches/patch-aa @@ -1,70 +1,14 @@ ---- Makefile.orig Sat Sep 27 00:04:52 1997 -+++ Makefile Wed Oct 15 17:09:58 1997 -@@ -5,11 +5,11 @@ - ########################################################################### - - # The base directory for all samba files --BASEDIR = /usr/local/samba -+BASEDIR = $(PREFIX) - - # The base manpages directory to put the man pages in - # Note: $(MANDIR)/man1, $(MANDIR)/man5 and $(MANDIR)/man8 must exist. --MANDIR = /usr/local/man -+MANDIR = $(PREFIX)/man - - # The directories to put things in. If you use multiple - # architectures or share the samba binaries across NFS then -@@ -18,9 +18,9 @@ - # normally only applies to nmbd and smbd - # SBINDIR implies a secure binary directory - BINDIR = $(BASEDIR)/bin --SBINDIR = $(BASEDIR)/bin --LIBDIR = $(BASEDIR)/lib --VARDIR = $(BASEDIR)/var -+SBINDIR = $(BASEDIR)/sbin -+ETCDIR = $(BASEDIR)/etc -+LOGDIR = /var/log - - # The permissions to give the executables - INSTALLPERMS = 0755 -@@ -45,13 +45,13 @@ - # set these to where to find various files - # These can be overridden by command line switches (see smbd(8)) - # or in smb.conf (see smb.conf(5)) --SMBLOGFILE = $(VARDIR)/log.smb --NMBLOGFILE = $(VARDIR)/log.nmb --CONFIGFILE = $(LIBDIR)/smb.conf --LMHOSTSFILE = $(LIBDIR)/lmhosts -+SMBLOGFILE = $(LOGDIR)/smb -+NMBLOGFILE = $(LOGDIR)/nmb -+CONFIGFILE = $(ETCDIR)/smb.conf -+LMHOSTSFILE = $(ETCDIR)/lmhosts - - # the directory where lock files go --LOCKDIR = $(VARDIR)/locks -+LOCKDIR = /var/spool/lock - - # set this to the default group you want your machine to appear in - # for browsing. This can also be set in nmbd (see nmbd(8)) -@@ -383,8 +383,8 @@ - # This is for FreeBSD - # contributed by kuku@acds.physik.rwth-aachen.de - # NOTE: You may need to add -DBSD44 if you have password problems --# FLAGSM = -DFreeBSD -DFAST_SHARE_MODES --# LIBSM = -lcrypt -+FLAGSM = -DFreeBSD -DFAST_SHARE_MODES -+LIBSM = -lcrypt +--- Makefile.orig Tue Oct 21 05:47:16 1997 ++++ Makefile Sun Nov 16 15:33:11 1997 +@@ -386,6 +386,11 @@ + # FLAGSM = -DFreeBSD -DFAST_SHARE_MODES + # LIBSM = -lcrypt ++# This is for OpenBSD ++# contributed by todd@openbsd.org ++# FLAGSM = -DFAST_SHARE_MODES -DBSD44 ++# LIBSM = ++ # This is for NEXTSTEP Release 2.X -@@ -684,8 +684,8 @@ - install: installbin installman installscripts - - installbin: all -- @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS) -- @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) -+ @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(ETCDIR) $(LOGDIR) $(SPROGS) -+ @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(ETCDIR) $(LOGDIR) $(PROGS) - - installscripts: - @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS) + # No Posix. diff --git a/net/samba/patches/patch-ab b/net/samba/patches/patch-ab index 98532fd51c9..38bb7fb80da 100644 --- a/net/samba/patches/patch-ab +++ b/net/samba/patches/patch-ab @@ -1,11 +1,33 @@ ---- Makefile.orig Sun Nov 16 10:52:38 1997 -+++ Makefile Sun Nov 16 10:52:42 1997 -@@ -387,7 +387,7 @@ - # contributed by kuku@acds.physik.rwth-aachen.de - # NOTE: You may need to add -DBSD44 if you have password problems - FLAGSM = -DFreeBSD -DFAST_SHARE_MODES --LIBSM = -lcrypt -+#LIBSM = -lcrypt +--- includes.h.orig Tue Oct 7 06:18:26 1997 ++++ includes.h Sun Nov 16 15:33:11 1997 +@@ -193,7 +193,7 @@ + #include + #endif + +-#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX) ++#if defined(SHADOW_PWD) && !defined(NETBSD) && !defined(FreeBSD) && !defined(CONVEX) && !defined(__OpenBSD__) + #include + #endif + +@@ -496,6 +496,21 @@ + #endif - # This is for NEXTSTEP Release 2.X ++#ifdef __OpenBSD__ ++#include ++#include ++#define NO_GETSPNAM ++#define SIGNAL_CAST (void (*)()) ++#define USE_DIRECT ++#define REPLACE_INNETGR ++#define HAVE_BZERO ++#define HAVE_PATHCONF ++#define HAVE_GETGRNAM 1 ++#define HAVE_GETTIMEOFDAY ++#define HAVE_MEMMOVE ++#define USE_GETCWD ++#define USE_SETSID ++#endif + + #ifdef FreeBSD + #include diff --git a/net/samba/patches/patch-ac b/net/samba/patches/patch-ac new file mode 100644 index 00000000000..c20c162737b --- /dev/null +++ b/net/samba/patches/patch-ac @@ -0,0 +1,11 @@ +--- interface.c.orig Wed Oct 15 20:57:36 1997 ++++ interface.c Sun Nov 16 15:33:11 1997 +@@ -155,7 +155,7 @@ + } + } + } +-#elif defined(__FreeBSD__) || defined(NETBSD) || defined(AMIGA) || defined(_AIX41) ++#elif defined(__FreeBSD__) || defined(NETBSD) || defined(AMIGA) || defined(_AIX41) || defined(__OpenBSD__) + ifc.ifc_len = sizeof(buff); + ifc.ifc_buf = buff; + if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) { diff --git a/net/samba/patches/patch-ad b/net/samba/patches/patch-ad new file mode 100644 index 00000000000..992fdf0ad82 --- /dev/null +++ b/net/samba/patches/patch-ad @@ -0,0 +1,56 @@ +--- quotas.c.orig Wed Oct 8 19:43:54 1997 ++++ quotas.c Sun Nov 16 15:33:11 1997 +@@ -419,7 +419,7 @@ + + #else + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + #include + #include + #elif AIX +@@ -429,7 +429,7 @@ + #define dqb_curfiles dqb_curinodes + #define dqb_fhardlimit dqb_ihardlimit + #define dqb_fsoftlimit dqb_isoftlimit +-#else /* !__FreeBSD__ && !AIX */ ++#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ + #include + #include + #endif +@@ -442,7 +442,7 @@ + uid_t euser_id; + int r; + struct dqblk D; +-#if !defined(__FreeBSD__) && !defined(AIX) ++#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) + char dev_disk[256]; + struct stat S; + /* find the block device file */ +@@ -464,7 +464,7 @@ + DEBUG(5,("Unable to reset uid to %d\n", user_id)); + } + #else /* USE_SETRES */ +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + { + /* FreeBSD patches from Marty Moll */ + uid_t user_id; +@@ -494,7 +494,7 @@ + #endif /* USE_SETRES */ + + /* Use softlimit to determine disk space, except when it has been exceeded */ +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + *bsize = DEV_BSIZE; + #else /* !__FreeBSD__ */ + *bsize = 1024; +@@ -514,7 +514,7 @@ + return(False); + /* Use softlimit to determine disk space, except when it has been exceeded */ + if ((D.dqb_curblocks>D.dqb_bsoftlimit) +-#if !defined(__FreeBSD__) ++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) + ||((D.dqb_curfiles>D.dqb_fsoftlimit) && (D.dqb_fsoftlimit != 0)) + #endif + ) { diff --git a/net/samba/patches/patch-ae b/net/samba/patches/patch-ae new file mode 100644 index 00000000000..48286dbb238 --- /dev/null +++ b/net/samba/patches/patch-ae @@ -0,0 +1,32 @@ +--- smbencrypt.c.orig Wed May 7 20:14:07 1997 ++++ smbencrypt.c Sun Nov 16 15:33:11 1997 +@@ -54,11 +54,11 @@ + des_cblock deskey; + + str_to_key(k,(uchar *)deskey); +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + des_set_key(&deskey,ks); +-#else /* __FreeBSD__ */ ++#else /* __FreeBSD__ || __OpenBSD__ */ + des_set_key((des_cblock *)deskey,ks); +-#endif /* __FreeBsd */ ++#endif /* __FreeBSD__ || __OpenBSD__ */ + des_ecb_encrypt((des_cblock *)d,(des_cblock *)out, ks, DES_DECRYPT); + } + +@@ -68,11 +68,11 @@ + des_cblock deskey; + + str_to_key(k,(uchar *)deskey); +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__OpenBSD__) + des_set_key(&deskey,ks); +-#else /* __FreeBsd__ */ ++#else /* __FreeBSD__ || __OpenBSD__ */ + des_set_key((des_cblock *)deskey,ks); +-#endif /* __FreeBsd__ */ ++#endif /* __FreeBSD__ || __OpenBSD__ */ + des_ecb_encrypt((des_cblock *)d,(des_cblock *)out, ks, DES_ENCRYPT); + } + diff --git a/net/samba/patches/patch-af b/net/samba/patches/patch-af new file mode 100644 index 00000000000..d7dfebfe051 --- /dev/null +++ b/net/samba/patches/patch-af @@ -0,0 +1,12 @@ +--- util.c.orig Tue Oct 14 17:16:21 1997 ++++ util.c Sun Nov 16 15:33:12 1997 +@@ -2981,7 +2981,8 @@ + + bzero((char *)&sock,sizeof(sock)); + memcpy((char *)&sock.sin_addr,(char *)hp->h_addr, hp->h_length); +-#if defined(__FreeBSD__) || defined(NETBSD) /* XXX not the right ifdef */ ++#if defined(__FreeBSD__) || defined(NETBSD) || defined(__OpenBSD__) ++ /* XXX not the right ifdef */ + sock.sin_len = sizeof(sock); + #endif + sock.sin_port = htons( port ); diff --git a/net/samba/pkg/DESCR b/net/samba/pkg/DESCR index d9e59d1acba..6ddcfbfb193 100644 --- a/net/samba/pkg/DESCR +++ b/net/samba/pkg/DESCR @@ -1,10 +1,10 @@ -The Samba suite is a set of programs which run under the FreeBSD -operating system. These programs deliver most of the important +The Samba suite is a set of programs which run under most UNIX and +UNIX-like operating systems. These programs deliver most of the important functionality of a Microsoft Lan Manager server. That is, they support -remote access to FreeBSD filespace and FreeBSD printers from Lan Manager +remote access to UNIX filespace and UNIX printers from Lan Manager compatible clients. In practical terms, this means that such clients -can connect to and use FreeBSD filespace as if it was a local disk drive, -or FreeBSD printers as if they were local printers. +can connect to and use UNIX filespace as if it was a local disk drive, +or UNIX printers as if they were local printers. Some of the most popular Lan Manager compatible clients include Lan Manager itself, Windows for Workgroups, OS/2 and Windows NT.