Compare commits

..

6 Commits

Author SHA1 Message Date
Guenther Deschner e305e4f90a Update to 3.5.2
Guenther
2010-04-07 09:17:48 +00:00
Simo Sorce 6db39a9882 * Mon Mar 08 2010 Simo Sorce <ssorce@redhat.com> - 3.5.1-58
- Security update to 3.5.1
- Fixes CVE-2010-0728
2010-03-08 22:35:40 +00:00
Guenther Deschner 44398852c8 Remove cifs.upcall and mount.cifs entirely
(it has moved to a separate package now)

Guenther
2010-03-08 16:44:24 +00:00
Guenther Deschner 7a6cf149f5 Update to 3.5.0
Guenther
2010-03-03 12:36:45 +00:00
Guenther Deschner 33143d8d35 Update to 3.5.0rc3
Guenther
2010-02-22 14:40:38 +00:00
Jesse Keating fe3572be5f Initialize branch F-13 for samba 2010-02-17 03:08:04 +00:00
23 changed files with 1153 additions and 5156 deletions

1
.cvsignore Normal file
View File

@ -0,0 +1 @@
samba-3.5.2.tar.gz

213
.gitignore vendored
View File

@ -1,213 +0,0 @@
samba-3.5.4.tar.gz
samba-3.6.0pre1.tar.gz
/samba-3.6.0pre2.tar.gz
/samba-3.6.0pre3.tar.gz
/samba-3.6.0rc1.tar.gz
/samba-3.6.0rc2.tar.gz
/samba-3.6.0rc3.tar.gz
/samba-3.6.0.tar.gz
/samba-3.6.1.tar.gz
/samba-3.6.3.tar.gz
/samba-3.6.4.tar.gz
/samba-3.6.5.tar.gz
/samba-3.6.6.tar.gz
/samba-3.6.7.tar.gz
/samba-4.0.0rc1.tar.bz2
/samba-4.0.0rc2.tar.bz2
/samba-4.0.0rc3.tar.bz2
/samba-4.0.0rc4.tar.bz2
/samba-4.0.0rc5.tar.bz2
/samba-4.0.0rc6.tar.bz2
/samba-4.0.0.tar.bz2
/samba-4.0.1.tar.bz2
/samba-4.0.2.tar.bz2
/samba-4.0.3.tar.bz2
/samba-4.0.4.tar.bz2
/samba-4.0.5.tar.bz2
/samba-4.0.6.tar.bz2
/samba-4.0.7.tar.xz
/samba-4.1.0rc1.tar.xz
/samba-4.1.0rc2.tar.xz
/samba-4.1.0rc3.tar.xz
/samba-4.1.0rc4.tar.xz
/samba-4.1.0.tar.xz
/samba-4.1.1.tar.xz
/samba-4.1.2.tar.xz
/samba-4.1.3.tar.xz
/samba-4.1.4.tar.xz
/samba-4.1.5.tar.xz
/samba-4.1.6.tar.xz
/samba-4.1.8.tar.xz
/samba-4.1.9.tar.xz
/samba-4.1.11.tar.gz
/samba-4.1.11.tar.xz
/samba-4.1.12.tar.xz
/samba-4.2.0rc2.tar.xz
/samba-4.2.0rc3.tar.xz
/samba-4.2.0rc4.tar.xz
/samba-4.2.0rc5.tar.xz
/samba-4.2.0.tar.xz
/samba-4.2.1.tar.xz
/samba-4.2.2.tar.xz
/samba-4.2.3.tar.xz
/samba-4.3.0rc3.tar.xz
/samba-4.3.0rc4.tar.xz
/samba-4.3.0.tar.xz
/samba-4.3.1.tar.xz
/samba-4.3.2.tar.xz
/samba-4.3.3.tar.xz
/samba-4.3.4.tar.xz
/samba-4.4.0rc1.tar.xz
/samba-4.4.0rc2.tar.xz
/samba-4.4.0rc3.tar.xz
/samba-4.4.0rc4.tar.xz
/samba-4.4.0rc5.tar.xz
/samba-4.4.0.tar.xz
/samba-4.4.2.tar.xz
/samba-4.4.3.tar.xz
/samba-4.4.4.tar.xz
/samba-4.4.5.tar.xz
/samba-4.5.0rc1.tar.xz
/samba-4.5.0rc2.tar.xz
/samba-4.5.0rc3.tar.xz
/samba-4.5.0.tar.xz
/samba-4.5.1.tar.xz
/samba-4.5.2.tar.xz
/samba-4.5.3.tar.xz
/samba-4.6.0rc1.tar.xz
/samba-4.6.0rc2.tar.xz
/samba-4.6.0rc2.tar.asc
/samba-4.6.0rc3.tar.asc
/samba-4.6.0rc3.tar.xz
/samba-4.6.0rc4.tar.xz
/samba-4.6.0rc4.tar.asc
/samba-4.6.0.tar.asc
/samba-4.6.0.tar.xz
/samba-4.6.1.tar.xz
/samba-4.6.1.tar.asc
/samba-4.6.2.tar.xz
/samba-4.6.2.tar.asc
/samba-4.6.3.tar.xz
/samba-4.6.3.tar.asc
/samba-4.6.4.tar.xz
/samba-4.6.4.tar.asc
/samba-4.6.5.tar.xz
/samba-4.6.5.tar.asc
/samba-4.7.0rc1.tar.xz
/samba-4.7.0rc1.tar.asc
/samba-4.7.0rc3.tar.xz
/samba-4.7.0rc3.tar.asc
/samba-4.7.0rc5.tar.xz
/samba-4.7.0rc5.tar.asc
/samba-4.7.0rc6.tar.xz
/samba-4.7.0rc6.tar.asc
/samba-4.7.0.tar.xz
/samba-4.7.0.tar.asc
/samba-4.7.1.tar.xz
/samba-4.7.1.tar.asc
/samba-4.7.2.tar.xz
/samba-4.7.2.tar.asc
/samba-4.7.3.tar.xz
/samba-4.7.3.tar.asc
/samba-4.7.4.tar.xz
/samba-4.7.4.tar.asc
/samba-4.8.0rc1.tar.xz
/samba-4.8.0rc1.tar.asc
/samba-4.8.0rc2.tar.xz
/samba-4.8.0rc2.tar.asc
/samba-4.8.0rc3.tar.xz
/samba-4.8.0rc3.tar.asc
/samba-4.8.0rc4.tar.xz
/samba-4.8.0rc4.tar.asc
/samba-4.8.0.tar.xz
/samba-4.8.0.tar.asc
/samba-4.8.1.tar.xz
/samba-4.8.1.tar.asc
/samba-4.8.2.tar.xz
/samba-4.8.2.tar.asc
/samba-4.8.3.tar.asc
/samba-4.8.3.tar.xz
/samba-4.9.0rc1.tar.xz
/samba-4.9.0rc1.tar.asc
/samba-4.9.0rc2.tar.xz
/samba-4.9.0rc2.tar.asc
/samba-4.9.0rc3.tar.xz
/samba-4.9.0rc3.tar.asc
/samba-4.9.0rc4.tar.xz
/samba-4.9.0rc4.tar.asc
/samba-4.9.0rc5.tar.asc
/samba-4.9.0rc5.tar.xz
/samba-4.9.0.tar.xz
/samba-4.9.0.tar.asc
/samba-4.9.1.tar.asc
/samba-4.9.1.tar.xz
/samba-4.9.2.tar.xz
/samba-4.9.2.tar.asc
/samba-4.9.3.tar.xz
/samba-4.9.3.tar.asc
/samba-4.9.4.tar.xz
/samba-4.9.4.tar.asc
/samba-4.10.0rc1.tar.xz
/samba-4.10.0rc1.tar.asc
/samba-4.10.0rc2.tar.xz
/samba-4.10.0rc2.tar.asc
/samba-4.10.0rc3.tar.xz
/samba-4.10.0rc3.tar.asc
/samba-4.10.0rc4.tar.xz
/samba-4.10.0rc4.tar.asc
/samba-4.10.0.tar.xz
/samba-4.10.0.tar.asc
/samba-4.10.1.tar.xz
/samba-4.10.1.tar.asc
/samba-4.10.2.tar.xz
/samba-4.10.2.tar.asc
/samba-4.10.3.tar.xz
/samba-4.10.3.tar.asc
/samba-4.10.4.tar.xz
/samba-4.10.4.tar.asc
/samba-4.10.5.tar.xz
/samba-4.10.5.tar.asc
/samba-4.10.6.tar.xz
/samba-4.10.6.tar.asc
/samba-4.11.0rc1.tar.xz
/samba-4.11.0rc1.tar.asc
/samba-4.11.0rc2.tar.xz
/samba-4.11.0rc2.tar.asc
/samba-4.11.0rc3.tar.xz
/samba-4.11.0rc3.tar.asc
/samba-4.11.0rc4.tar.xz
/samba-4.11.0rc4.tar.asc
/samba-4.11.0.tar.xz
/samba-4.11.0.tar.asc
/samba-4.11.1.tar.xz
/samba-4.11.1.tar.asc
/samba-4.11.2.tar.xz
/samba-4.11.2.tar.asc
/samba-4.11.3.tar.xz
/samba-4.11.3.tar.asc
/samba-4.11.4.tar.xz
/samba-4.11.4.tar.asc
/samba-4.11.5.tar.xz
/samba-4.11.5.tar.asc
/samba-4.12.0rc1.tar.xz
/samba-4.12.0rc1.tar.asc
/samba-4.12.0rc2.tar.xz
/samba-4.12.0rc2.tar.asc
/samba-4.12.0rc3.tar.xz
/samba-4.12.0rc3.tar.asc
/samba-4.12.0rc4.tar.xz
/samba-4.12.0rc4.tar.asc
/samba-4.12.0.tar.xz
/samba-4.12.0.tar.asc
/samba-4.12.1.tar.xz
/samba-4.12.1.tar.asc
/samba-4.12.2.tar.xz
/samba-4.12.2.tar.asc
/samba-4.12.3.tar.xz
/samba-4.12.3.tar.asc
/samba-4.12.4.tar.xz
/samba-4.12.4.tar.asc
/samba-4.12.5.tar.xz
/samba-4.12.5.tar.asc
/samba-4.13.0rc1.tar.xz
/samba-4.13.0rc1.tar.asc

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
# Makefile for source rpm: samba
# $Id$
NAME := samba
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,29 +0,0 @@
Downgrading Samba
=================
Short version: data-preserving downgrades between Samba versions are not supported
Long version:
With Samba development there are cases when on-disk database format evolves.
In general, Samba Team attempts to maintain forward compatibility and
automatically upgrade databases during runtime when requires.
However, when downgrade is required Samba will not perform downgrade to
existing databases. It may be impossible if new features that caused database
upgrade are in use. Thus, one needs to consider a downgrade procedure before
actually downgrading Samba setup.
Please always perform back up prior both upgrading and downgrading across major
version changes. Restoring database files is easiest and simplest way to get to
previously working setup.
Easiest way to downgrade is to remove all created databases and start from scratch.
This means losing all authentication and domain relationship data, as well as
user databases (in case of tdb storage), printers, registry settings, and winbindd
caches.
Remove databases in following locations:
/var/lib/samba/*.tdb
/var/lib/samba/private/*.tdb
In particular, registry settings are known to prevent running downgraded versions
(Samba 4 to Samba 3) as registry format has changed between Samba 3 and Samba 4.

186
README.md
View File

@ -1,186 +0,0 @@
Samba is a free SMB and CIFS client and server and Domain Controller for UNIX
and other operating systems. It is maintained by the Samba Team, who support the
original author, Andrew Tridgell.
This software is freely distributable under the GNU public license, a copy of
which you should have received with this software (in a file called COPYING).
# WHAT IS SMB/CIFS?
This is a big question.
The very short answer is that it is the protocol by which a lot of PC-related
machines share files and printers and other information such as lists of
available files and printers. Operating systems that support this natively
include Windows 9x, Windows NT (and derivatives), OS/2, Mac OS X and Linux. Add
on packages that achieve the same thing are available for DOS, Windows 3.1, VMS,
Unix of all kinds, MVS, and more. Some Web Browsers can speak this protocol as
well (smb://). Alternatives to SMB include Netware, NFS, Appletalk, Banyan
Vines, Decnet etc; many of these have advantages but none are both public
specifications and widely implemented in desktop machines by default.
The Common Internet File system (CIFS) is what the new SMB initiative is called.
For details watch [here](https://samba.org/cifs)
# WHY DO PEOPLE WANT TO USE SMB?
* Many people want to integrate their Microsoft desktop clients with their Unix
servers.
* Others want to integrate their Microsoft (etc) servers with Unix servers. This
is a different problem to integrating desktop clients.
* Others want to replace protocols like NFS, DecNet and Novell NCP, especially
when used with PCs.
# WHAT CAN SAMBA DO?
Please refer to the WHATSNEW.txt included with this README for a list of
features in the latest Samba release.
Here is a very short list of what samba includes, and what it does. For many
networks this can be simply summarized by "Samba provides a complete replacement
for Windows NT, Warp, NFS or Netware servers."
* a SMB server, to provide Windows NT and LAN Manager-style file and print
services to SMB clients such as Windows 95, Warp Server, smbfs and others.
* a Windows Domain Controller (NT4 and AD) replacement.
* a file/print server that can act as a member of a Windows NT 4.0 or Active
Directory domain.
* a NetBIOS (rfc1001/1002) nameserver, which amongst other things gives browsing
support. Samba can be the master browser on your LAN if you wish.
* a ftp-like SMB client so you can access PC resources (disks and printers) from
UNIX, Netware, and other operating systems
* a tar extension to the client for backing up PCs
* limited command-line tool that supports some of the NT administrative
functionality, which can be used on Samba, NT workstation and NT server.
For a much better overview have a look at the [web site](http://samba.org/samba)
and browse the user survey.
#### Related packages include:
* cifsvfs, an advanced Linux-only filesystem allowing you to mount remote SMB
filesystems from PCs on your Linux box. This is included as standard with Linux
2.5 and later.
* smbfs, the previous Linux-only filesystem allowing you to mount remote SMB
filesystems from PCs on your Linux box. This is included as standard with Linux
2.0 and later.
# CONTRIBUTIONS
### To contribute via GitHub
* fork the official Samba team repository on GitHub
-- see [GitHub](https://github.com/samba-team/samba)
* become familiar with the coding standards as described in README.Coding
* make sure you read the Samba copyright policy
-- see [Copyright Policy](https://www.samba.org/samba/devel/copyright-policy.html)
* create a feature branch
* make changes
* when committing, be sure to add signed-off-by tags
-- see [Commit message tags](https://wiki.samba.org/index.php/CodeReview#commit_message_tags)
* send a pull request for your branch through GitHub
* this will trigger an email to the samba-technical mailing list
* discussion happens on the samba-technical mailing list as described below
* more info on using Git for Samba development can be found on Samba Wiki
-- see [Using Git for Samba](https://wiki.samba.org/index.php/Using_Git_for_Samba_Development)
### To contribute via mailing lists
Join the mailing list. The Samba team accepts patches (preferably in "diff -u"
format, see [here](https://samba.org/samba/devel) for more details) and are
always glad to receive feedback or suggestions to the address
samba@lists.samba.org. More information on the various Samba mailing lists can
be found at [mailman](http://lists.samba.org).
You can also get the Samba sourcecode straight from the [git repository](http://wiki.samba.org/index.php/Using_Git_for_Samba_Development).
If you like a particular feature then look through the git change-log on the
[web](https://git.samba.org/?p=samba.git;a=summary) and see who added it, then
send them an email.
Remember that free software of this kind lives or dies by the response we get.
If no one tells us they like it then we'll probably move onto something else.
# MORE INFO
### DOCUMENTATION
There is quite a bit of documentation included with the package, including man
pages, and lots of .html files with hints and useful info. This is also
available from the web page. There is a growing collection of information under
docs/.
A list of Samba documentation in languages other than English is available on
the web page.
If you would like to help with the documentation, please coordinate on the
samba@lists.samba.org mailing list. See the next section for details on
subscribing to samba mailing lists.
### MAILING LIST
Please do NOT send subscription/unsubscription requests to the lists!
There is a mailing list for discussion of Samba. For details go to [mailman](https://lists.samba.org)
or send mail to <samba-subscribe@lists.samba.org>.
There is also an announcement mailing list where new versions are announced. To
subscribe go to [mailman](http://lists.samba.org) or send mail to
<samba-announce-subscribe@lists.samba.org>. All announcements also go to the
samba list, so you only need to be on one.
For details of other Samba mailing lists and for access to archives, see
[mailman](http://lists.samba.org)
### MAILING LIST ETIQUETTE
A few tips when submitting to this or any mailing list.
- Make your subject short and descriptive. Avoid the words "help" or "Samba" in
the subject. The readers of this list already know that a) you need help, and b)
you are writing about samba (of course, you may need to distinguish between
Samba PDC and other file sharing software). Avoid phrases such as "what is" and
"how do i". Some good subject lines might look like "Slow response with Excel
files" or "Migrating from Samba PDC to NT PDC".
- If you include the original message in your reply, trim it so that only the
relevant lines, enough to establish context, are included. Chances are (since
this is a mailing list) we've already read the original message.
- Trim irrelevant headers from the original message in your reply. All we need
to see is a) From, b) Date, and c) Subject. We don't even really need the
Subject, if you haven't changed it. Better yet is to just preface the original
message with "On [date] [someone] wrote:".
- Please don't reply to or argue about spam, spam filters or viruses on any
Samba lists. We do have a spam filtering system that is working quite well thank
you very much but occasionally unwanted messages slip through. Deal with it.
- Never say "Me too." It doesn't help anyone solve the problem. Instead, if you
ARE having the same problem, give more information. Have you seen something that
the other writer hasn't mentioned, which may be helpful?
- If you ask about a problem, then come up with the solution on your own or
through another source, by all means post it. Someone else may have the same
problem and is waiting for an answer, but never hears of it.
- Give as much *relevant* information as possible such as Samba release number,
OS, kernel version, etc...
- RTFM. Google.
### WEB SITE
A Samba WWW [site](https://samba.org) has been setup with lots of useful info.
As well as general information and documentation, this also has searchable
archives of the mailing list and a user survey that shows who else is using this
package.

1
branch Normal file
View File

@ -0,0 +1 @@
F-13

114
nmb.init Normal file
View File

@ -0,0 +1,114 @@
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
#
# pidfile: /var/run/samba/nmbd.pid
# config: /etc/samba/smb.conf
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 1
fi
# Avoid using root's TMPDIR
unset TMPDIR
# Source networking configuration.
. /etc/sysconfig/network
if [ -f /etc/sysconfig/samba ]; then
. /etc/sysconfig/samba
fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 6
RETVAL=0
start() {
KIND="NMB"
echo -n $"Starting $KIND services: "
daemon nmbd $NMBDOPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nmb || \
RETVAL=1
return $RETVAL
}
stop() {
KIND="NMB"
echo -n $"Shutting down $KIND services: "
killproc nmbd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nmb
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading smb.conf file: "
killproc nmbd -HUP
RETVAL=$?
echo
return $RETVAL
}
rhstatus() {
status nmbd
return $?
}
# Allow status as non-root.
if [ "$1" = status ]; then
rhstatus
exit $?
fi
# Check that we can write to it... so non-root users stop here
[ -w /etc/samba/smb.conf ] || exit 4
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/nmb ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
exit 2
esac
exit $?

View File

@ -0,0 +1,90 @@
diff -ur samba-3.0.0rc3/source/lib/popt_common.c samba-3.0.0rc3-lhh/source/lib/popt_common.c
--- samba-3.0.0rc3/source/lib/popt_common.c 2003-09-10 13:57:00.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/lib/popt_common.c 2003-09-11 13:49:24.000000000 -0400
@@ -87,7 +87,7 @@
case 'n':
if (arg) {
- set_global_myname(arg);
+ set_global_myname_override(arg);
}
break;
diff -ur samba-3.0.0rc3/source/lib/util.c samba-3.0.0rc3-lhh/source/lib/util.c
--- samba-3.0.0rc3/source/lib/util.c 2003-09-08 12:04:35.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/lib/util.c 2003-09-11 13:47:18.000000000 -0400
@@ -84,6 +84,7 @@
***********************************************************************/
static char *smb_myname;
+static char *smb_myname_override;
static char *smb_myworkgroup;
static char *smb_scope;
static int smb_num_netbios_names;
@@ -108,6 +109,27 @@
return smb_myname;
}
+
+/***********************************************************************
+ Allocate and set override for myname. Ensure upper case.
+***********************************************************************/
+
+BOOL set_global_myname_override(const char *myname)
+{
+ SAFE_FREE(smb_myname_override);
+ smb_myname_override = strdup(myname);
+ if (!smb_myname_override)
+ return False;
+ strupper_m(smb_myname_override);
+ return True;
+}
+
+const char *global_myname_override(void)
+{
+ return smb_myname_override;
+}
+
+
/***********************************************************************
Allocate and set myworkgroup. Ensure upper case.
***********************************************************************/
diff -ur samba-3.0.0rc3/source/nmbd/nmbd.c samba-3.0.0rc3-lhh/source/nmbd/nmbd.c
--- samba-3.0.0rc3/source/nmbd/nmbd.c 2003-09-10 13:57:00.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/nmbd/nmbd.c 2003-09-11 14:05:21.000000000 -0400
@@ -608,6 +608,7 @@
{"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
{"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
POPT_COMMON_SAMBA
+ POPT_COMMON_CONNECTION
{ NULL }
};
diff -ur samba-3.0.0rc3/source/param/loadparm.c samba-3.0.0rc3-lhh/source/param/loadparm.c
--- samba-3.0.0rc3/source/param/loadparm.c 2003-09-08 12:04:35.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/param/loadparm.c 2003-09-11 14:00:51.000000000 -0400
@@ -1327,7 +1327,10 @@
*/
string_set(&Globals.szPasswdChat, DEFAULT_PASSWD_CHAT);
- set_global_myname(myhostname());
+ if (!global_myname_override())
+ set_global_myname(myhostname());
+ else
+ set_global_myname(global_myname_override());
string_set(&Globals.szNetbiosName,global_myname());
set_global_myworkgroup(WORKGROUP);
@@ -2698,6 +2701,12 @@
BOOL ret;
pstring netbios_name;
+ if (global_myname_override()) {
+ DEBUG(4, ("handle_netbios_name: ignoring netbios name "
+ "parameter"));
+ return True;
+ }
+
pstrcpy(netbios_name, pszParmValue);
standard_sub_basic(current_user_info.smb_name, netbios_name,sizeof(netbios_name));

View File

@ -0,0 +1,11 @@
--- samba-3.2.0pre1/source3/winbindd/winbindd_group.c.star 2007-10-03 17:40:31.000000000 -0400
+++ samba-3.2.0pre1/source3/winbindd/winbindd_group.c 2007-10-03 17:40:46.000000000 -0400
@@ -215,7 +215,7 @@
/* Group name and password */
safe_strcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name) - 1);
- safe_strcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd) - 1);
+ safe_strcpy(gr->gr_passwd, "*", sizeof(gr->gr_passwd) - 1);
return True;
}

