samba on NetBSD - some patches

Gerald Carter gcarter at valinux.com
Sat Apr 7 13:24:52 GMT 2001


On Sat, 7 Apr 2001, Hubert Feyrer wrote:

>
> Hi,
>
> We (NetBSD) just received a bug report that smbclient's mput command
> usees find(1) with a non-standard option "-maxdepth". This was
> replaced with a simple call to ls(1). As I don't know how many of the

One of our volunteers is rewriting this as a generic function
right now.

> patches from out Packages Collection were sent to you in the past, I'm
> simply sending you all our patches - please include any you like in
> future samba releases!

Thanks a lot :-)   We'll look through these.



>
> BTW, samba has it's own homepage in out collection, the URL is
>
> 	http://www.netbsd.org/packages/samba/

This link seems to be broken right now.  Redirects to
an FTP server that complains about a bad path.
Can you verify it for me?  Thanks.




Cheers, jerry





> Maybe add a link to it from your site if you want.
>
> Thanks!
>
>
>  - Hubert
>
>
>
> $NetBSD: patch-aa,v 1.11 2000/09/03 09:17:00 kei Exp $
>
> --- Makefile.in.orig	Thu Jun  8 13:31:59 2000
> +++ Makefile.in	Sun Sep  3 06:23:06 2000
> @@ -26,10 +26,12 @@
>  BINDIR = @bindir@
>  # we don't use sbindir because we want full compatibility with
>  # the previous releases of Samba
> -SBINDIR = @bindir@
> +SBINDIR = @sbindir@
>  LIBDIR = @libdir@
>  VARDIR = @localstatedir@
>  MANDIR = @mandir@
> +ETCDIR?= $(BASEDIR)/etc
> +LOGDIR?= $(BASEDIR)/log
>  SAMBABOOK = @sambabook@
>
>  # The permissions to give the executables
> @@ -38,12 +40,12 @@
>  # 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
> -DRIVERFILE = $(LIBDIR)/printers.def
> -PASSWD_PROGRAM = /bin/passwd
> +SMBLOGFILE = $(LOGDIR)/log.smb
> +NMBLOGFILE = $(LOGDIR)/log.nmb
> +CONFIGFILE = $(ETCDIR)/smb.conf
> +LMHOSTSFILE = $(ETCDIR)/lmhosts
> +DRIVERFILE = $(ETCDIR)/printers.def
> +PASSWD_PROGRAM = /usr/bin/passwd
>  # This is where smbpasswd et al go
>  PRIVATEDIR = @privatedir@
>
> @@ -470,14 +472,14 @@
>
>  installdirs:
>  	$(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) \
> -	$(BASEDIR) $(SBINDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(CODEPAGEDIR) ${SWATDIR} ${SAMBABOOK}
> +	$(BASEDIR) $(SBINDIR) $(BINDIR) $(LIBDIR) $(ETCDIR) $(LOGDIR) $(CODEPAGEDIR) ${SWATDIR} ${SAMBABOOK}
>
>  installservers: all installdirs
> -	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
> +	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(ETCDIR) $(LOGDIR) $(SPROGS)
>
>  installbin: all installdirs
> -	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
> -	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
> +	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(ETCDIR) $(LOGDIR) $(SPROGS)
> +	@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(ETCDIR) $(LOGDIR) $(PROGS)
>
>  installscripts: installdirs
>  	@$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
> @@ -502,8 +504,8 @@
>  	@$(SHELL) $(srcdir)/script/uninstallman.sh $(MANDIR) $(srcdir)
>
>  uninstallbin:
> -	@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
> -	@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
> +	@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(ETCDIR) $(LOGDIR) $(SPROGS)
> +	@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(ETCDIR) $(LOGDIR) $(PROGS)
>
>  uninstallscripts:
>  	@$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
> $NetBSD: patch-ac,v 1.5 2000/09/03 09:17:00 kei Exp $
>
> --- acconfig.h.orig	Tue Jul 11 02:37:45 2000
> +++ acconfig.h	Sun Sep  3 06:23:07 2000
> @@ -80,7 +80,9 @@
>  #undef SIZEOF_INO_T
>  #undef SIZEOF_OFF_T
>  #undef STAT_STATVFS64
> +#undef HAVE_READLINE
>  #undef HAVE_LIBREADLINE
> +#undef HAVE_LIBEDIT
>  #undef HAVE_KERNEL_OPLOCKS
>  #undef HAVE_IRIX_SPECIFIC_CAPABILITIES
>  #undef HAVE_INT16_FROM_RPC_RPC_H
> $NetBSD: patch-ad,v 1.3 2001/04/07 10:00:42 hubertf Exp $
>
> --- client/client.c.orig	Wed May 10 16:28:49 2000
> +++ client/client.c
> @@ -1165,7 +1165,7 @@
>  				"find . -name \"%s\" -print > %s",p,tmpname);
>  		else
>  			slprintf(cmd,sizeof(pstring)-1,
> -				"find . -maxdepth 1 -name \"%s\" -print > %s",p,tmpname);
> +				"ls -1 %s > %s",p,tmpname);
>  		system(cmd);
>
>  		f = sys_fopen(tmpname,"r");
> @@ -1599,22 +1599,19 @@
>  	return True;
>  }
>
> -#if defined(HAVE_LIBREADLINE)
> +#if defined(HAVE_READLINE)
>  #  if defined(HAVE_READLINE_HISTORY_H) || defined(HAVE_HISTORY_H)
>  /****************************************************************************
>  history
>  ****************************************************************************/
>  static void cmd_history(void)
>  {
> -	HIST_ENTRY **hlist;
>  	register int i;
>
> -	hlist = history_list ();	/* Get pointer to history list */
> -
> -	if (hlist)			/* If list not empty */
> +	if (history_length)		/* If history is not empty */
>  	{
> -		for (i = 0; hlist[i]; i++)	/* then display it */
> -			DEBUG(0, ("%d: %s\n", i, hlist[i]->line));
> +		for (i = 1; i <= history_length; i++)	/* then display it */
> +			DEBUG(0, ("%d: %s\n", i, history_get(i)->line));
>  	}
>  }
>  #  endif
> @@ -1675,7 +1672,7 @@
>    {"setmode",cmd_setmode,"filename <setmode string> change modes of file",{COMPL_REMOTE,COMPL_NONE}},
>    {"help",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
>    {"?",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
> -#ifdef HAVE_LIBREADLINE
> +#ifdef HAVE_READLINE
>    {"history",cmd_history,"displays the command history",{COMPL_NONE,COMPL_NONE}},
>  #endif
>    {"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
> @@ -1735,7 +1732,7 @@
>  	}
>  }
>
> -#ifndef HAVE_LIBREADLINE
> +#ifndef HAVE_READLINE
>  /****************************************************************************
>  wait for keyboard activity, swallowing network packets
>  ****************************************************************************/
> @@ -1814,7 +1811,7 @@
>  	pstring line;
>  	char *ptr;
>
> -#ifdef HAVE_LIBREADLINE
> +#ifdef HAVE_READLINE
>  /* Minimal readline support, 29Jun1999, s.xenitellis at rhbnc.ac.uk */
>  #ifdef PROMPTSIZE
>  #undef PROMPTSIZE
> @@ -1828,7 +1825,7 @@
>  	while (!feof(stdin)) {
>  		fstring tok;
>  		int i;
> -#ifdef HAVE_LIBREADLINE
> +#ifdef HAVE_READLINE
>  		if ( temp != (char *)NULL )
>  		{
>  			free( temp );	/* Free memory allocated every time by readline() */
> @@ -2215,7 +2212,7 @@
>
>  	DEBUGLEVEL = 2;
>
> -#ifdef HAVE_LIBREADLINE
> +#ifdef HAVE_READLINE
>  	/* Allow conditional parsing of the ~/.inputrc file. */
>  	rl_readline_name = "smbclient";
>  #endif
> $NetBSD: patch-ae,v 1.3 2000/09/03 09:17:00 kei Exp $
>
> --- configure.in.orig	Tue Jul 11 02:37:45 2000
> +++ configure.in	Sun Sep  3 06:23:09 2000
> @@ -237,9 +237,6 @@
>  AC_CHECK_TYPE(offset_t,loff_t)
>  AC_CHECK_TYPE(ssize_t, int)
>
> -# we need libcups for CUPS support...
> -AC_CHECK_LIB(cups,httpConnect)
> -
>  # we need libdl for PAM and the new VFS code
>  AC_CHECK_LIB(dl,main)
>
> @@ -315,7 +312,14 @@
>  # test for where we get readline() from
>  if test "$ac_cv_header_readline_h" = "yes" ||
>     test "$ac_cv_header_readline_readline_h" = "yes"; then
> -  AC_CHECK_LIB(readline,readline)
> +    AC_CHECK_LIB(termcap, tputs)
> +    if test "$ac_cv_lib_termcap_tputs" = "yes"; then
> +        AC_CHECK_LIB(edit, readline, , [AC_CHECK_LIB(readline, readline)])
> +        if test "$ac_cv_lib_edit_readline" = "yes" ||
> +           test "$ac_cv_lib_readline_readline" = "yes"; then
> +            AC_DEFINE(HAVE_READLINE)
> +       fi
> +    fi
>  fi
>
>
> @@ -1227,6 +1231,24 @@
>      AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES)
>  fi
>
> +
> +#################################################
> +# check for CUPS support
> +AC_MSG_CHECKING(whether to use CUPS)
> +AC_ARG_WITH(cups,
> +[  --with-cups    Include CUPS support
> +  --without-cups Don't include CUPS support (default)],
> +[ case "$withval" in
> +  yes)
> +    AC_MSG_RESULT(yes)
> +    AC_CHECK_LIB(cups, httpConnect)
> +    ;;
> +  *)
> +    AC_MSG_RESULT(no)
> +    ;;
> +  esac ],
> +  AC_MSG_RESULT(no)
> +)
>
>  #################################################
>  # check for smbwrapper support
> $NetBSD: patch-af,v 1.3 2000/09/03 09:17:00 kei Exp $
>
> --- include/includes.h.orig	Sat Jul 15 01:52:58 2000
> +++ include/includes.h	Sun Sep  3 06:23:10 2000
> @@ -832,20 +832,20 @@
>  #define ULTRIX_AUTH 1
>  #endif
>
> -#ifdef HAVE_LIBREADLINE
> -#  ifdef HAVE_READLINE_READLINE_H
> -#    include <readline/readline.h>
> -#    ifdef HAVE_READLINE_HISTORY_H
> -#      include <readline/history.h>
> +#ifdef HAVE_READLINE
> +#  ifdef HAVE_READLINE_H
> +#    include <readline.h>
> +#    ifdef HAVE_HISTORY_H
> +#      include <history.h>
>  #    endif
>  #  else
> -#    ifdef HAVE_READLINE_H
> -#      include <readline.h>
> -#      ifdef HAVE_HISTORY_H
> -#        include <history.h>
> +#    ifdef HAVE_READLINE_READLINE_H
> +#      include <readline/readline.h>
> +#      ifdef HAVE_READLINE_HISTORY_H
> +#        include <readline/history.h>
>  #      endif
>  #    else
> -#      undef HAVE_LIBREADLINE
> +#      undef HAVE_READLINE
>  #    endif
>  #  endif
>  #endif
>
> --
> NetBSD - because Unix isn't just #include <linux.h>, i386, ILP32, ELF, ...!
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
>

----------------------------------------------------------------------
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com/  VA Linux Systems   gcarter at valinux.com
       http://www.samba.org/       SAMBA Team          jerry at samba.org
       http://www.plainjoe.org/                     jerry at plainjoe.org

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )





More information about the samba-technical mailing list