apply patches

This commit is contained in:
openKylinBot 2022-05-14 02:51:19 +08:00
commit f2da2d2764
20 changed files with 7190 additions and 45 deletions

View File

@ -123,5 +123,5 @@ SAMBA_VERSION_RELEASE_NICKNAME=
# -> "3.0.0rc2-VendorVersion" # # -> "3.0.0rc2-VendorVersion" #
# # # #
######################################################## ########################################################
SAMBA_VERSION_VENDOR_SUFFIX= SAMBA_VERSION_VENDOR_SUFFIX=Ubuntu
SAMBA_VERSION_VENDOR_PATCH= SAMBA_VERSION_VENDOR_PATCH=

View File

@ -126,7 +126,7 @@ def install_rpath(target):
ret = set() ret = set()
if bld.env.RPATH_ON_INSTALL: if bld.env.RPATH_ON_INSTALL:
ret.add(bld.EXPAND_VARIABLES(bld.env.LIBDIR)) 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)) ret.add(bld.EXPAND_VARIABLES(bld.env.PRIVATELIBDIR))
return list(ret) return list(ret)

View File

@ -223,6 +223,9 @@ def SAMBA_LIBRARY(bld, libname, source,
raise Errors.WafError("public library '%s' must have header files" % raise Errors.WafError("public library '%s' must have header files" %
libname) libname)
if private_library and not vnum:
vnum = '0'
if bundled_name is not None: if bundled_name is not None:
pass pass
elif target_type == 'PYTHON' or realname or not private_library: elif target_type == 'PYTHON' or realname or not private_library:

View File

@ -5,10 +5,10 @@
[logging] [logging]
# Enable logging to syslog # Enable logging to syslog
# location = syslog location = syslog
# Default log level # Default log level
# log level = NOTICE log level = NOTICE
[cluster] [cluster]
# Shared recovery lock file to avoid split brain. Daemon # Shared recovery lock file to avoid split brain. Daemon

View File

@ -6,7 +6,7 @@
. "${CTDB_BASE}/functions" . "${CTDB_BASE}/functions"
service_name="nfs" service_name="nfs-kernel-server"
load_script_options "service" "60.nfs" load_script_options "service" "60.nfs"

View File

@ -6,9 +6,9 @@
. "${CTDB_BASE}/functions" . "${CTDB_BASE}/functions"
service_name="nfs" service_name="nfs-kernel-server"
load_system_config "nfs" load_system_config "nfs-kernel-server"
load_script_options load_script_options

View File

@ -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 # As above, edit the default value below. CTDB_NFS_DISTRO_STYLE is a
# test variable only. # 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 case "$nfs_distro_style" in
systemd-*) systemd-*)
@ -33,6 +33,14 @@ systemd-*)
;; ;;
*-debian) *-debian)
nfs_rquotad_service="quotarpc" 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" echo "Internal error"

View File

@ -21,7 +21,7 @@ die ()
} }
# Try different variables to find config file for NFS_HOSTNAME # 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" ] || \ [ -n "$NFS_HOSTNAME" ] || \
die "NFS_HOSTNAME is not configured. statd-callout failed" die "NFS_HOSTNAME is not configured. statd-callout failed"

View File

@ -9,5 +9,5 @@
</para> </para>
</description> </description>
<value type="default">0</value> <value type="default">100</value>
</samba:parameter> </samba:parameter>

View File

@ -1270,9 +1270,9 @@ Something we failed to parse\&. Default action is to "edit" it in interactive an
.RE .RE
.SS "USERSHARE" .SS "USERSHARE"
.PP .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 .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 .PP
The usershare commands are: The usershare commands are:
.RS 4 .RS 4

View File

@ -69,6 +69,9 @@ in Samba releases.
The smbldap-tools package can be downloaded individually from The smbldap-tools package can be downloaded individually from
https://gna.org/projects/smbldap-tools/ 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 !== end of README
!== !==

View File

@ -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, "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, "usershare owner only", "yes");
lpcfg_do_global_parameter(lp_ctx, "-valid", "yes"); lpcfg_do_global_parameter(lp_ctx, "-valid", "yes");

View File

@ -446,7 +446,7 @@ def configure(conf):
define = 'HAVE_BSD_STRTOLL', define = 'HAVE_BSD_STRTOLL',
) )
conf.CHECK_FUNCS('if_nametoindex strerror_r') 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('gai_strerror get_current_dir_name')
conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid') conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid')
conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize') conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')

View File

@ -10,6 +10,7 @@ NotifyAccess=all
PIDFile=@PIDDIR@/smbd.pid PIDFile=@PIDDIR@/smbd.pid
LimitNOFILE=16384 LimitNOFILE=16384
EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity LimitCORE=infinity

View File

@ -80,6 +80,16 @@ extern "C" {
#include <fcntl.h> #include <fcntl.h>
#include <utime.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_BASE_FD 10000 /* smallest file descriptor returned */
#define SMBC_WORKGROUP 1 #define SMBC_WORKGROUP 1

View File

@ -88,7 +88,7 @@
/* the default pager to use for the client "more" command. Users can /* the default pager to use for the client "more" command. Users can
override this with the PAGER environment variable */ override this with the PAGER environment variable */
#ifndef PAGER #ifndef PAGER
#define PAGER "more" #define PAGER "/usr/bin/pager"
#endif #endif
/* the size of the uid cache used to reduce valid user checks */ /* the size of the uid cache used to reduce valid user checks */

View File

@ -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); lpcfg_string_set(Globals.ctx, &Globals.usershare_path, s);
TALLOC_FREE(s); TALLOC_FREE(s);
lpcfg_string_set(Globals.ctx, &Globals.usershare_template_share, ""); 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. */ /* By default disallow sharing of directories not owned by the sharer. */
Globals.usershare_owner_only = true; Globals.usershare_owner_only = true;
/* By default disallow guest access to usershares. */ /* By default disallow guest access to usershares. */

View File

@ -382,34 +382,78 @@ int main(int argc, char **argv) {
msg="Checking for LL suffix on long long integers") msg="Checking for LL suffix on long long integers")
conf.CHECK_FUNCS(''' conf.CHECK_FUNCS('''
_acl __acl atexit DNSServiceRegister
_chdir __chdir chflags chmod _close __close _closedir atexit
__closedir crypt16 devnm dirfd chflags
DNSServiceRegister _dup __dup _dup2 __dup2 endmntent execl chmod
_facl __facl _fchdir crypt16
__fchdir fchmod fchown _fcntl __fcntl fcvt fcvtl fdatasync devnm
_fork __fork fseeko dirfd
_fstat __fstat fsync endmntent
futimens futimes __fxstat getauthuid execl
getcwd _getcwd __getcwd getdents __getdents getdirentries fchmod
getgrent getgrnam getgrouplist getgrset getmntent getpagesize fchown
getpwanam getpwent_r getrlimit fcvt
glob grantpt hstrerror initgroups innetgr fcvtl
llseek _llseek __llseek _lseek __lseek fdatasync
_lstat __lstat lutimes fseeko
__lxstat memalign mknod mlock mlockall munlock munlockall fsync
_open __open _opendir __opendir 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 pathconf poll
posix_memalign pread _pread __pread posix_memalign
pwrite _pwrite __pwrite pread
rdchk _read __read _readdir __readdir pwrite
_seekdir __seekdir rdchk
select setenv setgidx setgroups setlocale setluid select
setmntent setpgid setpriv setsid setuidx setenv
_stat __stat statvfs setgidx
strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl sysctlbyname setgroups
__sys_llseek syslog _telldir __telldir timegm setlocale
utimensat vsyslog _write __write __xstat 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 conf.CHECK_SAMBA3_CHARSET() # see build/charset.py

File diff suppressed because it is too large Load Diff

View File

@ -860,7 +860,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
HEIMDAL_GENERATOR( HEIMDAL_GENERATOR(
name="HEIMDAL_ERRORLIST", name="HEIMDAL_ERRORLIST",
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'", 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' 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( HEIMDAL_GENERATOR(
name = 'HEIMDAL_BIDI_TABLE', name = 'HEIMDAL_BIDI_TABLE',
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'", 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' 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( HEIMDAL_GENERATOR(
name = 'HEIMDAL_MAP_TABLE', name = 'HEIMDAL_MAP_TABLE',
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[2].abspath()}' '${SRC[2].parent.abspath(env)}'", 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' target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c'
) )