View File

@ -0,0 +1,11 @@
--- samba-3.2.0pre1/nsswitch/winbind_struct_protocol.h.pipedir 2007-10-03 15:32:23.000000000 -0400
+++ samba-3.2.0pre1/nsswitch/winbind_struct_protocol.h 2007-10-03 15:33:13.000000000 -0400
@@ -24,7 +24,7 @@
* is needed for launchd support -- jpeach.
*/
#ifndef WINBINDD_SOCKET_DIR
-#define WINBINDD_SOCKET_DIR "/tmp/.winbindd" /* Name of PF_UNIX dir */
+#define WINBINDD_SOCKET_DIR "/var/run/winbindd" /* Name of PF_UNIX dir */
#endif
/*

47
samba-3.2.5-inotify.patch Normal file
View File

@ -0,0 +1,47 @@
--- source3/smbd/notify_inotify.c.inotify 2009-12-15 09:25:26.000000000 +0100
+++ source3/smbd/notify_inotify.c 2009-12-17 18:42:06.000000000 +0100
@@ -75,6 +75,7 @@
struct sys_notify_context *ctx;
int fd;
struct inotify_watch_context *watches;
+ bool broken_inotify; /* Late stop for broken system */
};
struct inotify_watch_context {
@@ -239,8 +240,15 @@
filenames, and thus can't know how much to allocate
otherwise
*/
- if (ioctl(in->fd, FIONREAD, &bufsize) != 0 ||
- bufsize == 0) {
+ if ((ioctl(in->fd, FIONREAD, &bufsize) != 0) && (errno == EACCES)) {
+ /*
+ * Workaround for broken system (SELinux policy bug fixed since long but it is always better not to loop on EACCES)
+ */
+ TALLOC_FREE(fde);
+ in->broken_inotify = True;
+ return;
+ }
+ if (bufsize == 0) {
DEBUG(0,("No data on inotify fd?!\n"));
TALLOC_FREE(fde);
return;
@@ -297,6 +305,7 @@
}
in->ctx = ctx;
in->watches = NULL;
+ in->broken_inotify = False;
ctx->private_data = in;
talloc_set_destructor(in, inotify_destructor);
@@ -391,6 +400,10 @@
in = talloc_get_type(ctx->private_data, struct inotify_private);
+ if (in->broken_inotify) {
+ return NT_STATUS_OK;
+ }
+
mask = inotify_map(e);
if (mask == 0) {
/* this filter can't be handled by inotify */

View File

@ -1,10 +1,7 @@
/var/log/samba/log.* {
compress
dateext
maxage 365
rotate 99
/var/log/samba/* {
notifempty
olddir /var/log/samba/old
missingok
sharedscripts
copytruncate
}

5183
samba.spec

File diff suppressed because it is too large Load Diff

6
samba.sysconfig Normal file
View File

@ -0,0 +1,6 @@
# Options to smbd
SMBDOPTIONS="-D"
# Options to nmbd
NMBDOPTIONS="-D"
# Options for winbindd
WINBINDOPTIONS=""

15
samba.xinetd Normal file
View File

@ -0,0 +1,15 @@
# default: off
# 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.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = yes
}

View File

@ -2,23 +2,26 @@
# options listed here, refer to the smb.conf(5) manual page. Samba has a huge
# number of configurable options, most of which are not shown in this example.
#
# The Samba Wiki contains a lot of step-by-step guides installing, configuring,
# and using Samba:
# https://wiki.samba.org/index.php/User_Documentation
# The Official Samba 3.2.x HOWTO and Reference Guide contains step-by-step
# guides for installing, configuring, and using Samba:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# The Samba-3 by Example guide has working examples for smb.conf. This guide is
# generated daily: http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# In this file, lines starting with a semicolon (;) or a hash (#) are
# comments and are ignored. This file uses hashes to denote commentary and
# semicolons for parts of the file you may wish to configure.
#
# NOTE: Run the "testparm" command after modifying this file to check for basic
# Note: Run the "testparm" command after modifying this file to check for basic
# syntax errors.
#
#---------------
# Security-Enhanced Linux (SELinux) Notes:
#
# Turn the samba_domain_controller Boolean on to allow a Samba PDC to use the
# useradd and groupadd family of binaries. Run the following command as the
# root user to turn this Boolean on:
# Turn the samba_domain_controller Boolean on to allow Samba to use the useradd
# and groupadd family of binaries. Run the following command as the root user to
# turn this Boolean on:
# setsebool -P samba_domain_controller on
#
# Turn the samba_enable_home_dirs Boolean on if you want to share home
@ -67,8 +70,7 @@
#
# server string = the equivalent of the Windows NT Description field.
#
# netbios name = used to specify a server name that is not tied to the hostname,
# maximum is 15 characters.
# netbios name = used to specify a server name that is not tied to the hostname.
#
# interfaces = used to configure Samba to listen on multiple network interfaces.
# If you have multiple interfaces, you can use the "interfaces =" option to
@ -77,7 +79,7 @@
#
# hosts allow = the hosts allowed to connect. This option can also be used on a
# per-share basis.
#
# hosts deny = the hosts not allowed to connect. This option can also be used on
# a per-share basis.
#
@ -295,7 +297,7 @@
; writable = no
; share modes = no
# Un-comment the following to provide a specific roaming profile share.
# 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
@ -308,6 +310,6 @@
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = no
; writable = yes
; printable = no
; write list = +staff

View File

@ -1,37 +0,0 @@
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775

114
smb.init Normal file
View File

@ -0,0 +1,114 @@
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd daemon \
# used to provide SMB network services.
#
# pidfile: /var/run/samba/smbd.pid
# config: /etc/samba/smb.conf
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 1
fi
# Avoid using root's TMPDIR
unset TMPDIR
# Source networking configuration.
. /etc/sysconfig/network
if [ -f /etc/sysconfig/samba ]; then
. /etc/sysconfig/samba
fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 6
RETVAL=0
start() {
KIND="SMB"
echo -n $"Starting $KIND services: "
daemon smbd $SMBDOPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb || \
RETVAL=1
return $RETVAL
}
stop() {
KIND="SMB"
echo -n $"Shutting down $KIND services: "
killproc smbd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/smb
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading smb.conf file: "
killproc smbd -HUP
RETVAL=$?
echo
return $RETVAL
}
rhstatus() {
status smbd
return $?
}
# Allow status as non-root.
if [ "$1" = status ]; then
rhstatus
exit $?
fi
# Check that we can write to it... so non-root users stop here
[ -w /etc/samba/smb.conf ] || exit 4
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/smb ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
exit 2
esac
exit $?

84
smbprint Normal file
View File

@ -0,0 +1,84 @@
#!/bin/sh
# This script is an input filter for printcap printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# For example you could have a printcap entry like this
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
# appropriate permissions and ownerships for your system.
# Set these to the server and service you wish to print to
# In this example I have a WfWg PC called "lapland" that has a printer
# exported called "printer" with no password.
#
# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
# so that the server, service, and password can be read from
# a /usr/var/spool/lpd/PRINTNAME/.config file.
#
# In order for this to work the /etc/printcap entry must include an
# accounting file (af=...):
#
# cdcolour:\
# :cm=CD IBM Colorjet on 6th:\
# :sd=/var/spool/lpd/cdcolour:\
# :af=/var/spool/lpd/cdcolour/acct:\
# :if=/usr/local/etc/smbprint:\
# :mx=0:\
# :lp=/dev/null:
#
# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
# share=PC_SERVER
# user="user"
# password="password"
#
# Please, do not modify the order in the file.
# Example:
# share=\\server\deskjet
# user="fred"
# password=""
#
# The last parameter to the filter is the accounting file name.
# Extract the directory name from the file name.
# Concat this with /.config to get the config file.
#
eval acct_file=\${$#}
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config
# Should read the following variables set in the config file:
# share
# hostip
# user
# password
eval `cat $config_file`
share=`echo $share | sed "s/[\]/\//g"`
if [ "$user" != "" ]; then
usercmd="-U"
else
usercmd=""
fi
if [ "$workgroup" != "" ]; then
workgroupcmd="-W"
else
workgroupcmd=""
fi
if [ "$translate" = "yes" ]; then
command="translate ; print -"
else
command="print -"
fi
#echo $share $password $translate $x_command > /tmp/smbprint.log
cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
$hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \
-c "$command" 2>/dev/null

View File

@ -1,2 +1 @@
SHA512 (samba-4.13.0rc1.tar.xz) = 3e6d431998907ad8c81f488ddf78dcef5fd6a4cdf8ca684e5ad0ce9bf7217d82fcca7501155446c83d804f939bea7012f1d37c1f738d8ec7bc769a9148a6592a
SHA512 (samba-4.13.0rc1.tar.asc) = 6dfe9467fd7fd28db91ae15fa3314a7707cfeb88c8ecd2af532d57614bec311119546a2fd4ced71063df9b7d6879a62f9ba512ae05d494323e0362a5492d33fa
6f8cf649207ccd8c2c17e28c335f4e9d samba-3.5.2.tar.gz

8
swat.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Name=Samba Configuration
Name[de]=Samba Konfiguration
Type=Application
Comment=Configure Samba with a web based interface
Exec=htmlview http://127.0.0.1:901/
Terminal=false
Categories=X-Red-Hat-Extra;Application;System;X-Red-Hat-ServerConfig;

102
winbind.init Normal file
View File

@ -0,0 +1,102 @@
#!/bin/sh
#
# chkconfig: - 27 73
# description: Starts and stops the Samba winbind daemon
# #
# pidfile: /var/run/winbindd.pid
# config: /etc/samba/smb.conf
# Source function library.
. /etc/rc.d/init.d/functions
# Avoid using root's TMPDIR
unset TMPDIR
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 6
[ -f /etc/sysconfig/samba ] && . /etc/sysconfig/samba
RETVAL=0
start() {
KIND="Winbind"
echo -n $"Starting $KIND services: "
daemon winbindd "$WINBINDOPTIONS"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbindd || RETVAL=1
return $RETVAL
}
stop() {
echo
KIND="Winbind"
echo -n $"Shutting down $KIND services: "
killproc winbindd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbindd
echo ""
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading smb.conf file: "
killproc winbindd -HUP
RETVAL=$?
echo
return $RETVAL
}
rhstatus() {
status winbindd
return $?
}
# Allow status as non-root.
if [ "$1" = status ]; then
rhstatus
exit $?
fi
# Check that we can write to it... so non-root users stop here
[ -w /etc/samba/smb.conf ] || exit 4
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/winbindd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
exit 2
esac
exit $?