mirror of https://gitee.com/openkylin/samba.git
apply patches
This commit is contained in:
commit
f2da2d2764
2
VERSION
2
VERSION
|
@ -123,5 +123,5 @@ SAMBA_VERSION_RELEASE_NICKNAME=
|
|||
# -> "3.0.0rc2-VendorVersion" #
|
||||
# #
|
||||
########################################################
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=
|
||||
SAMBA_VERSION_VENDOR_SUFFIX=Ubuntu
|
||||
SAMBA_VERSION_VENDOR_PATCH=
|
||||
|
|
|
@ -126,7 +126,7 @@ def install_rpath(target):
|
|||
ret = set()
|
||||
if bld.env.RPATH_ON_INSTALL:
|
||||
ret.add(bld.EXPAND_VARIABLES(bld.env.LIBDIR))
|
||||
if bld.env.RPATH_ON_INSTALL_PRIVATE and needs_private_lib(bld, target):
|
||||
if bld.env.RPATH_ON_INSTALL_PRIVATE:
|
||||
ret.add(bld.EXPAND_VARIABLES(bld.env.PRIVATELIBDIR))
|
||||
return list(ret)
|
||||
|
||||
|
|
|
@ -223,6 +223,9 @@ def SAMBA_LIBRARY(bld, libname, source,
|
|||
raise Errors.WafError("public library '%s' must have header files" %
|
||||
libname)
|
||||
|
||||
if private_library and not vnum:
|
||||
vnum = '0'
|
||||
|
||||
if bundled_name is not None:
|
||||
pass
|
||||
elif target_type == 'PYTHON' or realname or not private_library:
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
[logging]
|
||||
# Enable logging to syslog
|
||||
# location = syslog
|
||||
location = syslog
|
||||
|
||||
# Default log level
|
||||
# log level = NOTICE
|
||||
log level = NOTICE
|
||||
|
||||
[cluster]
|
||||
# Shared recovery lock file to avoid split brain. Daemon
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
. "${CTDB_BASE}/functions"
|
||||
|
||||
service_name="nfs"
|
||||
service_name="nfs-kernel-server"
|
||||
|
||||
load_script_options "service" "60.nfs"
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
. "${CTDB_BASE}/functions"
|
||||
|
||||
service_name="nfs"
|
||||
service_name="nfs-kernel-server"
|
||||
|
||||
load_system_config "nfs"
|
||||
load_system_config "nfs-kernel-server"
|
||||
|
||||
load_script_options
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ nfs_exports_file="${CTDB_NFS_EXPORTS_FILE:-/var/lib/nfs/etab}"
|
|||
|
||||
# As above, edit the default value below. CTDB_NFS_DISTRO_STYLE is a
|
||||
# test variable only.
|
||||
nfs_distro_style="${CTDB_NFS_DISTRO_STYLE:-systemd-redhat}"
|
||||
nfs_distro_style="${CTDB_NFS_DISTRO_STYLE:-systemd-debian}"
|
||||
|
||||
case "$nfs_distro_style" in
|
||||
systemd-*)
|
||||
|
@ -33,6 +33,14 @@ systemd-*)
|
|||
;;
|
||||
*-debian)
|
||||
nfs_rquotad_service="quotarpc"
|
||||
nfs_lock_service=""
|
||||
nfs_lock_service=""
|
||||
nfs_mountd_service=""
|
||||
nfs_status_service=""
|
||||
nfs_rquotad_service=""
|
||||
nfs_service="nfs-kernel-server"
|
||||
nfs_config="/etc/default/nfs-kernel-server"
|
||||
nfs_rquotad_config="/etc/default/quota"
|
||||
;;
|
||||
*)
|
||||
echo "Internal error"
|
||||
|
|
|
@ -21,7 +21,7 @@ die ()
|
|||
}
|
||||
|
||||
# Try different variables to find config file for NFS_HOSTNAME
|
||||
load_system_config "nfs" "nfs-common"
|
||||
load_system_config "nfs-kernel-server"
|
||||
|
||||
[ -n "$NFS_HOSTNAME" ] || \
|
||||
die "NFS_HOSTNAME is not configured. statd-callout failed"
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
</para>
|
||||
|
||||
</description>
|
||||
<value type="default">0</value>
|
||||
<value type="default">100</value>
|
||||
</samba:parameter>
|
||||
|
|
|
@ -1270,9 +1270,9 @@ Something we failed to parse\&. Default action is to "edit" it in interactive an
|
|||
.RE
|
||||
.SS "USERSHARE"
|
||||
.PP
|
||||
Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\&.
|
||||
Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user-defined shares to be exported using the "net usershare" commands\&.
|
||||
.PP
|
||||
To set this up, first set up your smb\&.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\&. Set the permissions on /usr/local/samba/lib/usershares to 01770\&. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\&. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\&.conf a line such as : usershare max shares = 100\&. To allow 100 usershare definitions\&. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\&.
|
||||
Members of the UNIX group "sambashare" can create user-defined shares on demand using the commands below\&.
|
||||
.PP
|
||||
The usershare commands are:
|
||||
.RS 4
|
||||
|
|
|
@ -69,6 +69,9 @@ in Samba releases.
|
|||
The smbldap-tools package can be downloaded individually from
|
||||
https://gna.org/projects/smbldap-tools/
|
||||
|
||||
On Debian systems, the smbldap-tools exists as a separate package
|
||||
and is not included in LDAP examples.
|
||||
|
||||
!==
|
||||
!== end of README
|
||||
!==
|
||||
|
|
|
@ -2985,6 +2985,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
|
|||
|
||||
lpcfg_do_global_parameter(lp_ctx, "init logon delay", "100");
|
||||
|
||||
lpcfg_do_global_parameter(lp_ctx, "usershare max shares", "100");
|
||||
|
||||
lpcfg_do_global_parameter(lp_ctx, "usershare owner only", "yes");
|
||||
|
||||
lpcfg_do_global_parameter(lp_ctx, "-valid", "yes");
|
||||
|
|
|
@ -446,7 +446,7 @@ def configure(conf):
|
|||
define = 'HAVE_BSD_STRTOLL',
|
||||
)
|
||||
conf.CHECK_FUNCS('if_nametoindex strerror_r')
|
||||
conf.CHECK_FUNCS('getdirentries getdents syslog')
|
||||
conf.CHECK_FUNCS('syslog')
|
||||
conf.CHECK_FUNCS('gai_strerror get_current_dir_name')
|
||||
conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid')
|
||||
conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')
|
||||
|
|
|
@ -10,6 +10,7 @@ NotifyAccess=all
|
|||
PIDFile=@PIDDIR@/smbd.pid
|
||||
LimitNOFILE=16384
|
||||
EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
|
||||
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
|
||||
ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
LimitCORE=infinity
|
||||
|
|
|
@ -80,6 +80,16 @@ extern "C" {
|
|||
#include <fcntl.h>
|
||||
#include <utime.h>
|
||||
|
||||
/* Debian bug #221618 */
|
||||
#ifdef _LARGEFILE64_SOURCE
|
||||
#undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#define _LARGEFILE64_SOURCE 1
|
||||
#ifdef _FILE_OFFSET_BITS
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#endif
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
#define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
|
||||
|
||||
#define SMBC_WORKGROUP 1
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
/* the default pager to use for the client "more" command. Users can
|
||||
override this with the PAGER environment variable */
|
||||
#ifndef PAGER
|
||||
#define PAGER "more"
|
||||
#define PAGER "/usr/bin/pager"
|
||||
#endif
|
||||
|
||||
/* the size of the uid cache used to reduce valid user checks */
|
||||
|
|
|
@ -850,7 +850,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
|
|||
lpcfg_string_set(Globals.ctx, &Globals.usershare_path, s);
|
||||
TALLOC_FREE(s);
|
||||
lpcfg_string_set(Globals.ctx, &Globals.usershare_template_share, "");
|
||||
Globals.usershare_max_shares = 0;
|
||||
Globals.usershare_max_shares = 100;
|
||||
/* By default disallow sharing of directories not owned by the sharer. */
|
||||
Globals.usershare_owner_only = true;
|
||||
/* By default disallow guest access to usershares. */
|
||||
|
|
|
@ -382,34 +382,78 @@ int main(int argc, char **argv) {
|
|||
msg="Checking for LL suffix on long long integers")
|
||||
|
||||
conf.CHECK_FUNCS('''
|
||||
_acl __acl atexit
|
||||
_chdir __chdir chflags chmod _close __close _closedir
|
||||
__closedir crypt16 devnm dirfd
|
||||
DNSServiceRegister _dup __dup _dup2 __dup2 endmntent execl
|
||||
_facl __facl _fchdir
|
||||
__fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync
|
||||
_fork __fork fseeko
|
||||
_fstat __fstat fsync
|
||||
futimens futimes __fxstat getauthuid
|
||||
getcwd _getcwd __getcwd getdents __getdents getdirentries
|
||||
getgrent getgrnam getgrouplist getgrset getmntent getpagesize
|
||||
getpwanam getpwent_r getrlimit
|
||||
glob grantpt hstrerror initgroups innetgr
|
||||
llseek _llseek __llseek _lseek __lseek
|
||||
_lstat __lstat lutimes
|
||||
__lxstat memalign mknod mlock mlockall munlock munlockall
|
||||
_open __open _opendir __opendir
|
||||
DNSServiceRegister
|
||||
atexit
|
||||
chflags
|
||||
chmod
|
||||
crypt16
|
||||
devnm
|
||||
dirfd
|
||||
endmntent
|
||||
execl
|
||||
fchmod
|
||||
fchown
|
||||
fcvt
|
||||
fcvtl
|
||||
fdatasync
|
||||
fseeko
|
||||
fsync
|
||||
futimens
|
||||
futimes
|
||||
getauthuid
|
||||
getcwd
|
||||
getgrent
|
||||
getgrnam
|
||||
getgrouplist
|
||||
getgrset
|
||||
getmntent
|
||||
getpagesize
|
||||
getpwanam
|
||||
getpwent_r
|
||||
getrlimit
|
||||
glob
|
||||
grantpt
|
||||
hstrerror
|
||||
initgroups
|
||||
innetgr
|
||||
llseek
|
||||
lutimes
|
||||
memalign
|
||||
mknod
|
||||
mlock
|
||||
mlockall
|
||||
munlock
|
||||
munlockall
|
||||
pathconf poll
|
||||
posix_memalign pread _pread __pread
|
||||
pwrite _pwrite __pwrite
|
||||
rdchk _read __read _readdir __readdir
|
||||
_seekdir __seekdir
|
||||
select setenv setgidx setgroups setlocale setluid
|
||||
setmntent setpgid setpriv setsid setuidx
|
||||
_stat __stat statvfs
|
||||
strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl sysctlbyname
|
||||
__sys_llseek syslog _telldir __telldir timegm
|
||||
utimensat vsyslog _write __write __xstat
|
||||
posix_memalign
|
||||
pread
|
||||
pwrite
|
||||
rdchk
|
||||
select
|
||||
setenv
|
||||
setgidx
|
||||
setgroups
|
||||
setlocale
|
||||
setluid
|
||||
setmntent
|
||||
setpgid
|
||||
setpriv
|
||||
setsid
|
||||
setuidx
|
||||
statvfs
|
||||
strcasecmp
|
||||
strchr
|
||||
strpbrk
|
||||
strsignal
|
||||
strtol
|
||||
strupr
|
||||
sysconf
|
||||
sysctl
|
||||
sysctlbyname
|
||||
syslog
|
||||
timegm
|
||||
utimensat
|
||||
vsyslog
|
||||
''')
|
||||
|
||||
conf.CHECK_SAMBA3_CHARSET() # see build/charset.py
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -860,7 +860,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
|
|||
HEIMDAL_GENERATOR(
|
||||
name="HEIMDAL_ERRORLIST",
|
||||
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
|
||||
source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py',
|
||||
source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt-table ../heimdal/lib/wind/stringprep.py',
|
||||
target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h'
|
||||
)
|
||||
|
||||
|
@ -882,7 +882,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
|
|||
HEIMDAL_GENERATOR(
|
||||
name = 'HEIMDAL_BIDI_TABLE',
|
||||
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
|
||||
source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt',
|
||||
source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt-table',
|
||||
target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c'
|
||||
)
|
||||
|
||||
|
@ -890,7 +890,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
|
|||
HEIMDAL_GENERATOR(
|
||||
name = 'HEIMDAL_MAP_TABLE',
|
||||
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[2].abspath()}' '${SRC[2].parent.abspath(env)}'",
|
||||
source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt',
|
||||
source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt-table',
|
||||
target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c'
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue