From e4050b2e0286de6e69e0be7383433e7210f0fbb7 Mon Sep 17 00:00:00 2001 From: taca Date: Sat, 29 Mar 2003 08:18:44 +0000 Subject: Update ja-samba package to ja-samba-2.2.7.1.1.1 (samba 2.2.7a-1.1). This contains security problem solved by samba 2.2.8. pkgsrc changes: o pkgsrc organization changesd as samba package. o note explicitly security problem fixed by samba 2.2.8. o remove own quota support patch. Changes from ja-samba-2.2.4.1.0 package: Changelog of Samba2.2 Japanese Edition Samba Users Group Japan Here is the fix list of Samba2.2 Japanese Edition. The sign of each line means: *: Fix of Samba Japanese Edition only x: Fix of sending a patch to Samba Team c: Fix of being commited a patch by Samba Team samba-2.2.7a-ja-1.1 ~~~~~~~~~~~~~~~~~~~ Changes to the original version c Fixed two security problems which is fixed at samba 2.2.8 [sugj-tech:5211] samba-2.2.7a-ja-1.0beta1 ~~~~~~~~~~~~~~~~~~~~~~~ Changes to the internationalized version * Fixed build problem when gettext 0.11.x installed [sugj-tech:5177] * Fixed memory leak of winbindd [sugj-tech:5152] * Added 'ldap referrals' parameter [sugj-tech:5124] * Fixed parameter of 'printing' was set on FreeBSD [sugj-tech:5155] * Fixed reseting parameters of smbd and nmbd by SIGHUP [sugj-tech:5160] * Fixed setting change of the 'printing' parameter works together with print-related parameters [sugj-tech:5155] * Fixed error message when old getgroups() is used [sugj-tech:5166] * Fixed warning message when leap second is set [sugj-tech:5166] * Fixed altname command of smbclient [sugj-tech:5019] * Fixed close share command of smbcontrol with Japanese [sugj-tech:5014] * Fixed compile problem on Tru64 UNIX [sugj-tech:5033] * Fixed compile problem of tdb directory [sugj-tech:5033] * Fixed to enable domain logon to Japanese domain name [sugj-tech:5043] * Fixed smbspool command with Japanese [sugj-tech:5048,5112] * Fixed recycle.c of VFS module [samba-jp:13590] * Fixed memory allocation of make_printerdef [sugj-tech:5106] * Fixed compile problem before FreeBSD 2.2.8 [sugj-tech:5112] * Fixed querydispinfo command of rpcclient [sugj-tech:5112] * Fixed rpcclient for Japanese resource [sugj-tech:5112] * Changed option of client tools from '-t' to '-T' [sugj-tech:5077] * Update smbchartool and removed jcode.pl [sugj-tech:5091] * Fixed encoding when using euc3 coding system [sugj-tech:5122] samba-2.2.5-ja-1.0beta3 ~~~~~~~~~~~~~~~~~~~~~~~ Changes to the internationalized version * Added %j macro which means printing job name [sugj-tech:4998] Changes to the original version * Fixed counting characters of unistr_to_dos() [sugj-tech:5004] * Fixed compile problem with --with-quotas on NetBSD [sugj-tech:4965] --- net/ja-samba/patches/patch-aa | 38 +++++++++++++++++------- net/ja-samba/patches/patch-ab | 15 ++++++++++ net/ja-samba/patches/patch-ac | 62 ++++++++++++++++++++++++++++++++++++++ net/ja-samba/patches/patch-ai | 10 +++---- net/ja-samba/patches/patch-ao | 57 +++++++++++++++++++++++++++++++++++ net/ja-samba/patches/patch-ap | 56 +++++++++++++++++++++++++++++++++++ net/ja-samba/patches/patch-aq | 16 ++++++++++ net/ja-samba/patches/patch-bd | 69 ------------------------------------------- 8 files changed, 239 insertions(+), 84 deletions(-) create mode 100644 net/ja-samba/patches/patch-ab create mode 100644 net/ja-samba/patches/patch-ac create mode 100644 net/ja-samba/patches/patch-ao create mode 100644 net/ja-samba/patches/patch-ap create mode 100644 net/ja-samba/patches/patch-aq delete mode 100644 net/ja-samba/patches/patch-bd (limited to 'net/ja-samba/patches') diff --git a/net/ja-samba/patches/patch-aa b/net/ja-samba/patches/patch-aa index 5318ad59b78..daab8de6ae3 100644 --- a/net/ja-samba/patches/patch-aa +++ b/net/ja-samba/patches/patch-aa @@ -1,13 +1,31 @@ -$NetBSD: patch-aa,v 1.2 2002/07/07 14:36:42 taca Exp $ +$NetBSD: patch-aa,v 1.3 2003/03/29 08:18:48 taca Exp $ ---- Makefile.in.orig Fri Jun 21 10:28:27 2002 +--- Makefile.in.orig 2002-11-21 22:08:20.000000000 +0900 +++ Makefile.in -@@ -52,7 +52,7 @@ - CONFIGFILE = $(CONFIGDIR)/smb.conf - LMHOSTSFILE = $(CONFIGDIR)/lmhosts - DRIVERFILE = $(CONFIGDIR)/printers.def --PASSWD_PROGRAM = /bin/passwd -+PASSWD_PROGRAM = /usr/bin/passwd - # This is where smbpasswd et al go - PRIVATEDIR = @privatedir@ +@@ -99,6 +99,8 @@ FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $ + FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS) + FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS) ++PAM_NEEDS_LIBC = @PAM_NEEDS_LIBC@ ++ + WINBIND_PROGS = @WINBIND_TARGETS@ + WINBIND_SPROGS = @WINBIND_STARGETS@ + WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@ +@@ -672,7 +674,7 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOB + + bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy + @echo Linking shared library $@ +- $(SHLD) @LDSHFLAGS@ -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) $(LDAPLIBS) -lc \ ++ $(SHLD) @LDSHFLAGS@ -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) $(LDAPLIBS) $(PAM_NEEDS_LIBC) \ + @SONAMEFLAG@`basename $@` + + nsswitch/libnss_wins.@SHLIBEXT@: $(NSS_OBJ) +@@ -696,7 +698,7 @@ nsswitch/libnss_winbind.@SHLIBEXT@: $(WI + + nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ) + @echo Linking $@ +- @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) \ ++ @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) $(LDFLAGS) $(DYNEXP) $(PAM_NEEDS_LIBC) \ + @SONAMEFLAG@`basename $@` + + bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \ diff --git a/net/ja-samba/patches/patch-ab b/net/ja-samba/patches/patch-ab new file mode 100644 index 00000000000..4b21ec1599b --- /dev/null +++ b/net/ja-samba/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.3 2003/03/29 08:18:48 taca Exp $ + +--- configure.in.orig 2003-02-05 15:14:44.000000000 +0900 ++++ configure.in +@@ -2060,6 +2060,10 @@ AC_ARG_WITH(pam, + # we can't build a pam module if we don't have pam. + AC_CHECK_LIB(pam, pam_get_data, [AC_DEFINE(HAVE_LIBPAM)]) + ++dnl Checks for libraries. ++AC_CHECK_LIB(c, __libc_sched_setscheduler, PAM_NEEDS_LIBC=, PAM_NEEDS_LIBC=-lc) ++AC_SUBST(PAM_NEEDS_LIBC) ++ + ################################################# + # check for pam_smbpass support + AC_MSG_CHECKING(whether to use pam_smbpass) diff --git a/net/ja-samba/patches/patch-ac b/net/ja-samba/patches/patch-ac new file mode 100644 index 00000000000..b1369f862d2 --- /dev/null +++ b/net/ja-samba/patches/patch-ac @@ -0,0 +1,62 @@ +$NetBSD: patch-ac,v 1.3 2003/03/29 08:18:49 taca Exp $ + +--- configure.orig 2003-02-12 16:00:58.000000000 +0900 ++++ configure +@@ -20306,6 +20306,49 @@ _ACEOF + fi + + ++echo $ac_n "checking for __libc_sched_setscheduler in -lc""... $ac_c" 1>&6 ++echo "configure:11950: checking for __libc_sched_setscheduler in -lc" >&5 ++ac_lib_var=`echo c'_'__libc_sched_setscheduler | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lc $LIBS" ++cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" ++ ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ PAM_NEEDS_LIBC= ++else ++ echo "$ac_t""no" 1>&6 ++PAM_NEEDS_LIBC=-lc ++fi ++ ++ ++ + ################################################# + # check for pam_smbpass support + echo "$as_me:$LINENO: checking whether to use pam_smbpass" >&5 +@@ -26356,6 +26399,7 @@ s,@TERMLIBS@,$TERMLIBS,;t t + s,@TERMLDFLAGS@,$TERMLDFLAGS,;t t + s,@ROFF@,$ROFF,;t t + s,@DYNEXP@,$DYNEXP,;t t ++s%@PAM_NEEDS_LIBC@%$PAM_NEEDS_LIBC%g + s,@LDAPLIBS@,$LDAPLIBS,;t t + s,@QUOTAOBJS@,$QUOTAOBJS,;t t + s,@WINBIND_TARGETS@,$WINBIND_TARGETS,;t t diff --git a/net/ja-samba/patches/patch-ai b/net/ja-samba/patches/patch-ai index 61b75a23d8f..fa54354105e 100644 --- a/net/ja-samba/patches/patch-ai +++ b/net/ja-samba/patches/patch-ai @@ -1,13 +1,13 @@ -$NetBSD: patch-ai,v 1.2 2002/07/07 14:36:45 taca Exp $ +$NetBSD: patch-ai,v 1.3 2003/03/29 08:18:49 taca Exp $ ---- profile/profile.c.orig Fri Jun 7 20:08:25 2002 +--- profile/profile.c.orig 2002-11-21 21:23:08.000000000 +0900 +++ profile/profile.c -@@ -22,7 +22,7 @@ - +@@ -23,7 +23,7 @@ #include "includes.h" + #ifdef WITH_PROFILE -#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6)) +#define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH) - static int shm_id; static BOOL read_only; + diff --git a/net/ja-samba/patches/patch-ao b/net/ja-samba/patches/patch-ao new file mode 100644 index 00000000000..e7f689dbd87 --- /dev/null +++ b/net/ja-samba/patches/patch-ao @@ -0,0 +1,57 @@ +$NetBSD: patch-ao,v 1.1 2003/03/29 08:18:50 taca Exp $ + +Expand & in the gecos field to a capitalized login name. + +--- lib/util_getent.c.orig Sat Feb 2 19:46:42 2002 ++++ lib/util_getent.c Sun Oct 13 21:37:56 2002 +@@ -155,6 +155,11 @@ + struct sys_pwent *plist; + struct sys_pwent *pent; + struct passwd *pwd; ++#ifdef BSD ++# define BUFLEN 1024 ++ char *bp, *gecos, *p, buf[BUFLEN]; ++ int buflen; ++#endif + + pent = (struct sys_pwent *) malloc(sizeof(struct sys_pwent)); + if (pent == NULL) { +@@ -178,9 +183,38 @@ + pent->pw_uid = pwd->pw_uid; + pent->pw_gid = pwd->pw_gid; + if (pwd->pw_gecos) { ++#ifdef BSD ++ gecos = pwd->pw_gecos; ++ if (*gecos == '*') ++ gecos++; ++ bp = buf; ++ ++ /* copy gecos, interpolating & to be full name */ ++ for (p = gecos; *p != '\0'; p++) { ++ if (bp >= &buf[BUFLEN - 1]) ++ /* buffer overflow */ ++ goto gecos_done; ++ if (*p == '&') { ++ /* interpolate full name */ ++ snprintf(bp, BUFLEN - (bp - buf), ++ "%s", pwd->pw_name); ++ *bp = toupper(*bp); ++ bp += strlen(bp); ++ } ++ else ++ *bp++ = *p; ++ } ++ *bp = '\0'; ++ if ((pent->pw_name = strdup(buf)) == NULL) ++ goto err; ++#else + if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL) + goto err; ++#endif + } ++#ifdef BSD ++ gecos_done: ++#endif + if (pwd->pw_dir) { + if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL) + goto err; diff --git a/net/ja-samba/patches/patch-ap b/net/ja-samba/patches/patch-ap new file mode 100644 index 00000000000..26d037e8f9c --- /dev/null +++ b/net/ja-samba/patches/patch-ap @@ -0,0 +1,56 @@ +$NetBSD: patch-ap,v 1.1 2003/03/29 08:18:50 taca Exp $ + +Expand & in the gecos field to a capitalized login name. + +--- lib/system.c.orig 2003-02-05 15:14:52.000000000 +0900 ++++ lib/system.c +@@ -776,6 +776,11 @@ static int num_lookups; /* Counter so we + + static void copy_pwent(struct saved_pw *dst, struct passwd *pass) + { ++#ifdef BSD ++ char *bp, *gecos, *p, buf[PSTRING_LEN]; ++ int buflen; ++#endif ++ + memcpy((char *)&dst->pass, pass, sizeof(struct passwd)); + + unix_to_dos(dst->pw_name, pass->pw_name); +@@ -784,7 +789,37 @@ static void copy_pwent(struct saved_pw * + fstrcpy(dst->pw_passwd, pass->pw_passwd); + dst->pass.pw_passwd = dst->pw_passwd; + ++#ifdef BSD ++ unix_to_dos(gecos, pass->pw_gecos); ++ if (*gecos == '*') ++ gecos++; ++ bp = buf; ++ ++ /* copy gecos, interpolating & to be full name */ ++ for (p = gecos; *p != '\0'; p++) { ++ if (bp >= &buf[PSTRING_LEN - 1]) { ++ /* buffer overflow */ ++ gecos = pass->pw_name; ++ goto gecos_done; ++ } ++ if (*p == '&') { ++ /* interpolate full name */ ++ snprintf(bp, PSTRING_LEN - (bp - buf), "%s", ++ pass->pw_name); ++ *bp = toupper(*bp); ++ bp += strlen(bp); ++ } ++ else ++ *bp++ = *p; ++ } ++ *bp = '\0'; ++ gecos = buf; ++ ++ gecos_done: ++ fstrcpy(dst->pw_gecos, gecos); ++#else + unix_to_dos(dst->pw_gecos, pass->pw_gecos); ++#endif + dst->pass.pw_gecos = dst->pw_gecos; + + unix_to_dos(dst->pw_dir, pass->pw_dir); diff --git a/net/ja-samba/patches/patch-aq b/net/ja-samba/patches/patch-aq new file mode 100644 index 00000000000..a7a6bd80821 --- /dev/null +++ b/net/ja-samba/patches/patch-aq @@ -0,0 +1,16 @@ +$NetBSD: patch-aq,v 1.1 2003/03/29 08:18:51 taca Exp $ + +--- smbd/open.c.orig Fri Feb 28 15:56:20 2003 ++++ smbd/open.c Sun Mar 16 09:03:17 2003 +@@ -979,8 +979,11 @@ + fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode,desired_access); + + if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT) && fcbopen) { ++ int saved_errno = errno; + if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode,desired_access)) == True) + flags = O_RDONLY; ++ else ++ errno = saved_errno; + } + + if (!fsp_open) { diff --git a/net/ja-samba/patches/patch-bd b/net/ja-samba/patches/patch-bd deleted file mode 100644 index 2ac37290771..00000000000 --- a/net/ja-samba/patches/patch-bd +++ /dev/null @@ -1,69 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2002/07/07 14:36:48 taca Exp $ - ---- smbd/quotas.c.orig Fri Jun 7 20:09:06 2002 -+++ smbd/quotas.c -@@ -855,7 +855,7 @@ - - #else - --#if defined(__FreeBSD__) || defined(__OpenBSD__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - #include - #include - #elif AIX -@@ -865,7 +865,7 @@ - #define dqb_curfiles dqb_curinodes - #define dqb_fhardlimit dqb_ihardlimit - #define dqb_fsoftlimit dqb_isoftlimit --#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ -+#else /* !__FreeBSD__ && !AIX && !__OpenBSD__ && !__NetBSD__ */ - #include - #include - #endif -@@ -879,7 +879,7 @@ - int r; - struct dqblk D; - uid_t euser_id; --#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) -+#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) && !defined(__NetBSD__) - char dev_disk[256]; - SMB_STRUCT_STAT S; - /* find the block device file */ -@@ -898,7 +898,7 @@ - - restore_re_uid(); - #else --#if defined(__FreeBSD__) || defined(__OpenBSD__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - { - /* FreeBSD patches from Marty Moll */ - gid_t egrp_id; -@@ -923,15 +923,15 @@ - r= quotactl(path,QCMD(Q_GETQUOTA,USRQUOTA),euser_id,(char *) &D); - #else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ - r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D); --#endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ -+#endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ && !__NetBSD__ */ - #endif /* HPUX */ - - /* Use softlimit to determine disk space, except when it has been exceeded */ --#if defined(__FreeBSD__) || defined(__OpenBSD__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - *bsize = DEV_BSIZE; --#else /* !__FreeBSD__ && !__OpenBSD__ */ -+#else /* !__FreeBSD__ && !__OpenBSD__ && !__NetBSD__ */ - *bsize = 1024; --#endif /*!__FreeBSD__ && !__OpenBSD__ */ -+#endif /*!__FreeBSD__ && !__OpenBSD__ && !__NetBSD__ */ - - if (r) - { -@@ -954,7 +954,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__) && !defined(__OpenBSD__) -+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) - ||((D.dqb_curfiles>D.dqb_fsoftlimit) && (D.dqb_fsoftlimit != 0)) - #endif - ) { -- cgit v1.2.3