diff options
author | Donny Davies <woodchip@gentoo.org> | 2002-05-06 19:57:08 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2002-05-06 19:57:08 +0000 |
commit | 3bbcc599ff857ff96def6b407ac2c620ad9f95b7 (patch) | |
tree | e2cde0bde79b7b54097612827dd5a5a860fd8e8e /net-fs | |
parent | deprecated (diff) | |
download | historical-3bbcc599ff857ff96def6b407ac2c620ad9f95b7.tar.gz historical-3bbcc599ff857ff96def6b407ac2c620ad9f95b7.tar.bz2 historical-3bbcc599ff857ff96def6b407ac2c620ad9f95b7.zip |
update to 2.2.4; please see the ChangeLog.
Diffstat (limited to 'net-fs')
23 files changed, 858 insertions, 388 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog index 6f46500f5f48..c45035585d46 100644 --- a/net-fs/samba/ChangeLog +++ b/net-fs/samba/ChangeLog @@ -1,6 +1,47 @@ # ChangeLog for net-fs/samba # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.7 2002/05/04 03:29:35 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.8 2002/05/06 19:57:08 woodchip Exp $ + +*samba-2.2.4 (6 May 2002) + + 6 May 2002; Donny Davies <woodchip@gentoo.org> samba-2.2.4.ebuild, + smb.conf.example, system-auth-winbind, samba-svc, winbind-init, lmhosts, + samba-init, nsswitch.conf-winbind, nsswitch.conf-wins : + + Update to latest; samba-2.2.4. + + o Added a much better smb.conf.example + o Added smbwrapper (smbsh) + o Added libnss_winbind (see /etc/nsswitch.conf-winbind) + o Added libnss_wins (see /etc/nsswitch.conf-wins) + o Added libsmbclient + o Added USE ssl and ldap support (apparently they work but I haven't had + time to test them; feedback appreciated. the support builds ok though.) + o Added better winbind support including an example nsswitch.conf, a pam.d/ + service snippet and a winbind initscript. Also see smb.conf.example. + o Mucho cleaned up the docs (no more 2 copies of the book!) + o Removed the recycle bin patches. There is now some generic VFS layer + support for this. If you're interested, please see examples/VFS in the + documentation. Perhaps we might build it if enough people ask ;) + o Removed the afs patch. Consider this unmaintained by me. If you really + want it, you'll have to patch, test and submit it yourself. + o src_install is now all done by hand. (easier this way, actually) + o Added a few convenience directories for netlogon, profiles, samba-hosted + printer drivers and the samba spool directory. These are only really for + those who will blindly follow smb.conf.example. If you already have + your own setup/layout, they're not really needed. (like me ;) + + ** Changes important for people upgrading ** + o None + If you're coming from samba-2.2.3, then this is a transparent upgrade. + Just down your daemon, merge 2.2.4, and bring it back up. + + If you're coming from something older than 2.2.3 there's instructions + printed after install. Follow them! + + All-in-all this update basically adds more features, better documentation, + better out-of-the-box support for various things, and bug fixes. There + are no sweeping changes to the package layout and such. Enjoy! *samba-2.2.3a-r3 (3 May 2002) @@ -16,13 +57,13 @@ The "tidy up a bunch of loose-ends before the 1.0 release, release :)" *** Changes important for people upgrading ***: - -> /etc/smb has moved to the better-suited /etc/samba directory. + o /etc/smb has moved to the better-suited /etc/samba directory. Simply move your /etc/smb/* to /etc/samba. Then delete the /etc/samba/codepages directory. These files are now in /var/lib/samba/codepages since I see no need to have 3.3MB of files in /etc which people will never change :) - -> /var/run/smb has moved to /var/run/samba. + o /var/run/smb has moved to /var/run/samba. Again, simply move your /var/run/smb/* to /var/run/samba and all will be well. - -> If you have the string "/etc/smb" in your smb.conf file (likely), then please + o If you have the string "/etc/smb" in your smb.conf file (likely), then please change all occurances of that to "/etc/samba". Thats it, you're done. Other changes: diff --git a/net-fs/samba/files/digest-samba-2.2.3a-r3 b/net-fs/samba/files/digest-samba-2.2.3a-r3 deleted file mode 100644 index 4ec219f76d0d..000000000000 --- a/net-fs/samba/files/digest-samba-2.2.3a-r3 +++ /dev/null @@ -1 +0,0 @@ -MD5 b6ec2f076af69331535a82b586f55254 samba-2.2.3a.tar.gz 5460531 diff --git a/net-fs/samba/files/digest-samba-2.2.4 b/net-fs/samba/files/digest-samba-2.2.4 new file mode 100644 index 000000000000..a3c4f59619f0 --- /dev/null +++ b/net-fs/samba/files/digest-samba-2.2.4 @@ -0,0 +1 @@ +MD5 09cf651daf544bf7aa79669d46b86e1e samba-2.2.4.tar.gz 5205845 diff --git a/net-fs/samba/files/lmhosts b/net-fs/samba/files/lmhosts new file mode 100644 index 000000000000..beb19eb43040 --- /dev/null +++ b/net-fs/samba/files/lmhosts @@ -0,0 +1,2 @@ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/lmhosts,v 1.1 2002/05/06 19:57:08 woodchip Exp $ +127.0.0.1 localhost diff --git a/net-fs/samba/files/nsswitch.conf-winbind b/net-fs/samba/files/nsswitch.conf-winbind new file mode 100644 index 000000000000..8917a7c25325 --- /dev/null +++ b/net-fs/samba/files/nsswitch.conf-winbind @@ -0,0 +1,17 @@ +# Header: $ +passwd: files winbind +group: files winbind + +hosts: files dns +networks: files dns + +services: db files +protocols: db files +rpc: db files +ethers: db files +netmasks: files +netgroup: files +bootparams: files + +automount: files +aliases: files diff --git a/net-fs/samba/files/nsswitch.conf-wins b/net-fs/samba/files/nsswitch.conf-wins new file mode 100644 index 000000000000..164bb382f89e --- /dev/null +++ b/net-fs/samba/files/nsswitch.conf-wins @@ -0,0 +1,17 @@ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/nsswitch.conf-wins,v 1.1 2002/05/06 19:57:08 woodchip Exp $ +passwd: files +group: files + +hosts: files dns wins +networks: files dns + +services: db files +protocols: db files +rpc: db files +ethers: db files +netmasks: files +netgroup: files +bootparams: files + +automount: files +aliases: files diff --git a/net-fs/samba/files/samba-2.2.3a-cli_spoolss_notify.patch b/net-fs/samba/files/samba-2.2.3a-cli_spoolss_notify.patch deleted file mode 100644 index 1fb2f50ac9e8..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-cli_spoolss_notify.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- samba-2.2.3a/source/rpc_client/cli_spoolss_notify.c Sat Feb 2 18:46:49 2002
-+++ samba-2.2.3a/source/rpc_client/cli_spoolss_notify.c.new Wed Feb 13 09:42:25 2002
-@@ -70,8 +70,7 @@
- }
-
- if (!attempt_netbios_session_request(cli, global_myname, remote_machine, &cli->dest_ip)) {
-- DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request. Error was %s\n", remote_machine, cli_errstr(cli) ));
-- cli_shutdown(cli);
-+ DEBUG(0,("connect_to_client: machine %s rejected the NetBIOS session request.\n", remote_machine));
- return False;
- }
-
diff --git a/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch b/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch deleted file mode 100644 index 8ccd2136db7c..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- param/loadparm.c.orig Sun Feb 3 00:46:46 2002 -+++ param/loadparm.c Mon Feb 4 12:19:30 2002 -@@ -334,6 +334,7 @@ - char *printer_admin; - char *volume; - char *fstype; -+ char *recycle_bin; - char *szVfsObjectFile; - char *szVfsOptions; - int iMinPrintSpace; -@@ -451,6 +452,7 @@ - NULL, /* printer admin */ - NULL, /* volume */ - NULL, /* fstype */ -+ NULL, /* recycle_bin */ - NULL, /* vfs object */ - NULL, /* vfs options */ - 0, /* iMinPrintSpace */ -@@ -1045,6 +1047,7 @@ - {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, - {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, - NULL, 0}, -+ {"recycle bin", P_STRING, P_LOCAL, &sDefault.recycle_bin, NULL, NULL, FLAG_SHARE}, - - {"VFS options", P_SEP, P_SEPARATOR}, - -@@ -1671,6 +1674,7 @@ - FN_LOCAL_STRING(lp_hide_files, szHideFiles) - FN_LOCAL_STRING(lp_veto_oplocks, szVetoOplockFiles) - FN_LOCAL_STRING(lp_driverlocation, szPrinterDriverLocation) -+FN_LOCAL_STRING(lp_recyclebin,recycle_bin) - FN_LOCAL_BOOL(lp_msdfs_root, bMSDfsRoot) - FN_LOCAL_BOOL(lp_autoloaded, autoloaded) - FN_LOCAL_BOOL(lp_preexec_close, bPreexecClose) diff --git a/net-fs/samba/files/samba-2.2.3a-pam_smbpass.diff b/net-fs/samba/files/samba-2.2.3a-pam_smbpass.diff deleted file mode 100644 index a8c5ef80fbba..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-pam_smbpass.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur samba-2.2.3a.orig/source/Makefile.in samba-2.2.3a/source/Makefile.in ---- samba-2.2.3a.orig/source/Makefile.in Sat Feb 2 19:46:05 2002 -+++ samba-2.2.3a/source/Makefile.in Sun Mar 3 20:07:28 2002 -@@ -363,7 +363,7 @@ - lib/util_unistr.o lib/signal.o lib/talloc.o lib/ms_fnmatch.o \ - lib/util_sock.o lib/smbrun.o lib/util_sec.o lib/snprintf.o \ - ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \ -- $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) -+ lib/interfaces.o $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) - - PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0:.o=.po) - LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po) diff --git a/net-fs/samba/files/samba-2.2.3a-proto.h.patch b/net-fs/samba/files/samba-2.2.3a-proto.h.patch deleted file mode 100644 index 3d69b02c0fa4..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-proto.h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- include/proto.h.orig Sun Feb 3 00:46:40 2002 -+++ include/proto.h Mon Feb 4 12:19:20 2002 -@@ -1988,6 +1988,7 @@ - char *lp_hide_files(int ); - char *lp_veto_oplocks(int ); - char *lp_driverlocation(int ); -+char *lp_recyclebin(int ); - BOOL lp_msdfs_root(int ); - BOOL lp_autoloaded(int ); - BOOL lp_preexec_close(int ); diff --git a/net-fs/samba/files/samba-2.2.3a-reply.c.patch b/net-fs/samba/files/samba-2.2.3a-reply.c.patch deleted file mode 100644 index 6f6a7c3b7513..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-reply.c.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- smbd/reply.c.orig Sun Feb 3 00:46:56 2002 -+++ smbd/reply.c Mon Feb 4 12:19:40 2002 -@@ -1918,6 +1918,64 @@ - return NT_STATUS_OK; - } - -+/******************************************************************** -+check if file should be recycled -+*********************************************************************/ -+static int recycle(connection_struct *conn, char *fname, char *recycle_bin) -+{ -+ char *base, *ext; -+ pstring bin; -+ int i=1, len, addlen; -+ int dir_mask=0700; -+ -+ SMB_BIG_UINT dfree,dsize,bsize; -+ -+ if(!recycle_bin || !*recycle_bin) { -+ DEBUG(3, ("recycle bin: share parameter not set, purging %s...\n", fname)); -+ return vfs_unlink(conn,fname); -+ } -+ -+ if(get_file_size(fname) == 0) { -+ DEBUG(3, ("recycle bin: file %s is empty, purging...\n", fname)); -+ return vfs_unlink(conn,fname); -+ } -+ -+ base = strrchr(fname, '/') + 1; -+ if(base == (char*)1) base = fname; -+ -+ ext = strrchr(base, '.'); -+ -+ pstrcpy(bin, recycle_bin); -+ pstrcat(bin, "/"); -+ pstrcat(bin, base); -+ -+ if(strcmp(fname,bin) == 0) { -+ DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname)); -+ return vfs_unlink(conn,fname); -+ } -+ -+ len = strlen(bin); -+ addlen = sizeof(pstring)-len-1; -+ while(vfs_file_exist(conn,bin, NULL)) { -+ slprintf(bin+len, addlen, " (Copy #%d)", i++); -+ pstrcat(bin, ext); -+ } -+ -+ DEBUG(3, ("recycle bin: moving source=%s to dest=%s\n", fname, bin)); -+ sys_disk_free(".",True,&bsize,&dfree,&dsize); -+ if((unsigned int)dfree > 0) { -+ if(!directory_exist(recycle_bin,NULL)) { -+ DEBUG(3, ("recycle bin: directory %s nonexistant, creating...\n", recycle_bin)); -+ vfs_mkdir(conn,recycle_bin,dir_mask); -+ } -+ DEBUG(3, ("recycle bin: move successful\n")); -+ return vfswrap_rename(conn, fname, bin); -+ } else { -+ DEBUG(3, ("recycle bin: move failed, purging...\n")); -+ return vfs_unlink(conn,fname); -+ } -+} -+ - /**************************************************************************** - The guts of the unlink command, split out so it may be called by the NT SMB - code. -@@ -1928,6 +1986,7 @@ - pstring directory; - pstring mask; - char *p; -+ char *recycle_bin = lp_recyclebin(SNUM(conn)); - int count=0; - NTSTATUS error = NT_STATUS_OK; - BOOL has_wild; -@@ -1940,6 +1999,8 @@ - - rc = unix_convert(name,conn,0,&bad_path,&sbuf); - -+ standard_sub_conn(conn,recycle_bin); -+ - p = strrchr(name,'/'); - if (!p) { - pstrcpy(directory,"./"); -@@ -1970,7 +2031,7 @@ - error = can_delete(directory,conn,dirtype); - if (!NT_STATUS_IS_OK(error)) return error; - -- if (vfs_unlink(conn,directory) == 0) { -+ if (recycle(conn,directory,recycle_bin) == 0) { - count++; - } - if (!count) -@@ -2002,7 +2063,7 @@ - slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname); - error = can_delete(fname,conn,dirtype); - if (!NT_STATUS_IS_OK(error)) continue; -- if (vfs_unlink(conn,fname) == 0) count++; -+ if (recycle(conn,fname,recycle_bin) == 0) count++; - DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname)); - } - CloseDir(dirptr); diff --git a/net-fs/samba/files/samba-2.2.3a-srv_spoolss_nt.patch b/net-fs/samba/files/samba-2.2.3a-srv_spoolss_nt.patch deleted file mode 100644 index 218653b52f96..000000000000 --- a/net-fs/samba/files/samba-2.2.3a-srv_spoolss_nt.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r1.115.2.150 srv_spoolss_nt.c
---- samba-2.2.3a/source/rpc_server/srv_spoolss_nt.c 12 Feb 2002 15:21:04 -0000 1.115.2.150
-+++ samba-2.2.3a/source/rpc_server/srv_spoolss_nt.c 12 Feb 2002 19:10:47 -0000
-@@ -4800,7 +4814,7 @@
- * lookup previously saved driver initialization info, which is then
- * bound to the printer, simulating what happens in the Windows arch.
- */
-- if (strequal(printer->info_2->drivername, old_printer->info_2->drivername))
-+ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername))
- set_driver_init(printer, 2);
- }
-
diff --git a/net-fs/samba/files/samba.rc6 b/net-fs/samba/files/samba-init index 6d3a89b49e1f..e61b3ee79cd1 100644 --- a/net-fs/samba/files/samba.rc6 +++ b/net-fs/samba/files/samba-init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.rc6,v 1.8 2002/03/27 22:54:22 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.1 2002/05/06 19:57:08 woodchip Exp $ depend() { need net diff --git a/net-fs/samba/files/samba.svc.rc6 b/net-fs/samba/files/samba-svc index fc5a1e66899a..18dea0d652aa 100644 --- a/net-fs/samba/files/samba.svc.rc6 +++ b/net-fs/samba/files/samba-svc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.svc.rc6,v 1.2 2001/12/06 20:17:02 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-svc,v 1.1 2002/05/06 19:57:08 woodchip Exp $ SVCDIR=/var/lib/supervise diff --git a/net-fs/samba/files/samba.pam b/net-fs/samba/files/samba.pam index 02fafe7aaeda..efb361452a62 100644 --- a/net-fs/samba/files/samba.pam +++ b/net-fs/samba/files/samba.pam @@ -1,5 +1,5 @@ #%PAM-1.0 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.pam,v 1.3 2002/05/04 03:29:36 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.pam,v 1.4 2002/05/06 19:57:08 woodchip Exp $ # pam_smbpass.so authenticates against the smbpasswd file auth required pam_smbpass.so nodelay account required pam_pwdb.so audit nodelay diff --git a/net-fs/samba/files/smb.conf.example b/net-fs/samba/files/smb.conf.example new file mode 100644 index 000000000000..dd2ce2961c66 --- /dev/null +++ b/net-fs/samba/files/smb.conf.example @@ -0,0 +1,412 @@ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/smb.conf.example,v 1.1 2002/05/06 19:57:08 woodchip Exp $ +# This is the main Samba configuration file. You should read the +# smb.conf(5) manual page in order to understand the options listed +# here. Samba has a huge number of configurable options (perhaps too +# many!) most of which are not shown in this example +# +# Any line which starts with a ; (semi-colon) or a # (hash) +# is a comment and is ignored. In this example we will use a # +# for commentry and a ; for parts of the config file that you +# may wish to enable +# +# NOTE: Whenever you modify this file you should run the command "testparm" +# to check that you have not made any basic syntactic errors. +# +#======================= Global Settings ===================================== +[global] + +# 1. Server Naming Options: +# workgroup = NT-Domain-Name or Workgroup-Name + workgroup = MDKGROUP + +# netbios name is the name you will see in "Network Neighbourhood", +# but defaults to your hostname +; netbios name = <name_of_this_server> + +# server string is the equivalent of the NT Description field + server string = Samba Server %v + +# Message command is run by samba when a "popup" message is sent to it. +# The example below is for use with LinPopUp: +; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s + +# 2. Printing Options: +# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK +# (as cups is now used in linux-mandrake 7.2 by default) +# if you want to automatically load your printer list rather +# than setting them up individually then you'll need this + printcap name = lpstat + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx, cups + printing = cups + +# Samba 2.2 supports the Windows NT-style point-and-print feature. To +# use this, you need to be able to upload print drivers to the samba +# server. The printer admins (or root) may install drivers onto samba. +# Note that this feature uses the print$ share, so you will need to +# enable it below. +# This parameter works like domain admin group: +# printer admin = @<group> <user> +; printer admin = @adm + +# 3. Logging Options: +# this tells Samba to use a separate log file for each machine +# that connects + log file = /var/log/samba/log.%m + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Set the log (verbosity) level (0 <= log level <= 10) +; log level = 3 + +# 4. Security and Domain Membership Options: +# This option is important for security. It allows you to restrict +# connections to machines which are on your local network. The +# following example restricts access to two C class networks and +# the "loopback" interface. For more examples of the syntax see +# the smb.conf man page. Do not enable this if (tcp/ip) name resolution does +# not work for all the hosts in your network. +; hosts allow = 192.168.1. 192.168.2. 127. + +# Uncomment this if you want a guest account, you must add this to /etc/passwd +# otherwise the user "nobody" is used +; guest account = pcguest + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server or security = domain +# When using security = domain, you should use password server = * +; password server = <NT-Server-Name> +; password server = * + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +# Encrypted passwords are required for any use of samba in a Windows NT domain +# The smbpasswd file is only required by a server doing authentication, thus +# members of a domain do not need one. + encrypt passwords = yes + smb passwd file = /etc/samba/private/smbpasswd + +# The following are needed to allow password changing from Windows to +# also update the Linux system password. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n +;*passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# Using the following line enables you to customise your configuration +# on a per machine basis. The %m gets replaced with the netbios name +# of the machine that is connecting +; include = /etc/samba/smb.conf.%m + +# Options for using winbind. Winbind allows you to do all account and +# authentication from a Windows or samba domain controller, creating +# accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's +# and gid's. winbind uid and winbind gid are the only required parameters. +# +# winbind uid is the range of uid's winbind can use when mapping RIDs to uid's +; winbind uid = 10000-20000 +# +# winbind gid is the range of uid's winbind can use when mapping RIDs to gid's +; winbind gid = 10000-20000 +# +# winbind separator is the character a user must use between their domain +# name and username, defaults to "\" +; winbind separator = + +# +# template homedir determines the home directory for winbind users, with +# %D expanding to their domain name and %U expanding to their username: +; template homedir = /home/%D/%U +# +# template shell determines the shell users authenticated by winbind get +; template shell = /bin/bash + +# 5. Browser Control and Networking Options: +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# Configure Samba to use multiple interfaces +# If you have multiple network interfaces then you must list them +# here. See the man page for details. +; interfaces = 192.168.12.2/24 192.168.13.2/24 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# set local master to no if you don't want Samba to become a master +# browser on your network. Otherwise the normal election rules apply +; local master = no + +# OS Level determines the precedence of this server in master browser +# elections. The default value should be reasonable +; os level = 33 + +# Domain Master specifies Samba to be the Domain Master Browser. This +# allows Samba to collate browse lists between subnets. Don't use this +# if you already have a Windows NT domain controller doing this job +; domain master = yes + +# Preferred Master causes Samba to force a local browser election on startup +# and gives it a slightly higher chance of winning the election +; preferred master = yes + +# 6. Domain Control Options: +# Enable this if you want Samba to be a domain logon server for +# Windows95 workstations or Primary Domain Controller for WinNT and Win2k +; domain logons = yes + +# if you enable domain logons then you may want a per-machine or +# per user logon script +# run a specific logon batch file per workstation (machine) +; logon script = %m.bat +# run a specific logon batch file per username +; logon script = %U.bat + +# Where to store roaming profiles for WinNT and Win2k +# %L substitutes for this servers netbios name, %U is username +# You must uncomment the [Profiles] share below +; logon path = \\%L\Profiles\%U + +# Where to store roaming profiles for Win9x. Be careful with this as it also +# impacts where Win2k finds it's /HOME share +; logon home = \\%L\%U\.profile + +# The add user script is used by a domain member to add local user accounts +# that have been authenticated by the domain controller, or by the domain +# controller to add local machine accounts when adding machines to the domain. +# The script must work from the command line when replacing the macros, +# or the operation will fail. Check that groups exist if forcing a group. +# Script for domain controller for adding machines: +; add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u +# Script for domain member for adding local accounts for authenticated users: +; add user script = /usr/sbin/useradd -s /bin/false %u + +# Domain groups: +# domain admin group is a list of unix users or groups who are made members +# of the Domain Admin group +; domain admin group = root @wheel +# +# domain guest groups is a list of unix users or groups who are made members +# of the Domain Guests group +; domain guest group = nobody @guest + +# 7. Name Resolution Options: +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# Windows Internet Name Serving Support Section: +# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server +; wins support = yes + +# WINS Server - Tells the NMBD components of Samba to be a WINS Client +# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both +; wins server = w.x.y.z + +# WINS Proxy - Tells Samba to answer name resolution queries on +# behalf of a non WINS capable client, for this to work there must be +# at least one WINS Server on the network. The default is NO. +; wins proxy = yes + +# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names +# via DNS nslookups. The built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# 8. File Naming Options: +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +# Enabling internationalization: +# you can match a Windows code page with a UNIX character set. +# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European), +# 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian), +# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul), +# 950 (Trad. Chin.). +# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.), +# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.) +# This is an example for french users: +; client code page = 850 +; character set = ISO8859-1 + + +#============================ Share Definitions ============================== +[homes] + comment = Home Directories + browseable = no + writable = yes + +# Un-comment the following and create the netlogon directory for Domain Logons +; [netlogon] +; comment = Network Logon Service +; path = /var/lib/samba/netlogon +; guest ok = yes +; writable = no + +#Uncomment the following 2 lines if you would like your login scripts to +#be created dynamically by ntlogon (check that you have it in the correct +#location (the default of the ntlogon rpm available in contribs - btw there +#is no gentoo package for this; make one and submit it if you really want ;) +;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon +;root postexec = rm -f /var/lib/samba/netlogon/%U.bat + +# Un-comment the following to provide a specific roving profile share +# the default is to use the user's home directory +;[Profiles] +; path = /var/lib/samba/profiles +; browseable = no +; guest ok = yes + + +# NOTE: If you have a CUPS print system there is no need to +# specifically define each individual printer. +# You must configure the samba printers with the appropriate Windows +# drivers on your Windows clients. On the Samba server no filtering is +# done. If you wish that the server provides the driver and the clients +# send PostScript ("Generic PostScript Printer" under Windows), you have +# to swap the 'print command' line below with the commented one. +[printers] + comment = All Printers + path = /var/spool/samba + browseable = no +# to allow user 'guest account' to print. + guest ok = yes + writable = no + printable = yes + create mode = 0700 +# ===================================== +# print command: see above for details. +# ===================================== + print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers. +; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients). +# The following two commands are the samba defaults for printing=cups +# change them only if you need different options: +; lpq command = lpq -P %p +; lprm command = cancel %p-%j + +# This share is used for Windows NT-style point-and-print support. +# To be able to install drivers, you need to be either root, or listed +# in the printer admin parameter above. Note that you also need write access +# to the directory and share definition to be able to upload the drivers. +# For more information on this, please see the Printing Support Section of +# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf +[print$] + path = /var/lib/samba/printers + browseable = yes + read only = yes + write list = @adm root + +# This one is useful for people to share files +;[tmp] +; comment = Temporary file space +; path = /tmp +; read only = no +; public = yes + +# A publicly accessible directory, but read only, except for people in +# the "staff" group +;[public] +; comment = Public Stuff +; path = /home/samba/public +; public = yes +; writable = no +; write list = @staff + +# Other examples. +# +# A private printer, usable only by Fred. Spool data will be placed in Fred's +# home directory. Note that fred must have write access to the spool directory, +# wherever it is. +;[fredsprn] +; comment = Fred's Printer +; valid users = fred +; path = /homes/fred +; printer = freds_printer +; public = no +; writable = no +; printable = yes + +# A private directory, usable only by Fred. Note that Fred requires write +# access to the directory. +;[fredsdir] +; comment = Fred's Service +; path = /usr/somewhere/private +; valid users = fred +; public = no +; writable = yes +; printable = no + +# a service which has a different directory for each machine that connects +# this allows you to tailor configurations to incoming machines. You could +# also use the %u option to tailor it by user name. +# The %m gets replaced with the machine name that is connecting. +;[pchome] +; comment = PC Directories +; path = /usr/pc/%m +; public = no +; writable = yes + +# A publicly accessible directory, read/write to all users. Note that all files +# created in the directory by users will be owned by the default user, so +# any user with access can delete any other user's files. Obviously this +# directory must be writable by the default user. Another user could of course +# be specified, in which case all files would be owned by that user instead. +;[public] +; path = /usr/somewhere/else/public +; public = yes +; only guest = yes +; writable = yes +; printable = no + +# The following two entries demonstrate how to share a directory so that two +# users can place files there that will be owned by the specific users. In this +# setup, the directory should be writable by both users and should have the +# sticky bit set on it to prevent abuse. Obviously this could be extended to +# as many users as required. +;[myshare] +; comment = Mary's and Fred's stuff +; path = /usr/somewhere/shared +; valid users = mary fred +; public = no +; writable = yes +; printable = no +; create mask = 0765 + diff --git a/net-fs/samba/files/smbklog.exe b/net-fs/samba/files/smbklog.exe Binary files differdeleted file mode 100644 index 3a827602406b..000000000000 --- a/net-fs/samba/files/smbklog.exe +++ /dev/null diff --git a/net-fs/samba/files/smbusers b/net-fs/samba/files/smbusers index 4881f62b100c..317e15ea9d85 100644 --- a/net-fs/samba/files/smbusers +++ b/net-fs/samba/files/smbusers @@ -1,4 +1,4 @@ # Unix_name = SMB_name1 SMB_name2 ... -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/smbusers,v 1.2 2002/05/04 03:29:36 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/smbusers,v 1.3 2002/05/06 19:57:08 woodchip Exp $ root = administrator admin nobody = guest pcguest smbguest diff --git a/net-fs/samba/files/swat.xinetd b/net-fs/samba/files/swat.xinetd index 3082442d28c0..3978efdd5297 100644 --- a/net-fs/samba/files/swat.xinetd +++ b/net-fs/samba/files/swat.xinetd @@ -2,7 +2,7 @@ # description: SWAT is the Samba Web Admin Tool. Use swat \ # to configure your Samba server. To use SWAT, \ # connect to port 901 with your favorite web browser. -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/swat.xinetd,v 1.2 2002/05/04 03:29:36 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/swat.xinetd,v 1.3 2002/05/06 19:57:08 woodchip Exp $ service swat { diff --git a/net-fs/samba/files/system-auth-winbind b/net-fs/samba/files/system-auth-winbind new file mode 100644 index 000000000000..50daad28a4ed --- /dev/null +++ b/net-fs/samba/files/system-auth-winbind @@ -0,0 +1,18 @@ +#%PAM-1.0 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/system-auth-winbind,v 1.1 2002/05/06 19:57:08 woodchip Exp $ + +auth required /lib/security/pam_env.so +auth sufficient /lib/security/pam_winbind.so +auth sufficient /lib/security/pam_unix.so likeauth nullok use_first_pass +auth required /lib/security/pam_deny.so + +account sufficient /lib/security/pam_winbind.so +account required /lib/security/pam_unix.so + +password required /lib/security/pam_cracklib.so retry=3 +password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow +password required /lib/security/pam_deny.so + +session required /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0022 +session required /lib/security/pam_limits.so +session required /lib/security/pam_unix.so diff --git a/net-fs/samba/files/winbind-init b/net-fs/samba/files/winbind-init new file mode 100644 index 000000000000..9746a802cf32 --- /dev/null +++ b/net-fs/samba/files/winbind-init @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/winbind-init,v 1.1 2002/05/06 19:57:08 woodchip Exp $ + +depend() { + need net +} + +start() { + ebegin "Starting winbind" + start-stop-daemon --start --quiet --exec /usr/sbin/smbd + result=$? + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd + result=$(( $result + $? )) + start-stop-daemon --start --quiet --exec /usr/sbin/winbindd + result=$(( $result + $? )) + eend $result +} + +stop() { + ebegin "Stopping samba" + start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid + result=$? + start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid + result=$(( $result + $? )) + start-stop-daemon --stop --quiet --pidfile /var/run/samba/winbindd.pid + result=$(( $result + $? )) + eend $result +} diff --git a/net-fs/samba/samba-2.2.3a-r3.ebuild b/net-fs/samba/samba-2.2.3a-r3.ebuild deleted file mode 100644 index 7f463548d0b3..000000000000 --- a/net-fs/samba/samba-2.2.3a-r3.ebuild +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.3a-r3.ebuild,v 1.1 2002/05/04 03:29:35 woodchip Exp $ - -DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX" -HOMEPAGE="http://samba.org http://www.amherst.edu/~bbstone/howto/samba.html" - -S=${WORKDIR}/${P} -SRC_URI="http://us1.samba.org/samba/ftp/${P}.tar.gz" -# http://www.amherst.edu/~bbstone/recycle_bin/${PV/a/}/loadparm.c.patch -# http://www.amherst.edu/~bbstone/recycle_bin/${PV/a/}/proto.h.patch -# http://www.amherst.edu/~bbstone/recycle_bin/${PV/a/}/reply.c.patch" - -RDEPEND="virtual/glibc - >=sys-libs/pam-0.72 - acl? ( sys-apps/acl ) - cups? ( net-print/cups )" - # needs testing -- ssl? ( >=dev-libs/openssl-0.9.6 ) -DEPEND="${RDEPEND} - sys-devel/autoconf - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )" -LICENSE="GPL-2" -SLOT="0" - -src_unpack() { - unpack ${P}.tar.gz ; cd ${S} - use afs && ( patch -p0 < ${FILESDIR}/samba-2.2.1a-afs.diff || die ) - patch -p0 < ${FILESDIR}/samba-2.2.2-smbmount.diff || die - patch -p1 < ${FILESDIR}/samba-2.2.3a-pam_smbpass.diff || die - patch -p1 < ${FILESDIR}/samba-2.2.3a-cli_spoolss_notify.patch || die - patch -p1 < ${FILESDIR}/samba-2.2.3a-srv_spoolss_nt.patch || die - - # network recycle bin must be enabled in your smb.conf per share - cd ${S}/source - patch -p0 < ${FILESDIR}/samba-2.2.3a-loadparm.c.patch || die - patch -p0 < ${FILESDIR}/samba-2.2.3a-proto.h.patch || die - patch -p0 < ${FILESDIR}/samba-2.2.3a-reply.c.patch || die - - # makes cups not absolutely required - if [ ! "`use cups`" ] ; then - cd ${S}/source - cp configure.in configure.in.orig - sed -e "s:AC_CHECK_LIB(cups,httpConnect)::" configure.in.orig > configure.in - fi - - # fix kerberos include file collision - cd ${S}/source/include - mv profile.h smbprofile.h - sed -e "s:profile\.h:smbprofile.h:" includes.h > includes.h.new - mv includes.h.new includes.h - - cd ${S}/source - autoconf || die -} - -src_compile() { - local myconf - use afs && myconf="${myconf} --with-afs" - use acl && myconf="${myconf} --with-acl-support" - # ssl needs testing... - myconf="${myconf} --without-ssl" - - export CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" - cd ${S}/source - ./configure \ - --prefix=/usr \ - --libdir=/etc/samba \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/samba \ - --localstatedir=/var/log \ - --with-mandir=/usr/share/man \ - --with-lockdir=/var/run/samba \ - --with-swatdir=/usr/share/swat \ - --with-privatedir=/etc/samba/private \ - --with-codepagedir=/var/lib/samba/codepages \ - --with-pam --with-pam_smbpass \ - --without-sambabook \ - --without-automount \ - --without-spinlocks \ - --with-netatalk \ - --with-smbmount \ - --with-profile \ - --with-quotas \ - --with-syslog \ - --with-msdfs \ - --with-utmp \ - --with-vfs \ - --host=${CHOST} ${myconf} || die "bad ./configure" - - emake || die "compile problem" -} - -src_install() { - cd ${S}/source - dodir /sbin /etc/samba /usr/share/swat /var/log /var/run/samba \ - /lib/security /var/lib/samba/codepages - - make install \ - prefix=${D}/usr \ - BASEDIR=${D}/usr \ - VARDIR=${D}/var/log \ - LIBDIR=${D}/etc/samba \ - SBINDIR=${D}/usr/sbin \ - MANDIR=${D}/usr/share/man \ - LOCKDIR=${D}/var/run/samba \ - SWATDIR=${D}/usr/share/swat \ - PRIVATEDIR=${D}/etc/samba/private \ - CODEPAGEDIR=${D}/var/lib/samba/codepages || die - - # we specified PRIVATEDIR=/etc/samba/private - rm -rf ${D}/usr/private - - # link /usr/bin/smbmount to /sbin/mount.smbfs which allows it - # to work transparently with standard 'mount' command - dosym /usr/bin/smbmount /sbin/mount.smbfs - - # handy scripts for user management - cd ${S}/source/script - exeinto /usr/sbin - doexe convert_smbpasswd mknissmbpasswd.sh mknissmbpwdtbl.sh mksmbpasswd.sh - - # place this correctly - mv ${D}/usr/bin/pam_smbpass.so ${D}/lib/security/pam_smbpass.so - - # make the smb backend symlink for smb printing support with cups - if [ "`use cups`" ] ; then - dodir /usr/lib/cups/backend - dosym /usr/bin/smbspool /usr/lib/cups/backend/smb - fi - - # too many docs to sort through -- install them all :) - cd ${S} - dodoc COPYING Manifest README Roadmap WHATSNEW.txt - docinto full_docs ; cp -a docs/* ${D}/usr/share/doc/${PF}/full_docs - docinto examples ; cp -a examples/* ${D}/usr/share/doc/${PF}/examples - prepalldocs - - insinto /etc/samba - newins examples/smb.conf.default smb.conf.example - doins ${FILESDIR}/smbusers - insinto /etc/pam.d ; newins ${FILESDIR}/samba.pam samba - exeinto /etc/init.d ; newexe ${FILESDIR}/samba.rc6 samba - insinto /etc/xinetd.d ; newins ${FILESDIR}/swat.xinetd swat -} - -pkg_preinst() { - if [ "$ROOT" = "/" ] && [ -e /dev/shm/.init.d/started/samba ] ; then - /etc/init.d/samba stop - fi -} - -pkg_prerm() { - if [ "$ROOT" = "/" ] && [ -e /dev/shm/.init.d/started/samba ] ; then - /etc/init.d/samba stop - fi -} - -pkg_postinst() { - - # we touch ${D}/etc/samba/smb.conf so that people installing samba - # just to mount smb shares don't get annoying warnings all the time. - if [ ! -e ${ROOT}/etc/samba/smb.conf ] ; then - touch ${ROOT}/etc/samba/smb.conf - fi - - # might be empty for some people so do it here.. - install -m0700 -o root -g root -d ${ROOT}/etc/samba/private - - # /etc/smb is changed to /etc/samba; /var/run/smb to /var/run/samba - ewarn "******************************************************************" - ewarn "* NOTE: If you upgraded from an earlier version of samba you *" - ewarn "* must move your /etc/smb files to the more aptly suited *" - ewarn "* /etc/samba directory. Also, please move the files in *" - ewarn "* /var/run/smb to /var/run/samba. Lastly, if you have *" - ewarn "* the string "/etc/smb" in your smb.conf file, please *" - ewarn "* change that to "/etc/samba". The old /etc/smb/codepages *" - ewarn "* directory doesn't need to be moved into /etc/samba *" - ewarn "* because those files are now kept in the *" - ewarn "* /var/lib/samba/codepages directory. *" - ewarn "* *" - ewarn "* If you need help with upgrading, email me: *" - ewarn "* woodchip@gentoo.org and I'll assist you. *" - ewarn "******************************************************************" - - #echo "##" - #echo " If you had samba running earlier, you'll need to start it again. Also, please note" - #echo " that you must configure /etc/samba/smb.conf before samba (the server) will work properly." - #echo " Mounting smb shares and the smbclient program should work immediately. To accomplish" - #echo " this there is an empty /etc/samba/smb.conf file installed." - #echo - #echo " To mount smb shares, type something like this. You will need kernel SMB support first:" - #echo " % mount -t smbfs -o username=drobbins,password=foo,ip=192.168.1.1 //mybox/drobbins /mnt/foo" - #echo " If you wish to allow normal users to mount smb shares, type the following as root:" - #echo " % chmod u+s /usr/bin/smbmnt" - #echo "##" -} diff --git a/net-fs/samba/samba-2.2.4.ebuild b/net-fs/samba/samba-2.2.4.ebuild new file mode 100644 index 000000000000..88482054952b --- /dev/null +++ b/net-fs/samba/samba-2.2.4.ebuild @@ -0,0 +1,311 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.4.ebuild,v 1.1 2002/05/06 19:57:08 woodchip Exp $ + +DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX" +HOMEPAGE="http://www.samba.org" + +S=${WORKDIR}/${P} +SRC_URI="http://us1.samba.org/samba/ftp/${P}.tar.gz" + +RDEPEND="virtual/glibc + >=sys-libs/pam-0.72 + acl? ( sys-apps/acl ) + cups? ( net-print/cups ) + ldap? ( =net-nds/openldap-2* ) + ssl? ( >=dev-libs/openssl-0.9.6 )" + +DEPEND="${RDEPEND} + sys-devel/autoconf + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )" + +LICENSE="GPL-2" +SLOT="0" + +src_unpack() { + unpack ${A} ; cd ${S} + patch -p0 < ${FILESDIR}/samba-2.2.2-smbmount.diff || die + + # makes cups not absolutely required.. + if [ ! "`use cups`" ] ; then + cd ${S}/source + cp configure.in configure.in.orig + sed -e "s:AC_CHECK_LIB(cups,httpConnect)::" configure.in.orig > configure.in + fi + + # fix kerberos include file collision.. + cd ${S}/source/include + mv profile.h smbprofile.h + sed -e "s:profile\.h:smbprofile.h:" includes.h > includes.h.new + mv includes.h.new includes.h + + cd ${S}/source + autoconf || die +} + +src_compile() { + local myconf + use acl && myconf="${myconf} --with-acl-support" + use ssl && myconf="${myconf} --with-ssl" + use ldap && myconf="${myconf} --with-ldapsam" + + cd ${S}/source + ./configure \ + --prefix=/usr \ + --libdir=/etc/samba \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/samba \ + --localstatedir=/var/log \ + --with-configdir=/etc/samba \ + --with-mandir=/usr/share/man \ + --with-piddir=/var/run/samba \ + --with-lockdir=/var/run/samba \ + --with-swatdir=/usr/share/swat \ + --with-privatedir=/etc/samba/private \ + --with-codepagedir=/var/lib/samba/codepages \ + --with-pam --with-pam_smbpass \ + --without-sambabook \ + --without-automount \ + --without-spinlocks \ + --with-libsmbclient \ + --with-smbwrapper \ + --with-netatalk \ + --with-smbmount \ + --with-profile \ + --with-quotas \ + --with-syslog \ + --with-msdfs \ + --with-utmp \ + --with-vfs \ + --host=${CHOST} ${myconf} || die "bad ./configure" + + make all smbfilter smbwrapper smbcacls pam_smbpass \ + nsswitch nsswitch/libnss_wins.so debug2html + assert "compile problem" +} + +src_install() { + local i mp mpl + + # we may as well do this all manually since it was starting + # to get out of control and samba _does_ have some rather + # silly installation quirks ;) much of this was adapted + # from mandrake's .spec file.. + # + # // woodchip - 5 May 2002 + + + # install standard binary files.. + for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ + make_smbcodepage make_unicodemap make_printerdef rpcclient \ + smbspool smbcacls smbclient smbmount smbumount smbsh wbinfo + do + exeinto /usr/bin + doexe source/bin/${i} + done + + + # libraries.. + exeinto /usr/lib + doexe source/bin/smbwrapper.so + doexe source/bin/libsmbclient.so + insinto /usr/lib + doins source/bin/libsmbclient.a + exeinto /lib/security + doexe source/bin/pam_smbpass.so + doexe source/nsswitch/pam_winbind.so + + + # some utility scripts.. + for i in mksmbpasswd.sh smbtar convert_smbpasswd + do + exeinto /usr/bin + doexe source/script/${i} + done + + + # install secure binary files.. + for i in smbd nmbd swat smbfilter debug2html smbmnt smbcontrol winbindd + do + exeinto /usr/sbin + doexe source/bin/${i} + done + + + # install man pages.. + doman docs/manpages/* + + + # install codepage source files + for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251 + do + insinto /var/lib/samba/codepages/src + doins source/codepages/codepage_def.${i} + done + for i in 437 737 775 850 852 857 861 866 932 936 949 950 \ + ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 \ + ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R + do + insinto /var/lib/samba/codepages/src + doins source/codepages/CP${i}.TXT + done + + + # build codepage load files.. + for i in 437 737 775 850 852 857 861 866 932 936 949 950 1251 + do + ${D}/usr/bin/make_smbcodepage c ${i} \ + ${D}/var/lib/samba/codepages/src/codepage_def.${i} \ + ${D}/var/lib/samba/codepages/codepage.${i} + done + + + # build unicode load files.. + for i in 437 737 775 850 852 857 861 866 932 936 949 950 \ + ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 \ + ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R + do + ${D}/usr/bin/make_unicodemap ${i} \ + ${D}/var/lib/samba/codepages/src/CP${i}.TXT \ + ${D}/var/lib/samba/codepages/unicode_map.${i} + done + rm -rf ${D}/var/lib/samba/codepages/src + + + # install the nsswitch library extension files.. + for i in wins winbind + do + exeinto /lib + doexe source/nsswitch/libnss_${i}.so + done + # make link for wins and winbind resolvers.. + ( cd ${D}/lib ; ln -s libnss_wins.so libnss_wins.so.2 ) + ( cd ${D}/lib ; ln -s libnss_winbind.so libnss_winbind.so.2 ) + + + # install SWAT helper files.. + for i in swat/help/*.html docs/htmldocs/*.html + do + insinto /usr/share/swat/help + doins ${i} + done + for i in swat/images/*.gif + do + insinto /usr/share/swat/images + doins ${i} + done + for i in swat/include/*.html + do + insinto /usr/share/swat/include + doins ${i} + done + + + # install the O'Reilly "Using Samba" book.. + for i in docs/htmldocs/using_samba/*.html + do + insinto /usr/share/swat/using_samba + doins ${i} + done + for i in docs/htmldocs/using_samba/gifs/*.gif + do + insinto /usr/share/swat/using_samba/gifs + doins ${i} + done + for i in docs/htmldocs/using_samba/figs/*.gif + do + insinto /usr/share/swat/using_samba/figs + doins ${i} + done + + + # too many docs to sort through; install them all! :) + dodoc COPYING Manifest README Roadmap WHATSNEW.txt + docinto full_docs + cp -a docs/* ${D}/usr/share/doc/${PF}/full_docs + # but we don't want two copies of the book! + rm -rf ${D}/usr/share/doc/${PF}/full_docs/htmldocs/using_samba + docinto examples + cp -a examples/* ${D}/usr/share/doc/${PF}/examples + prepalldocs + # keep this next line *after* prepalldocs! + dosym /usr/share/swat/using_samba /usr/share/doc/${PF}/using_samba + # and we should unzip the html docs.. + gunzip ${D}/usr/share/doc/${PF}/full_docs/faq/* + gunzip ${D}/usr/share/doc/${PF}/full_docs/htmldocs/* + + + # link /usr/bin/smbmount to /sbin/mount.smbfs which allows it + # to work transparently with the standard 'mount' command.. + dodir /sbin + dosym /usr/bin/smbmount /sbin/mount.smbfs + + + # make the smb backend symlink for cups printing support.. + if [ -n "`use cups`" ] ; then + dodir /usr/lib/cups/backend + dosym /usr/bin/smbspool /usr/lib/cups/backend/smb + fi + + + # make a symlink on /usr/lib/smbwrapper.so in /usr/bin + # to fix smbsh problem (another way to do that, anyone???) + dosym /usr/lib/smbwrapper.so /usr/bin/smbwrapper.so + + + # now the config files.. + insinto /etc + doins ${FILESDIR}/nsswitch.conf-winbind + doins ${FILESDIR}/nsswitch.conf-wins + + insinto /etc/samba + doins ${FILESDIR}/smbusers + doins ${FILESDIR}/smb.conf.example + doins ${FILESDIR}/lmhosts + + insinto /etc/pam.d + newins ${FILESDIR}/samba.pam samba + doins ${FILESDIR}/system-auth-winbind + + exeinto /etc/init.d + newexe ${FILESDIR}/samba-init samba + newexe ${FILESDIR}/winbind-init winbind + + insinto /etc/xinetd.d + newins ${FILESDIR}/swat.xinetd swat +} + +pkg_postinst() { + # touch /etc/samba/smb.conf so that people installing samba just + # to mount smb shares don't get annoying warnings all the time.. + if [ ! -e ${ROOT}/etc/samba/smb.conf ] ; then + touch ${ROOT}/etc/samba/smb.conf + fi + + + # empty dirs.. + install -m0700 -o root -g root -d ${ROOT}/etc/samba/private + install -m1777 -o root -g root -d ${ROOT}/var/spool/samba + install -m0755 -o root -g root -d ${ROOT}/var/log/samba + install -m0755 -o root -g root -d ${ROOT}/var/run/samba + install -m0755 -o root -g root -d ${ROOT}/var/lib/samba/{netlogon,profiles} + install -m0755 -o root -g root -d \ + ${ROOT}/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC} + + + # /etc/smb is changed to /etc/samba, /var/run/smb to /var/run/samba + ewarn "******************************************************************" + ewarn "* NOTE: If you upgraded from an earlier version of samba you *" + ewarn "* must move your /etc/smb files to the more aptly suited *" + ewarn "* /etc/samba directory. Also, please move the files in *" + ewarn "* /var/run/smb to /var/run/samba. Lastly, if you have *" + ewarn "* the string "/etc/smb" in your smb.conf file, please *" + ewarn "* change that to "/etc/samba". The old /etc/smb/codepages *" + ewarn "* directory doesn't need to be moved into /etc/samba *" + ewarn "* because those files are now kept in the *" + ewarn "* /var/lib/samba/codepages directory. *" + ewarn "* *" + ewarn "* If you need help with upgrading, email me: *" + ewarn "* woodchip@gentoo.org and I'll assist you. *" + ewarn "******************************************************************" +} |