mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
r5227: removed SuSE spec file @ Lars' request and updated read to point to package download areas
(This used to be commit 51211daa4d8dec96c0ba740f702b486e241e8621)
This commit is contained in:
parent
8a2b44e56f
commit
7ca50f96f2
@ -1,18 +1,17 @@
|
||||
Date: March 29, 2003
|
||||
### SuSE readme begin
|
||||
Dear SuSE user,
|
||||
|
||||
Note: The current packaging files are NOT officially supported files.
|
||||
---------------------------------------------------------------------
|
||||
prebuild Samba RPMs for all SuSE Linux versions are available at:
|
||||
ftp://ftp.SuSE.com/pub/projects/samba/
|
||||
|
||||
While the SPEC file shows who the original author was, these files imply no warranty of
|
||||
fitness what so ever. These files are NOT official SuSE files and are NOT supported by
|
||||
them. If you have ANY problems with the use of these files then please email jht@samba.org
|
||||
and NOT SuSE support.
|
||||
The same package are also available at:
|
||||
http://download.Samba.org/samba/ftp/Binary_Packages/SuSE/
|
||||
|
||||
If you encounter any problem with these packages please don't blame the
|
||||
Samba Team. Instead file a bug at https://bugzilla.Samba.org/ pick
|
||||
product Samba 3.0, then select 'component' Packaging and set 'assign to'
|
||||
to <lmuelle@suse.de.
|
||||
|
||||
These files may be used to build Samba-3.0 packages for SuSE Linux 8.1 and/or for
|
||||
UnitedLinux 1.0 systems.
|
||||
Have a lot of fun...
|
||||
### SuSE readme end
|
||||
|
||||
Note2: You most likely will need to update to heimdal-0.5.1 or later if you intend to
|
||||
use any Kerberos functionality.
|
||||
|
||||
- John T.
|
||||
|
Binary file not shown.
@ -1,247 +0,0 @@
|
||||
--- source/configure.in 22 Feb 2003 12:19:18 -0000 1.409
|
||||
+++ source/configure.in 24 Feb 2003 06:04:25 -0000
|
||||
@@ -627,6 +627,15 @@
|
||||
fi
|
||||
|
||||
############################################
|
||||
+# support for using Kerberos keytab instead of secrets database
|
||||
+
|
||||
+AC_ARG_ENABLE(keytab,
|
||||
+[ --enable-keytab Turn on support for Kerberos keytabs in lieu of secrets DB (default=no)],
|
||||
+ [if eval "test x$enable_keytab = xyes"; then
|
||||
+ AC_DEFINE(USE_KEYTAB,1,[Use Kerberos keytab])
|
||||
+ fi])
|
||||
+
|
||||
+############################################
|
||||
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
|
||||
AC_SEARCH_LIBS(dlopen, [dl])
|
||||
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
|
||||
--- source/passdb/secrets.c 1 Feb 2003 04:39:15 -0000 1.54
|
||||
+++ source/passdb/secrets.c 24 Feb 2003 06:04:26 -0000
|
||||
@@ -221,6 +221,72 @@
|
||||
return True;
|
||||
}
|
||||
|
||||
+#ifdef USE_KEYTAB
|
||||
+/************************************************************************
|
||||
+ Read local secret from the keytab
|
||||
+************************************************************************/
|
||||
+
|
||||
+static BOOL secrets_fetch_keytab_password(uint8 ret_pwd[16], time_t *pass_last_set_time)
|
||||
+{
|
||||
+ char spn[MAXHOSTNAMELEN + 2], *p;
|
||||
+ krb5_context context;
|
||||
+ krb5_error_code ret;
|
||||
+ krb5_principal princ;
|
||||
+ krb5_keyblock *key;
|
||||
+
|
||||
+ ret = krb5_init_context(&context);
|
||||
+ if (ret) {
|
||||
+ DEBUG(1, ("secrets_fetch_keytab_password: failed to initialize Kerberos context\n"));
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+ spn[sizeof(spn) - 1] = '\0';
|
||||
+ if (gethostname(spn, sizeof(spn) - 2) < 0) {
|
||||
+ DEBUG(1, ("secrets_fetch_keytab_password: could not determine local hostname\n"));
|
||||
+ krb5_free_context(context);
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+ for (p = spn; *p && *p != '.'; p++)
|
||||
+ *p = toupper(*p);
|
||||
+ *p++ = '$';
|
||||
+ *p = '\0';
|
||||
+
|
||||
+ ret = krb5_parse_name(context, spn, &princ);
|
||||
+ if (ret) {
|
||||
+ DEBUG(1, ("secrets_fetch_keytab_password: failed to parse name %s\n", spn));
|
||||
+ krb5_free_context(context);
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+#ifdef ENCTYPE_ARCFOUR_HMAC
|
||||
+ ret = krb5_kt_read_service_key(context, NULL, princ, 0, ENCTYPE_ARCFOUR_HMAC, &key);
|
||||
+#elif defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
|
||||
+ ret = krb5_kt_read_service_key(context, NULL, princ, 0, ENCTYPE_ARCFOUR_HMAC_MD5, &key);
|
||||
+#else
|
||||
+#error ENCTYPE_ARCFOUR_HMAC or ENCTYPE_ARCFOUR_HMAC_MD5 required for keytab secret storage
|
||||
+#endif
|
||||
+ if (ret) {
|
||||
+ DEBUG(1, ("secrets_fetch_keytab_password: failed to read secret for %s\n", spn));
|
||||
+ krb5_free_context(context);
|
||||
+ return False;
|
||||
+ }
|
||||
+ if (key->keyvalue.length != 16) {
|
||||
+ DEBUG(1, ("secrets_fetch_keytab_password: key is incorrect length\n"));
|
||||
+ krb5_free_context(context);
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
+ memcpy(ret_pwd, key->keyvalue.data, key->keyvalue.length);
|
||||
+ time(pass_last_set_time); /* XXX */
|
||||
+
|
||||
+ krb5_free_keyblock(context, key);
|
||||
+ krb5_free_context(context);
|
||||
+
|
||||
+ return True;
|
||||
+}
|
||||
+#endif /* USE_KEYTAB */
|
||||
+
|
||||
/************************************************************************
|
||||
Routine to get the trust account password for a domain.
|
||||
The user of this function must have locked the trust password file using
|
||||
@@ -243,6 +309,12 @@
|
||||
pass_last_set_time = 0;
|
||||
return True;
|
||||
}
|
||||
+
|
||||
+#ifdef USE_KEYTAB
|
||||
+ if (is_myworkgroup(domain)) {
|
||||
+ return secrets_fetch_keytab_password(ret_pwd, pass_last_set_time);
|
||||
+ }
|
||||
+#endif /* USE_KEYTAB */
|
||||
|
||||
if (!(pass = secrets_fetch(trust_keystr(domain), &size))) {
|
||||
DEBUG(5, ("secrets_fetch failed!\n"));
|
||||
|
||||
--- source/libsmb/clikrb5.c 2003-07-02 00:32:55.000000000 +0200
|
||||
+++ source/libsmb/clikrb5.c 2003-07-02 00:37:22.000000000 +0200
|
||||
@@ -316,11 +316,13 @@
|
||||
krb5_enctype enc_types[] = {
|
||||
#ifdef ENCTYPE_ARCFOUR_HMAC
|
||||
ENCTYPE_ARCFOUR_HMAC,
|
||||
+#elif defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
|
||||
+ ENCTYPE_ARCFOUR_HMAC_MD5,
|
||||
#endif
|
||||
ENCTYPE_DES_CBC_MD5,
|
||||
ENCTYPE_DES_CBC_CRC,
|
||||
ENCTYPE_NULL};
|
||||
-
|
||||
+
|
||||
retval = krb5_init_context(&context);
|
||||
if (retval) {
|
||||
DEBUG(1,("krb5_init_context failed (%s)\n",
|
||||
@@ -367,24 +369,26 @@
|
||||
|
||||
BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, uint8 session_key[16])
|
||||
{
|
||||
-#ifdef ENCTYPE_ARCFOUR_HMAC
|
||||
krb5_keyblock *skey;
|
||||
-#endif
|
||||
BOOL ret = False;
|
||||
|
||||
memset(session_key, 0, 16);
|
||||
|
||||
-#ifdef ENCTYPE_ARCFOUR_HMAC
|
||||
+#if defined(ENCTYPE_ARCFOUR_HMAC) || defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
|
||||
if (krb5_auth_con_getremotesubkey(context, auth_context, &skey) == 0 && skey != NULL) {
|
||||
if (KRB5_KEY_TYPE(skey) ==
|
||||
+# ifdef ENCTYPE_ARCFOUR_HMAC
|
||||
ENCTYPE_ARCFOUR_HMAC
|
||||
+# else
|
||||
+ ENCTYPE_ARCFOUR_HMAC_MD5
|
||||
+# endif /* ENCTYPE_ARCFOUR_HMAC */
|
||||
&& KRB5_KEY_LENGTH(skey) == 16) {
|
||||
memcpy(session_key, KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey));
|
||||
ret = True;
|
||||
}
|
||||
krb5_free_keyblock(context, skey);
|
||||
}
|
||||
-#endif /* ENCTYPE_ARCFOUR_HMAC */
|
||||
+#endif /* ENCTYPE_ARCFOUR_HMAC || HAVE_ENCTYPE_ARCFOUR_HMAC_MD5 */
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -395,5 +399,12 @@
|
||||
DEBUG(0,("NO KERBEROS SUPPORT\n"));
|
||||
return data_blob(NULL, 0);
|
||||
}
|
||||
+BOOL krb5_get_smb_session_key(krb5_context context, krb5_auth_context ac, uint8 session_key[16])
|
||||
+ {
|
||||
+ DEBUG(0,("NO KERBEROS SUPPORT\n"));
|
||||
+ memset(session_key, 0, 16);
|
||||
+ return False;
|
||||
+ }
|
||||
+ //#endif
|
||||
|
||||
#endif
|
||||
--- source/libads/kerberos_verify.c 2003-06-28 23:40:55.000000000 +0200
|
||||
+++ source/libads/kerberos_verify.c 2003-07-02 00:50:13.000000000 +0200
|
||||
@@ -38,7 +38,9 @@
|
||||
krb5_keytab keytab = NULL;
|
||||
krb5_data packet;
|
||||
krb5_ticket *tkt = NULL;
|
||||
- int ret, i;
|
||||
+ int ret;
|
||||
+#ifndef USE_KEYTAB
|
||||
+ int i;
|
||||
krb5_keyblock * key;
|
||||
krb5_principal host_princ;
|
||||
char *host_princ_s;
|
||||
@@ -46,8 +48,10 @@
|
||||
char *password_s;
|
||||
krb5_data password;
|
||||
krb5_enctype *enctypes = NULL;
|
||||
+#endif /* USE_KEYTAB */
|
||||
BOOL auth_ok = False;
|
||||
|
||||
+#ifndef USE_KEYTAB
|
||||
if (!secrets_init()) {
|
||||
DEBUG(1,("secrets_init failed\n"));
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
@@ -61,6 +65,7 @@
|
||||
|
||||
password.data = password_s;
|
||||
password.length = strlen(password_s);
|
||||
+#endif /* USE_KEYTAB */
|
||||
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret) {
|
||||
@@ -82,7 +87,16 @@
|
||||
DEBUG(1,("krb5_auth_con_init failed (%s)\n", error_message(ret)));
|
||||
return NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
+#ifdef USE_KEYTAB
|
||||
+ packet.length = ticket->length;
|
||||
+ packet.data = (krb5_pointer)ticket->data;
|
||||
|
||||
+ if (!(ret = krb5_rd_req(context, &auth_context, &packet,
|
||||
+ NULL, keytab, NULL, &tkt))) {
|
||||
+ auth_ok = True;
|
||||
+ }
|
||||
+
|
||||
+#else
|
||||
fstrcpy(myname, global_myname());
|
||||
strlower(myname);
|
||||
asprintf(&host_princ_s, "HOST/%s@%s", myname, lp_realm());
|
||||
@@ -121,6 +135,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ SAFE_FREE(key);
|
||||
+#endif /* USE_KEYTAB */
|
||||
+
|
||||
if (!auth_ok) {
|
||||
DEBUG(3,("krb5_rd_req with auth failed (%s)\n",
|
||||
error_message(ret)));
|
||||
--- source/Makefile.in 2003-07-01 23:35:49.000000000 +0200
|
||||
+++ source/Makefile.in 2003-07-02 01:20:09.000000000 +0200
|
||||
@@ -806,7 +806,7 @@
|
||||
|
||||
bin/pdbedit@EXEEXT@: $(PDBEDIT_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
@echo Linking $@
|
||||
- @$(CC) $(FLAGS) -o $@ $(IDMAP_LIBS) $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDBLIBS)
|
||||
+ @$(CC) $(FLAGS) -o $@ $(IDMAP_LIBS) $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDBLIBS) $(KRB5LIBS)
|
||||
|
||||
bin/samtest@EXEEXT@: $(SAMTEST_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
@echo Linking $@
|
||||
@@ -1062,7 +1062,7 @@
|
||||
|
||||
bin/wbinfo@EXEEXT@: $(WBINFO_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
@echo Linking $@
|
||||
- @$(LINK) -o $@ $(WBINFO_OBJ) $(LIBS) @POPTLIBS@
|
||||
+ @$(LINK) -o $@ $(WBINFO_OBJ) $(LIBS) @POPTLIBS@ $(KRB5LIBS)
|
||||
|
||||
bin/ntlm_auth@EXEEXT@: $(NTLM_AUTH_OBJ) $(PARAM_OBJ) $(LIB_OBJ) \
|
||||
$(UBIQX_OBJ) @BUILD_POPT@ bin/.dummy
|
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
--- examples/pdb/Makefile Thu Sep 5 02:11:41 2002
|
||||
+++ examples/pdb/Makefile Thu Sep 5 02:11:59 2002
|
||||
@@ -8,7 +8,7 @@
|
||||
SAMBA_INCL = ../../source/include
|
||||
UBIQX_SRC = ../../source/ubiqx
|
||||
SMBWR_SRC = ../../source/smbwrapper
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g -I/usr/include/heimdal
|
||||
PDB_OBJS = pdb_test.so
|
||||
|
||||
# Default target
|
||||
--- examples/VFS/Makefile.in 2003-06-04 15:13:41.000000000 +0200
|
||||
+++ examples/VFS/Makefile.in 2003-06-04 22:07:03.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
SAMBA_SOURCE = @SAMBA_SOURCE@
|
||||
SHLIBEXT = @SHLIBEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
-FLAGS = $(CFLAGS) -Iinclude -I$(SAMBA_SOURCE)/include -I$(SAMBA_SOURCE)/ubiqx -I$(SAMBA_SOURCE)/smbwrapper -I. $(CPPFLAGS) -I$(SAMBA_SOURCE)
|
||||
+FLAGS = $(CFLAGS) -Iinclude -I$(SAMBA_SOURCE)/include -I$(SAMBA_SOURCE)/ubiqx -I$(SAMBA_SOURCE)/smbwrapper -I. $(CPPFLAGS) -I$(SAMBA_SOURCE) -I/usr/include/heimdal
|
||||
|
||||
|
||||
prefix = @prefix@
|
@ -1,14 +0,0 @@
|
||||
--- source/include/ads.h 2003-06-10 08:51:03.000000000 +0200
|
||||
+++ source/include/ads.h 2003-06-22 23:14:24.000000000 +0200
|
||||
@@ -215,9 +215,11 @@
|
||||
#define ENCTYPE_ARCFOUR_HMAC ENCTYPE_ARCFOUR_HMAC_MD5
|
||||
#endif
|
||||
|
||||
+#if 0
|
||||
/* The older versions of heimdal that don't have this
|
||||
define don't seem to use it anyway. I'm told they
|
||||
always use a subkey */
|
||||
#ifndef AP_OPTS_USE_SUBKEY
|
||||
#define AP_OPTS_USE_SUBKEY 0
|
||||
#endif
|
||||
+#endif
|
@ -1,13 +0,0 @@
|
||||
--- examples/pdb/pdb_test.c 26 Sep 2002 18:37:54 -0000 1.1.2.3
|
||||
+++ examples/pdb/pdb_test.c 22 Apr 2003 20:06:31 -0000
|
||||
@@ -142,8 +142,6 @@
|
||||
int init_module(void);
|
||||
|
||||
int init_module() {
|
||||
- if(smb_register_passdb("testsam", testsam_init, PASSDB_INTERFACE_VERSION))
|
||||
- return 0;
|
||||
-
|
||||
- return 1;
|
||||
+ smb_register_passdb(PASSDB_INTERFACE_VERSION, "testsam", testsam_init);
|
||||
+ return True;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
--- source/Makefile.in 2003-04-23 10:43:06.000000000 +0200
|
||||
+++ source/Makefile.in 2003-04-23 10:45:39.000000000 +0200
|
||||
@@ -673,6 +673,13 @@
|
||||
@echo "Using FLAGS = $(FLAGS)"
|
||||
@echo " FLAGS32 = $(FLAGS32)"
|
||||
@echo " LIBS = $(LIBS)"
|
||||
+ @echo " TERMLIBS = $(TERMLIBS)"
|
||||
+ @echo " PRINTLIBS = $(PRINTLIBS)"
|
||||
+ @echo " AUTHLIBS = $(AUTHLIBS)"
|
||||
+ @echo " ACLLIBS = $(ACLLIBS)"
|
||||
+ @echo " PASSDBLIBS = $(PASSDBLIBS)"
|
||||
+ @echo " ADSLIBS = $(ADSLIBS)"
|
||||
+ @echo " KRB5LIBS = $(KRB5_LIBS)"
|
||||
@echo " LDSHFLAGS = $(LDSHFLAGS)"
|
||||
@echo " LDFLAGS = $(LDFLAGS)"
|
||||
|
@ -1,60 +0,0 @@
|
||||
--- source/libads/kerberos.c 23 Oct 2002 00:02:26 -0000 1.18
|
||||
+++ source/libads/kerberos.c 1 Jul 2003 21:30:17 -0000
|
||||
@@ -126,6 +126,7 @@
|
||||
return KRB5_LIBOS_CANTREADPWD;
|
||||
}
|
||||
|
||||
+ initialize_krb5_error_table();
|
||||
ret = kerberos_kinit_password(s, ads->auth.password, ads->auth.time_offset);
|
||||
|
||||
if (ret) {
|
||||
--- source/libads/kerberos_verify.c 6 Jun 2003 14:53:22 -0000 1.10.2.1
|
||||
+++ source/libads/kerberos_verify.c 1 Jul 2003 21:30:17 -0000
|
||||
@@ -62,6 +62,7 @@
|
||||
password.data = password_s;
|
||||
password.length = strlen(password_s);
|
||||
|
||||
+ initialize_krb5_error_table();
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret) {
|
||||
DEBUG(1,("krb5_init_context failed (%s)\n", error_message(ret)));
|
||||
--- source/libads/krb5_setpw.c 6 Jun 2003 14:53:22 -0000 1.16.2.1
|
||||
+++ source/libads/krb5_setpw.c 1 Jul 2003 21:30:17 -0000
|
||||
@@ -470,6 +470,7 @@
|
||||
krb5_creds creds, *credsp;
|
||||
krb5_ccache ccache;
|
||||
|
||||
+ initialize_krb5_error_table();
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret) {
|
||||
DEBUG(1,("Failed to init krb5 context (%s)\n", error_message(ret)));
|
||||
@@ -584,6 +585,7 @@
|
||||
krb5_creds creds;
|
||||
char *chpw_princ = NULL, *password;
|
||||
|
||||
+ initialize_krb5_error_table();
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret) {
|
||||
DEBUG(1,("Failed to init krb5 context (%s)\n", error_message(ret)));
|
||||
--- source/libsmb/clikrb5.c 1 Jul 2003 14:40:37 -0000 1.36.2.2
|
||||
+++ source/libsmb/clikrb5.c 1 Jul 2003 21:30:20 -0000
|
||||
@@ -320,7 +320,8 @@
|
||||
ENCTYPE_DES_CBC_MD5,
|
||||
ENCTYPE_DES_CBC_CRC,
|
||||
ENCTYPE_NULL};
|
||||
-
|
||||
+
|
||||
+ initialize_krb5_error_table();
|
||||
retval = krb5_init_context(&context);
|
||||
if (retval) {
|
||||
DEBUG(1,("krb5_init_context failed (%s)\n",
|
||||
--- source/utils/net_lookup.c 1 Jul 2003 14:40:47 -0000 1.8.2.1
|
||||
+++ source/utils/net_lookup.c 1 Jul 2003 21:30:24 -0000
|
||||
@@ -177,6 +177,7 @@
|
||||
krb5_data realm;
|
||||
char **realms;
|
||||
|
||||
+ initialize_krb5_error_table();
|
||||
rc = krb5_init_context(&ctx);
|
||||
if (rc) {
|
||||
DEBUG(1,("krb5_init_context failed (%s)\n",
|
@ -1,58 +0,0 @@
|
||||
Index: source/utils/net_ads.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/samba/source/utils/net_ads.c,v
|
||||
retrieving revision 1.37.2.22
|
||||
diff -u -r1.37.2.22 net_ads.c
|
||||
--- source/utils/net_ads.c 10 Jun 2003 04:15:55 -0000 1.37.2.22
|
||||
+++ source/utils/net_ads.c 20 Jun 2003 19:59:36 -0000
|
||||
@@ -44,9 +44,9 @@
|
||||
"\n\tdump the machine account details to stdout\n"
|
||||
"\nnet ads lookup"\
|
||||
"\n\tperform a CLDAP search on the server\n"
|
||||
-"\nnet ads password <username@realm> -Uadmin_username@realm%%admin_pass"\
|
||||
+"\nnet ads password <username@realm> <password> -Uadmin_username@realm%%admin_pass"\
|
||||
"\n\tchange a user's password using an admin account"\
|
||||
-"\n\t(note: use realm in UPPERCASE)\n"\
|
||||
+"\n\t(note: use realm in UPPERCASE, prompts if password is obmitted)\n"\
|
||||
"\nnet ads changetrustpw"\
|
||||
"\n\tchange the trust account password of this machine in the AD tree\n"\
|
||||
"\nnet ads printer [info | publish | remove] <printername> <servername>"\
|
||||
@@ -909,7 +909,7 @@
|
||||
}
|
||||
|
||||
|
||||
- if (argc != 1) {
|
||||
+ if (argc < 1) {
|
||||
d_printf("ERROR: You must say which username to change password for\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -941,22 +941,24 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
- asprintf(&prompt, "Enter new password for %s:", user);
|
||||
-
|
||||
- new_password = getpass(prompt);
|
||||
+ if (argv[1]) {
|
||||
+ new_password = (char *)argv[1];
|
||||
+ } else {
|
||||
+ asprintf(&prompt, "Enter new password for %s:", user);
|
||||
+ new_password = getpass(prompt);
|
||||
+ free(prompt);
|
||||
+ }
|
||||
|
||||
ret = kerberos_set_password(ads->auth.kdc_server, auth_principal,
|
||||
auth_password, user, new_password, ads->auth.time_offset);
|
||||
if (!ADS_ERR_OK(ret)) {
|
||||
d_printf("Password change failed :-( ...\n");
|
||||
ads_destroy(&ads);
|
||||
- free(prompt);
|
||||
return -1;
|
||||
}
|
||||
|
||||
d_printf("Password change for %s completed.\n", user);
|
||||
ads_destroy(&ads);
|
||||
- free(prompt);
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
--- source/smbwrapper/smbsh.c.orig 2003-05-04 19:47:39.000000000 +0200
|
||||
+++ source/smbwrapper/smbsh.c 2003-05-04 19:47:47.000000000 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *p, *u;
|
||||
- const char *libd = dyn_BINDIR;
|
||||
+ const char *libd = dyn_LIBDIR;
|
||||
pstring line, wd;
|
||||
int opt;
|
||||
extern char *optarg;
|
@ -1,269 +0,0 @@
|
||||
--- examples/VFS/samba-vscan-0.3.2b/fprot/Makefile 2003-01-14 00:42:15.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/fprot/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
VFS_OBJS = vscan-fprotd.so
|
||||
SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-fprotd.c vscan-fprotd_core.c vscan-fprotd.h vscan-fprotd_core.h
|
||||
OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-fprotd.lo vscan-fprotd_core.lo
|
||||
--- examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd.c 2003-02-21 21:37:44.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd.c 2003-04-09 20:25:25.000000000 +0200
|
||||
@@ -432,14 +432,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* virus found, deny access */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
||||
--- examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd_core.c 2003-01-25 18:40:57.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/fprot/vscan-fprotd_core.c 2003-04-09 20:23:31.000000000 +0200
|
||||
@@ -110,7 +110,7 @@
|
||||
pstring fprotdCommand; /* the command line to be send to daemon */
|
||||
char *str;
|
||||
FILE *fpin, *fpout;
|
||||
- bool received_data = FALSE; /* indicates, if any response from deamon was received */
|
||||
+ bool received_data = False; /* indicates, if any response from deamon was received */
|
||||
|
||||
/* open stream sockets */
|
||||
fpin = fdopen(sockfd, "r");
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
while ( (fgets(recvline, MAXLINE, fpin)) != NULL ) {
|
||||
|
||||
- received_data = TRUE;
|
||||
+ received_data = True;
|
||||
|
||||
/* ignore the HTTP response header, remove any leading
|
||||
white spaces */
|
||||
--- examples/VFS/samba-vscan-0.3.2b/icap/Makefile 2003-01-30 00:53:02.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/icap/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
VFS_OBJS = vscan-icap.so
|
||||
SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-icap.c vscan-icap_core.c vscan-icap.h vscan-icap_core.h
|
||||
OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-icap.lo vscan-icap_core.lo
|
||||
--- examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap.c 2003-02-21 21:37:50.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap.c 2003-04-09 20:32:20.000000000 +0200
|
||||
@@ -413,14 +413,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* virus found, deny access */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
||||
--- examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap_core.c 2003-01-15 00:19:18.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/icap/vscan-icap_core.c 2003-04-09 20:30:56.000000000 +0200
|
||||
@@ -114,8 +114,8 @@
|
||||
char buf[BUFLEN];
|
||||
char recvline[MAXLINE + 1];
|
||||
char *str;
|
||||
- bool first_line = FALSE; /* first line we've received? */
|
||||
- bool infected = FALSE; /* an infected found? */
|
||||
+ bool first_line = False; /* first line we've received? */
|
||||
+ bool infected = False; /* an infected found? */
|
||||
|
||||
|
||||
/* get file length */
|
||||
@@ -213,7 +213,7 @@
|
||||
/* set line buffering */
|
||||
setvbuf(fpin, (char *)NULL, _IOLBF, 0);
|
||||
|
||||
- first_line = TRUE;
|
||||
+ first_line = True;
|
||||
while ( (fgets(recvline, MAXLINE, fpin)) != NULL ) {
|
||||
str = recvline;
|
||||
if ( first_line ) {
|
||||
@@ -226,7 +226,7 @@
|
||||
return(0);
|
||||
}
|
||||
else if ( strncmp("403", str, 3) == 0 ) {
|
||||
- infected = TRUE;
|
||||
+ infected = True;
|
||||
} else {
|
||||
if ( verbose_file_logging )
|
||||
vscan_syslog("ERROR: file %s not found, not readable or an error occured", scan_file);
|
||||
@@ -241,7 +241,7 @@
|
||||
return(-1);
|
||||
}
|
||||
|
||||
- first_line = FALSE;
|
||||
+ first_line = False;
|
||||
}
|
||||
if ( infected ) {
|
||||
if ( strncmp("X-Infection-Found", str, 17) == 0 ) {
|
||||
--- examples/VFS/samba-vscan-0.3.2b/include/vscan-global.h 2002-11-25 16:48:10.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/include/vscan-global.h 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#ifndef SAMBA_VERSION_MAJOR
|
||||
-# define SAMBA_VERSION_MAJOR 2
|
||||
+# define SAMBA_VERSION_MAJOR 3
|
||||
#endif
|
||||
|
||||
#ifndef SAMBA_VERSION_MINOR
|
||||
--- examples/VFS/samba-vscan-0.3.2b/kaspersky/Makefile 2003-02-20 15:41:32.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/kaspersky/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -23,9 +23,9 @@
|
||||
VFS_OBJS = vscan-kavp.so
|
||||
|
||||
ifdef USE_DEBUG
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
else
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
endif
|
||||
|
||||
ifndef USE_KAVPSHAREDLIB
|
||||
--- examples/VFS/samba-vscan-0.3.2b/mks/Makefile 2003-01-19 18:09:53.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/mks/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -16,10 +16,10 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
|
||||
ifdef USE_INCLMKSDLIB
|
||||
-CFLAGS=-I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_USE_INCL_MKSD_LIB=1 -fPIC
|
||||
+CFLAGS=-I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_USE_INCL_MKSD_LIB=1 -fPIC -I/usr/include/heimdal
|
||||
endif
|
||||
|
||||
VFS_OBJS = vscan-mksd.so
|
||||
--- examples/VFS/samba-vscan-0.3.2b/mks/vscan-mksd.c 2003-02-21 21:37:50.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/mks/vscan-mksd.c 2003-04-09 20:38:16.000000000 +0200
|
||||
@@ -393,14 +393,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* virus found, deny acces */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
||||
--- examples/VFS/samba-vscan-0.3.2b/openantivirus/Makefile 2003-01-30 00:53:08.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/openantivirus/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
VFS_OBJS = vscan-oav.so
|
||||
SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-oav.c vscan-oav_core.c vscan-oav.h vscan-oav_core.h
|
||||
OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-oav.lo vscan-oav_core.lo
|
||||
--- examples/VFS/samba-vscan-0.3.2b/openantivirus/vscan-oav.c 2003-02-21 21:37:51.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/openantivirus/vscan-oav.c 2003-04-09 20:40:53.000000000 +0200
|
||||
@@ -417,14 +417,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* virus found, deny access */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
||||
--- examples/VFS/samba-vscan-0.3.2b/sophos/Makefile 2003-01-30 00:53:08.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/sophos/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
VFS_OBJS = vscan-sophos.so
|
||||
SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-sophos.c vscan-sophos_core.c vscan-sophos.h vscan-sophos_core.h
|
||||
OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-sophos.lo vscan-sophos_core.lo
|
||||
--- examples/VFS/samba-vscan-0.3.2b/sophos/vscan-sophos.c 2003-02-21 21:37:51.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/sophos/vscan-sophos.c 2003-04-09 20:43:11.000000000 +0200
|
||||
@@ -399,14 +399,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* deny access */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
||||
--- examples/VFS/samba-vscan-0.3.2b/trend/Makefile 2003-01-30 01:03:38.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/trend/Makefile 2003-04-09 20:21:37.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
SMBWR_SRC = ../../../../source/smbwrapper
|
||||
SMBVS_INCL = ../include
|
||||
SMBVS_GLB = ../global
|
||||
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
|
||||
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(SMBVS_INCL) -Wall -g -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include/heimdal
|
||||
VFS_OBJS = vscan-trend.so
|
||||
SOURCES = $(SMBVS_GLB)/vscan-functions.c $(SMBVS_GLB)/vscan-message.c $(SMBVS_GLB)/vscan-quarantine.c $(SMBVS_GLB)/vscan-fileaccesslog.c vscan-trend.c vscan-trend_core.c vscan-trend.h vscan-trend_core.h
|
||||
OBJS = vscan-functions.lo vscan-message.lo vscan-quarantine.lo vscan-fileaccesslog.lo vscan-trend.lo vscan-trend_core.lo
|
||||
--- examples/VFS/samba-vscan-0.3.2b/trend/vscan-trend.c 2003-02-21 21:37:52.000000000 +0100
|
||||
+++ examples/VFS/samba-vscan-0.3.2b/trend/vscan-trend.c 2003-04-09 20:46:07.000000000 +0200
|
||||
@@ -409,14 +409,14 @@
|
||||
rc = vscan_do_infected_file_action(&default_vfs_ops, conn, filepath, quarantine_dir, quarantine_prefix, infected_file_action);
|
||||
|
||||
/* add/update file. mark file as infected! */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, TRUE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, True);
|
||||
|
||||
/* deny access */
|
||||
errno = EACCES;
|
||||
return -1;
|
||||
} else if ( retval == 0 ) {
|
||||
/* file is clean, add to lrufiles */
|
||||
- lrufiles_add(filepath, stat_buf.st_mtime, FALSE);
|
||||
+ lrufiles_add(filepath, stat_buf.st_mtime, False);
|
||||
}
|
||||
}
|
||||
|
@ -1,766 +0,0 @@
|
||||
#
|
||||
# spec file for package samba3 (Version 3.0.0rc1cvs)
|
||||
#
|
||||
# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://www.suse.de/feedback/
|
||||
#
|
||||
# Note: The Samba3 tarball should be called: samba3-3.0.0.tar.bz2
|
||||
#
|
||||
|
||||
# neededforbuild XFree86-libs autoconf automake cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl libacl-devel libattr libattr-devel libgimpprint libpng libtiff libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel popt popt-devel python python-devel readline readline-devel te_etex te_latex te_pdf tetex xmlcharent
|
||||
# usedforbuild aaa_base acl attr bash bind9-utils bison coreutils cpio cpp cvs cyrus-sasl2 db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel XFree86-libs autoconf automake binutils bzip2 cracklib cups-devel cups-libs dialog docbook-utils docbook-xsl-stylesheets docbook_4 ed freetype2 gcc gdbm gettext ghostscript-fonts-std ghostscript-library ghostscript-x11 glib heimdal heimdal-devel heimdal-lib iso_ent libacl-devel libattr-devel libgimpprint libpng libtiff libtool libxml2 libxml2-devel libxslt mysql-devel mysql-shared openldap2 openldap2-client openldap2-devel openssl openssl-devel perl popt popt-devel python python-devel readline-devel rpm te_ams te_etex te_latex te_pdf tetex xmlcharent
|
||||
|
||||
Name: samba3
|
||||
Vendor: Samba Team
|
||||
License: GPL
|
||||
Group: Productivity/Networking/Samba
|
||||
Url: http://www.samba.org
|
||||
Provides: samba smbfs samba3
|
||||
Requires: samba3-client
|
||||
Obsoletes: samba-classic samba-ldap
|
||||
Autoreqprov: on
|
||||
%define krb_heimdal_05 0
|
||||
%define new_heimdal /opt/heimdal
|
||||
%define new_sasl /opt/sasl
|
||||
%define new_openldap /opt/openldap
|
||||
%define new_glibc 0
|
||||
Version: 3.0.0
|
||||
Release: %(date +%%j)
|
||||
%define head 0
|
||||
%define samba_ver 3.0.0
|
||||
%define samba_release 0
|
||||
%define ul_version 0
|
||||
%define suse_ver 820
|
||||
%define python_ver python2.2
|
||||
%if %{suse_ver} > 810
|
||||
%define new_glibc 1
|
||||
%endif
|
||||
%if %{suse_ver} > 821
|
||||
%define python_ver python2.3
|
||||
%endif
|
||||
%define make_cifsvfs 1
|
||||
%define make_devel 0
|
||||
%define make_doc 0
|
||||
%define make_python 1
|
||||
%define make_shared_mod 0
|
||||
%define make_smbwrap 1
|
||||
# vscan has not yet updated to the new vfs-api
|
||||
%define make_vscan 0
|
||||
%define make_wrepld 1
|
||||
%define use_keytab 0
|
||||
Summary: samba3
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source10: %{name}-%{version}.files.tar.bz2
|
||||
Source50: samba-vscan-%{vscan_ver}.tar.bz2
|
||||
Patch1: %{name}-%{version}-Makefiles-heimdal.diff
|
||||
Patch2: samba-mutual-auth.diff
|
||||
Patch29: %{name}-com_err.diff
|
||||
Patch30: %{name}-%{version}-heimdal-06.diff
|
||||
Patch31: %{name}-%{version}-pdb.diff
|
||||
Patch32: %{name}-net_ads_password.diff
|
||||
Patch33: %{name}-Makefile.diff
|
||||
Patch34: %{name}-smbwrapper.diff
|
||||
Patch51: %{name}-vscan.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define DOCDIR %{_defaultdocdir}/%{name}
|
||||
%define DOCBOOKDIR %{_defaultdocdir}/%{name}/docbook
|
||||
%define SWATDIR %{_datadir}/samba/swat
|
||||
%define vscan_ver 0.3.2b
|
||||
%define vscan_modules fprot icap mks openantivirus sophos trend
|
||||
#not pdb_nisplussam
|
||||
%define pdb_modules pdb_xml,pdb_mysql,pdb_ldap,pdb_smbpasswd,pdb_tdbsam,pdb_unix,pdb_guest,pdb_nisplussam
|
||||
%define rpc_modules rpc_lsa,rpc_samr,rpc_reg,rpc_wks,rpc_net,rpc_dfs,rpc_srv,rpc_spoolss
|
||||
%define auth_modules auth_rhosts,auth_sam,auth_unix,auth_winbind,auth_server,auth_domain,auth_builtin
|
||||
%define vfs_modules vfs_recycle,vfs_audit,vfs_extd_audit,vfs_netatalk,vfs_fake_perms
|
||||
%define idmap_modules idmap_winbind,idmap_ldap,idmap_tdb
|
||||
%define charset_modules charset_weird
|
||||
%package client
|
||||
Summary: samba3-client
|
||||
Autoreqprov: on
|
||||
Requires: cups-libs
|
||||
Obsoletes: smbclnt samba-classic-client samba-ldap-client
|
||||
Provides: samba-client samba3-client
|
||||
Group: Productivity/Networking/Samba
|
||||
%package winbind
|
||||
Requires: samba-client samba
|
||||
Summary: samba3-winbind
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%package utils
|
||||
Summary: samba3-utils
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%package doc
|
||||
Summary: samba3-doc
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%package docbook
|
||||
Summary: samba3-docbook
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%package pdb
|
||||
Summary: samba3-pdb
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%if %{make_cifsvfs}
|
||||
%package cifsmount
|
||||
Summary: samba3-cifsmount
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
Url: http://us1.samba.org/samba/Linux_CIFS_client.html
|
||||
%endif
|
||||
%if %{make_vscan}
|
||||
%package vscan
|
||||
Summary: samba3-vscan
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
Version: 0.3.2a
|
||||
Release: 0
|
||||
Url: http://www.openantivirus.org/
|
||||
%endif
|
||||
%if %{make_wrepld}
|
||||
%package wrepld
|
||||
Summary: samba3-wrepld
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%endif
|
||||
%if %{make_python}
|
||||
%package python
|
||||
Summary: samba3-python
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Networking/Samba
|
||||
%endif
|
||||
%package -n libsmbclient
|
||||
Summary: Samba client library
|
||||
Autoreqprov: on
|
||||
Group: System/Libraries
|
||||
%package -n libsmbclient-devel
|
||||
Summary: Libraries and header files to develop programs with smbclient support
|
||||
Autoreqprov: on
|
||||
Group: Development/Libraries/C and C++
|
||||
%prep
|
||||
[ $RPM_BUILD_ROOT = "/" ] && (echo "your buildroot is /" && exit 0) || rm -rf $RPM_BUILD_ROOT
|
||||
mkdir $RPM_BUILD_ROOT
|
||||
%setup -n %{name}-%{samba_ver}
|
||||
%setup -T -D -a 50
|
||||
cp -ar samba-vscan-%{vscan_ver} examples/VFS/
|
||||
# untar my configs
|
||||
%setup -T -D -a 10
|
||||
###########
|
||||
### PATCHES
|
||||
###########
|
||||
# Makefiles-heimdal.diff
|
||||
%patch1
|
||||
%if %{use_keytab}
|
||||
# luke howards keytab-patch
|
||||
%patch2
|
||||
%endif
|
||||
# some com_err fixes
|
||||
%patch29
|
||||
%if %{suse_ver} > 821
|
||||
%patch30
|
||||
%endif
|
||||
# vscan patch
|
||||
%patch51
|
||||
# net ads password
|
||||
%patch32
|
||||
# temp Makefile (show more libs)
|
||||
%patch33
|
||||
# temp pdb-test.c
|
||||
%patch31
|
||||
# smbwrapper should use LIBDIR not BINDIR
|
||||
%patch34
|
||||
#find . -name CVS -print | xargs rm -rf
|
||||
#find . -name ".cvsignore" -print | xargs rm -rf
|
||||
find . -name "*.gd" -print | xargs rm -rvf
|
||||
find . -name "*.orig" -print | xargs rm -rvf
|
||||
%if %{ul_version} >= 1
|
||||
echo '#define VERSION "%samba_ver-UL"' > source/include/version.h
|
||||
%else
|
||||
echo '#define VERSION "%samba_ver-SuSE"' > source/include/version.h
|
||||
%endif
|
||||
|
||||
%build %{name}-%{samba_ver}
|
||||
%{?suse_update_config:%{suse_update_config -f}}
|
||||
cd source
|
||||
./autogen.sh
|
||||
export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
# debugging symbols
|
||||
%if %{make_devel}
|
||||
export CFLAGS="$RPM_OPT_FLAGS -g -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
%endif
|
||||
%if %{krb_heimdal_05}
|
||||
export CFLAGS="$CFLAGS -I./include -I%{new_heimdal}/include "
|
||||
export CFLAGS="$CFLAGS -I%{new_openldap}/include "
|
||||
export CFLAGS="$CFLAGS -I%{new_sasl}/include "
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_heimdal}/lib"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_openldap}/lib"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath %{new_sasl}/lib"
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
export CFLAGS="$CFLAGS -mminimal-toc"
|
||||
%endif
|
||||
CONF_OPTS="\
|
||||
--enable-cups \
|
||||
--libdir=/usr/lib/samba \
|
||||
--localstatedir=/var/lib/samba \
|
||||
--mandir=%{_mandir} \
|
||||
--prefix=/usr \
|
||||
--sbindir=/usr/sbin \
|
||||
--sysconfdir=/etc/samba \
|
||||
--with-acl-support \
|
||||
--with-automount \
|
||||
--with-configdir=/etc/samba \
|
||||
--with-lockdir=/var/lib/samba \
|
||||
--with-logfilebase=/var/log/samba \
|
||||
--with-msdfs \
|
||||
--with-pam \
|
||||
--with-pam_smbpass \
|
||||
--with-piddir=/var/run/samba \
|
||||
--with-privatedir=/etc/samba \
|
||||
--with-quotas \
|
||||
--with-smbmount \
|
||||
--with-swatdir=/usr/share/samba/swat \
|
||||
--with-syslog \
|
||||
--with-utmp \
|
||||
--with-vfs \
|
||||
--with-winbind \
|
||||
--with-tdbsam \
|
||||
--with-expsam=xml,mysql \
|
||||
--with-profiling-data \
|
||||
%if %{use_keytab}
|
||||
--enable-keytab \
|
||||
%endif
|
||||
%if %{make_smbwrap}
|
||||
--with-smbwrapper \
|
||||
%endif
|
||||
%if %{make_python}
|
||||
--with-python=%{python_ver} \
|
||||
%endif
|
||||
%if %{make_shared_mod}
|
||||
--with-shared-modules=%{pdb_modules},%{rpc_modules} \
|
||||
%endif
|
||||
%if %{make_devel}
|
||||
--enable-developer \
|
||||
--enable-krb5developer \
|
||||
%endif
|
||||
"
|
||||
# --with-nisplus-home \
|
||||
# make sure we have a chance to find the krb5-config-tool
|
||||
export PATH="$PATH:/usr/lib/heimdal/bin"
|
||||
./configure $CONF_OPTS
|
||||
make \
|
||||
all \
|
||||
torture \
|
||||
nsswitch/libnss_wins.so \
|
||||
debug2html \
|
||||
libsmbclient \
|
||||
everything \
|
||||
bin/editreg
|
||||
# everything = nsswitch smbwrapper smbtorture debug2html smbfilter nsswitch/libnss_wins.so
|
||||
make modules
|
||||
make -C tdb tdbdump tdbtest tdbtool tdbtorture
|
||||
make talloctort
|
||||
%if %{make_wrepld}
|
||||
make bin/wrepld
|
||||
%endif
|
||||
%if %{make_doc}
|
||||
pushd `pwd`
|
||||
cd ../docs/docbook
|
||||
autoconf -f
|
||||
./configure
|
||||
# gracefully ignore errors...
|
||||
make -i manpages html html-single pdf htmlfaq htmlman
|
||||
# ps is not necessary, txt neither
|
||||
# everything = manpages ps pdf html-single html htmlman txt htmlfaq
|
||||
popd
|
||||
%endif
|
||||
# make examples in VFS,PDB
|
||||
pushd `pwd`
|
||||
cd ../examples/VFS/
|
||||
sh -x autogen.sh
|
||||
./configure
|
||||
popd
|
||||
EXAMPLEDIRS="pdb VFS"
|
||||
for i in $EXAMPLEDIRS; do make -C ../examples/$i; done
|
||||
%if %{make_vscan}
|
||||
export USE_KAVPSHAREDLIB=0
|
||||
export USE_INCLMKSDLIB=1
|
||||
for module in %{vscan_modules}; do
|
||||
make -C ../examples/VFS/samba-vscan-%{vscan_ver}/${module};
|
||||
done
|
||||
%endif
|
||||
%if %{make_python}
|
||||
make python_ext
|
||||
%endif
|
||||
%if %{make_cifsvfs}
|
||||
cd client
|
||||
export CFLAGS="$RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
gcc mount.cifs.c -o mount.cifs
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%install
|
||||
mkdir -p \
|
||||
$RPM_BUILD_ROOT/%{DOCDIR} \
|
||||
$RPM_BUILD_ROOT/%{DOCDIR}-vscan \
|
||||
$RPM_BUILD_ROOT/%{DOCDIR}/docbook \
|
||||
$RPM_BUILD_ROOT/etc/{pam.d,init.d,samba} \
|
||||
$RPM_BUILD_ROOT/lib/security \
|
||||
$RPM_BUILD_ROOT/sbin \
|
||||
$RPM_BUILD_ROOT/usr/include \
|
||||
$RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload \
|
||||
$RPM_BUILD_ROOT/usr/lib/samba/{vfs,pdb,vscan,rpc,auth,charset,idmap} \
|
||||
$RPM_BUILD_ROOT/usr/share/{man,samba/swat} \
|
||||
$RPM_BUILD_ROOT/usr/{bin,sbin} \
|
||||
$RPM_BUILD_ROOT/var/adm \
|
||||
$RPM_BUILD_ROOT/var/lib/samba/{netlogon,drivers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC},profiles} \
|
||||
$RPM_BUILD_ROOT/var/log/samba \
|
||||
$RPM_BUILD_ROOT/var/run/samba \
|
||||
$RPM_BUILD_ROOT/var/spool/samba
|
||||
cd source/
|
||||
make install \
|
||||
LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba \
|
||||
LOGFILEBASE=$RPM_BUILD_ROOT/var/log/samba \
|
||||
CONFIGFILE=$RPM_BUILD_ROOT/etc/samba/smb.conf \
|
||||
LMHOSTSFILE=$RPM_BUILD_ROOT/etc/samba/lmhosts \
|
||||
SWATDIR=$RPM_BUILD_ROOT/usr/share/samba/swat \
|
||||
SBINDIR=$RPM_BUILD_ROOT/usr/sbin \
|
||||
LOCKDIR=$RPM_BUILD_ROOT/var/lib/samba \
|
||||
DRIVERFILE=$RPM_BUILD_ROOT/etc/samba/printers.def \
|
||||
BINDIR=$RPM_BUILD_ROOT/usr/bin \
|
||||
SMB_PASSWD_FILE=$RPM_BUILD_ROOT/etc/samba/smbpasswd \
|
||||
MANDIR=$RPM_BUILD_ROOT/usr/share/man
|
||||
make installmodules \
|
||||
LIBDIR=$RPM_BUILD_ROOT/usr/lib/samba
|
||||
cd ..
|
||||
# utility scripts
|
||||
%if %{head}
|
||||
scripts="creategroup cvslog.pl scancvslog.pl"
|
||||
%else
|
||||
scripts="scancvslog.pl"
|
||||
%endif
|
||||
mkdir -p examples/scripts
|
||||
for i in $scripts; do
|
||||
cp -a source/script/$i examples/scripts/
|
||||
done
|
||||
# configuration files
|
||||
%if %{ul_version} >= 1
|
||||
SUFFIX="UnitedLinux"
|
||||
%else
|
||||
SUFFIX="SuSE"
|
||||
%endif
|
||||
cat smb.conf.vendor | egrep -v '(^$$|^#)' > smb.conf
|
||||
mv smb.conf.vendor examples/smb.conf.${SUFFIX}
|
||||
install -m 644 smb.conf* $RPM_BUILD_ROOT/etc/samba/
|
||||
install -m 644 lmhosts $RPM_BUILD_ROOT/etc/samba/
|
||||
install -m 644 smbusers $RPM_BUILD_ROOT/etc/samba/
|
||||
install -m 600 smbpasswd -o root -g root $RPM_BUILD_ROOT/etc/samba/
|
||||
install -m 600 smbfstab -o root -g root $RPM_BUILD_ROOT/etc/samba/
|
||||
# pam
|
||||
install -m 644 samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
|
||||
# sambamount
|
||||
ln -sf /usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
|
||||
#cifsmount
|
||||
%if %{make_cifsvfs}
|
||||
install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin
|
||||
%endif
|
||||
# start scripts
|
||||
install rc.smb $RPM_BUILD_ROOT/etc/init.d/smb
|
||||
ln -sf ../../etc/init.d/smb $RPM_BUILD_ROOT/usr/sbin/rcsmb
|
||||
install rc.nmb $RPM_BUILD_ROOT/etc/init.d/nmb
|
||||
ln -sf ../../etc/init.d/nmb $RPM_BUILD_ROOT/usr/sbin/rcnmb
|
||||
install rc.smbfs $RPM_BUILD_ROOT/etc/init.d/smbfs
|
||||
ln -sf ../../etc/init.d/smbfs $RPM_BUILD_ROOT/usr/sbin/rcsmbfs
|
||||
install rc.winbind $RPM_BUILD_ROOT/etc/init.d/winbind
|
||||
ln -sf ../../etc/init.d/winbind $RPM_BUILD_ROOT/usr/sbin/rcwinbind
|
||||
%if %{make_wrepld}
|
||||
install rc.wrepl $RPM_BUILD_ROOT/etc/init.d/wrepl
|
||||
ln -sf ../../etc/init.d/wrepl $RPM_BUILD_ROOT/usr/sbin/rcwrepl
|
||||
cp -a source/bin/wrepld $RPM_BUILD_ROOT/usr/sbin/
|
||||
%endif
|
||||
# libnss_wins.so
|
||||
cp source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib/libnss_wins.so.2
|
||||
ln -sf /lib/libnss_wins.so.2 $RPM_BUILD_ROOT/lib/libnss_wins.so
|
||||
# winbind stuff
|
||||
cp -a source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security/
|
||||
cp -a source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib/libnss_winbind.so.2
|
||||
cp -a source/bin/winbindd $RPM_BUILD_ROOT/usr/sbin/
|
||||
ln -s /lib/libnss_winbind.so.2 $RPM_BUILD_ROOT/lib/libnss_winbind.so
|
||||
# pam_smbpass
|
||||
cp -a source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security/
|
||||
# smbfilter
|
||||
cp -a source/bin/smbfilter $RPM_BUILD_ROOT/usr/bin/
|
||||
# editreg
|
||||
cp -a source/bin/editreg $RPM_BUILD_ROOT/usr/bin/
|
||||
# install libsmbclient
|
||||
install -m0755 source/bin/libsmbclient.a $RPM_BUILD_ROOT/%{_libdir}
|
||||
install -m0755 source/bin/libsmbclient.so $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so.0
|
||||
ln -s /usr/lib/libsmbclient.so.0 $RPM_BUILD_ROOT/%{_libdir}/libsmbclient.so
|
||||
install -m0644 source/include/libsmbclient.h $RPM_BUILD_ROOT/%{_includedir}
|
||||
# install nsswitch-headers (for squid, etc.)
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch
|
||||
cp source/nsswitch/*.h $RPM_BUILD_ROOT/%{_includedir}/samba/nsswitch/
|
||||
# install smbtorture and other test-programs
|
||||
install -m0755 source/bin/smbtorture $RPM_BUILD_ROOT/usr/bin/
|
||||
install -m0755 source/bin/talloctort $RPM_BUILD_ROOT/usr/bin/
|
||||
install -m0755 source/bin/{msgtest,masktest,locktest*} $RPM_BUILD_ROOT/usr/bin/
|
||||
install -m0755 source/bin/{vfstest,nsstest} $RPM_BUILD_ROOT/usr/bin/
|
||||
# install tdb tools
|
||||
install -m0755 source/tdb/{tdbdump,tdbtest,tdbtool,tdbtorture} $RPM_BUILD_ROOT/usr/bin/
|
||||
# install VFS-modules
|
||||
install -m0755 examples/VFS/*.so $RPM_BUILD_ROOT/%{_libdir}/samba/vfs/
|
||||
# install PDB-modules
|
||||
install -m0755 examples/pdb/pdb_test.so $RPM_BUILD_ROOT/%{_libdir}/samba/pdb/
|
||||
%if %{make_vscan}
|
||||
# install VSCAN-vfs-modules
|
||||
install -m0755 examples/VFS/samba-vscan-%{vscan_ver}/*/*.so $RPM_BUILD_ROOT/%{_libdir}/samba/vscan/
|
||||
%endif
|
||||
# make examples clean
|
||||
VFS="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/VFS"
|
||||
VSCAN="$VFS/samba-vscan-%{vscan_ver}"
|
||||
PDB="$RPM_BUILD_DIR/%{name}-%{samba_ver}/examples/pdb"
|
||||
dirs="$PDB $SAM $VFS"
|
||||
(for i in $dirs; do make -C $i clean; done)
|
||||
%if %{make_vscan}
|
||||
(for i in %{vscan_modules}; do make -C $VSCAN/$i clean; done)
|
||||
%endif
|
||||
# install python
|
||||
%if %{make_python}
|
||||
cp -a source/build/lib.*/samba $RPM_BUILD_ROOT/usr/lib/%{python_ver}/lib-dynload/
|
||||
find source/python -name CVS -print | xargs rm -rf
|
||||
find source/python -name ".cvsignore" -print | xargs rm -rf
|
||||
%endif
|
||||
# whats this ?
|
||||
install -m0755 source/bin/debug2html $RPM_BUILD_ROOT/usr/bin/
|
||||
# install smbwrapper
|
||||
%if %{make_smbwrap}
|
||||
install -m0755 source/bin/smbwrapper.so $RPM_BUILD_ROOT/%{_libdir}/samba/
|
||||
install -m0755 source/bin/smbsh $RPM_BUILD_ROOT/usr/bin/
|
||||
%endif
|
||||
##############
|
||||
# cleanup docs
|
||||
##############
|
||||
#chmod 644 `find docs examples -type f`
|
||||
#chmod 755 `find docs examples -type d`
|
||||
#find . -name CVS -print | xargs rm -rf
|
||||
#find . -name ".cvsignore" -print | xargs rm -rf
|
||||
mv COPYING Manifest README Read-Manifest-Now Roadmap WHATSNEW.txt $RPM_BUILD_ROOT/%{DOCDIR}/
|
||||
cp source/msdfs/README $RPM_BUILD_ROOT/%{DOCDIR}/README.msdfs
|
||||
cp source/smbwrapper/README $RPM_BUILD_ROOT/%{DOCDIR}/README.smbwrapper
|
||||
%if %{ul_version} >= 1
|
||||
SUFFIX="UnitedLinux"
|
||||
%else
|
||||
SUFFIX="SuSE"
|
||||
%endif
|
||||
cp README.vendor ${RPM_BUILD_ROOT}/%{DOCDIR}/README.${SUFFIX}
|
||||
# pam_smbpass is missing
|
||||
cp -a source/pam_smbpass/samples examples/pam_smbpass/
|
||||
cp -a source/pam_smbpass/{CHANGELOG,INSTALL,README,TODO} examples/pam_smbpass/
|
||||
# prepare docbook package
|
||||
cp -a docs/docbook/* $RPM_BUILD_ROOT/%{DOCBOOKDIR}
|
||||
#make -C $RPM_BUILD_ROOT/%{DOCBOOKDIR} clean
|
||||
rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/autom4te.cache
|
||||
rm -rf $RPM_BUILD_ROOT/%{DOCBOOKDIR}/config.*
|
||||
# this is empty
|
||||
rm -rf docs/yodldocs
|
||||
rm -rf examples/VFS/samba-vscan-%{vscan_ver}
|
||||
# zip manpages at least
|
||||
gzip -f docs/manpages/*.[1-9]
|
||||
cp -a docs/* $RPM_BUILD_ROOT/%{DOCDIR}
|
||||
cp -a examples/ $RPM_BUILD_ROOT/%{DOCDIR}
|
||||
# save space...
|
||||
rm -r $RPM_BUILD_ROOT/%{SWATDIR}/using_samba
|
||||
ln -s %{DOCDIR}/htmldocs/using_samba $RPM_BUILD_ROOT/%{SWATDIR}
|
||||
# hm...
|
||||
cp $RPM_BUILD_ROOT/%{SWATDIR}/help/welcome.html $RPM_BUILD_ROOT/%{DOCDIR}/htmldocs/
|
||||
rm -r $RPM_BUILD_ROOT/%{SWATDIR}/help
|
||||
ln -s %{DOCDIR}/htmldocs $RPM_BUILD_ROOT/%{SWATDIR}/help
|
||||
# remove cvs
|
||||
find $RPM_BUILD_ROOT/%{DOCDIR} -name CVS -print | xargs rm -rf
|
||||
find $RPM_BUILD_ROOT/%{DOCDIR} -name ".cvsignore" -print | xargs rm -rf
|
||||
# finally build a file-list
|
||||
for file in $( find ${RPM_BUILD_ROOT}%{DOCDIR} -maxdepth 1); do
|
||||
# exclude %{DOCDIR} and docbook
|
||||
case "${file#${RPM_BUILD_ROOT}}" in
|
||||
%{DOCDIR}|%{DOCDIR}/docbook) continue ;;
|
||||
esac
|
||||
echo "%doc ${file#${RPM_BUILD_ROOT}}" >> ${RPM_BUILD_DIR}/%{name}-%{samba_ver}/filelist-doc
|
||||
done
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv smb}
|
||||
mkdir -p $RPM_BUILD_ROOT/var/adm/notify/messages
|
||||
cat << EOF > var/adm/notify/messages/samba-notify
|
||||
Achtung!
|
||||
This is %{name}-%{samba_ver}. Please do not run on production systems.
|
||||
You have been warned.
|
||||
EOF
|
||||
|
||||
%post client
|
||||
%{fillup_and_insserv -fpy smbfs}
|
||||
%{fillup_only -ans samba client}
|
||||
|
||||
%post winbind
|
||||
%{fillup_and_insserv winbind}
|
||||
|
||||
%postun
|
||||
%{insserv_cleanup}
|
||||
|
||||
%postun client
|
||||
%{insserv_cleanup}
|
||||
|
||||
%postun winbind
|
||||
%{insserv_cleanup}
|
||||
|
||||
%clean
|
||||
#make -C source realclean
|
||||
|
||||
%files
|
||||
#/usr/bin/addtosmbpass
|
||||
#/usr/bin/convert_smbpasswd
|
||||
%dir /etc/samba
|
||||
%dir /usr/lib/samba
|
||||
%config /etc/init.d/nmb
|
||||
%config /etc/init.d/smb
|
||||
%config /etc/pam.d/samba
|
||||
%config(noreplace) /etc/samba/smbpasswd
|
||||
%config(noreplace) /etc/samba/smbusers
|
||||
%doc %{_mandir}/man1/smbcontrol.1.gz
|
||||
%doc %{_mandir}/man1/smbstatus.1.gz
|
||||
%doc %{_mandir}/man1/testparm.1.gz
|
||||
%doc %{_mandir}/man1/testprns.1.gz
|
||||
%doc %{_mandir}/man5/smbpasswd.5.gz
|
||||
%doc %{_mandir}/man7/samba.7.gz
|
||||
%doc %{_mandir}/man8/nmbd.8.gz
|
||||
%doc %{_mandir}/man8/pdbedit.8.gz
|
||||
%doc %{_mandir}/man8/smbd.8.gz
|
||||
%doc %{_mandir}/man8/smbpasswd.8.gz
|
||||
%doc %{_mandir}/man8/swat.8.gz
|
||||
%doc %{_mandir}/man8/tdbbackup.8.gz
|
||||
%{_includedir}/samba
|
||||
/lib/security/pam_smbpass.so
|
||||
/usr/bin/pdbedit
|
||||
/usr/bin/smbcontrol
|
||||
/usr/bin/smbpasswd
|
||||
/usr/bin/smbstatus
|
||||
/usr/bin/tdbbackup
|
||||
/usr/bin/tdbdump
|
||||
/usr/bin/tdbtest
|
||||
/usr/bin/tdbtool
|
||||
/usr/bin/testparm
|
||||
/usr/bin/testprns
|
||||
/usr/lib/samba/rpc
|
||||
/usr/lib/samba/vfs
|
||||
/usr/sbin/nmbd
|
||||
/usr/sbin/rcnmb
|
||||
/usr/sbin/rcsmb
|
||||
/usr/sbin/smbd
|
||||
/usr/sbin/swat
|
||||
/usr/share/samba
|
||||
/var/lib/samba
|
||||
/var/log/samba
|
||||
/var/run/samba
|
||||
/var/spool/samba
|
||||
|
||||
%files client
|
||||
%config /etc/init.d/smbfs
|
||||
%config(noreplace) /etc/samba/lmhosts
|
||||
%config(noreplace) /etc/samba/smb.conf
|
||||
%config(noreplace) /etc/samba/smbfstab
|
||||
%dir /etc/samba
|
||||
%dir /usr/lib/samba
|
||||
%doc %{_mandir}/man1/editreg.1.gz
|
||||
%doc %{_mandir}/man1/findsmb.1.gz
|
||||
%doc %{_mandir}/man1/nmblookup.1.gz
|
||||
%doc %{_mandir}/man1/profiles.1.gz
|
||||
%doc %{_mandir}/man1/rpcclient.1.gz
|
||||
%doc %{_mandir}/man1/smbcacls.1.gz
|
||||
%doc %{_mandir}/man1/smbclient.1.gz
|
||||
%doc %{_mandir}/man1/smbcquotas.1.gz
|
||||
%doc %{_mandir}/man1/smbtar.1.gz
|
||||
%doc %{_mandir}/man1/smbtree.1.gz
|
||||
%doc %{_mandir}/man5/lmhosts.5.gz
|
||||
%doc %{_mandir}/man5/smb.conf.5.gz
|
||||
%doc %{_mandir}/man7/Samba.7.gz
|
||||
%doc %{_mandir}/man8/net.8.gz
|
||||
%doc %{_mandir}/man8/smbmnt.8.gz
|
||||
%doc %{_mandir}/man8/smbmount.8.gz
|
||||
%doc %{_mandir}/man8/smbspool.8.gz
|
||||
%doc %{_mandir}/man8/smbumount.8.gz
|
||||
/sbin/mount.smbfs
|
||||
/usr/bin/editreg
|
||||
/usr/bin/findsmb
|
||||
/usr/bin/net
|
||||
/usr/bin/nmblookup
|
||||
/usr/bin/profiles
|
||||
/usr/bin/rpcclient
|
||||
/usr/bin/smbcacls
|
||||
/usr/bin/smbclient
|
||||
/usr/bin/smbcquotas
|
||||
/usr/bin/smbfilter
|
||||
/usr/bin/smbmnt
|
||||
/usr/bin/smbmount
|
||||
/usr/bin/smbspool
|
||||
/usr/bin/smbtar
|
||||
/usr/bin/smbtree
|
||||
/usr/bin/smbumount
|
||||
/usr/lib/samba/lowcase.dat
|
||||
/usr/lib/samba/upcase.dat
|
||||
/usr/lib/samba/valid.dat
|
||||
/usr/sbin/rcsmbfs
|
||||
%if %{make_smbwrap}
|
||||
/usr/bin/smbsh
|
||||
%doc %{_mandir}/man1/smbsh.1.gz
|
||||
/usr/lib/samba/smbwrapper.so
|
||||
%endif
|
||||
|
||||
%files winbind
|
||||
%config /etc/init.d/winbind
|
||||
%config(noreplace) /etc/samba/smb.conf
|
||||
%dir /etc/samba
|
||||
%doc %{_mandir}/man1/wbinfo.1.gz
|
||||
%doc %{_mandir}/man8/winbindd.8.gz
|
||||
%doc %{_mandir}/man1/ntlm_auth.1.gz
|
||||
/lib/libnss_winbind.so*
|
||||
/lib/libnss_wins.so*
|
||||
/lib/security/pam_winbind.so
|
||||
/usr/bin/ntlm_auth
|
||||
/usr/bin/wbinfo
|
||||
/usr/sbin/rcwinbind
|
||||
/usr/sbin/winbindd
|
||||
|
||||
%files utils
|
||||
%doc %{_mandir}/man1/vfstest.1.gz
|
||||
/usr/bin/debug2html
|
||||
/usr/bin/locktest
|
||||
/usr/bin/locktest2
|
||||
/usr/bin/masktest
|
||||
/usr/bin/msgtest
|
||||
/usr/bin/nsstest
|
||||
/usr/bin/smbtorture
|
||||
/usr/bin/talloctort
|
||||
/usr/bin/tdbtorture
|
||||
/usr/bin/vfstest
|
||||
|
||||
%files doc -f filelist-doc
|
||||
%dir /usr/share/doc/packages/samba3
|
||||
|
||||
%files docbook
|
||||
%docdir %{DOCBOOKDIR}
|
||||
%{DOCBOOKDIR}
|
||||
%dir /usr/share/doc/packages/samba3
|
||||
|
||||
%files pdb
|
||||
/usr/lib/samba/pdb
|
||||
%doc examples/pdb/{Makefile,README,pdb_test.c}
|
||||
%doc examples/pdb/{mysql/mysql.dump,mysql/smb.conf}
|
||||
%if %{make_cifsvfs}
|
||||
|
||||
%files cifsmount
|
||||
/sbin/mount.cifs
|
||||
%endif
|
||||
%if %{make_wrepld}
|
||||
|
||||
%files wrepld
|
||||
%config /etc/init.d/wrepl
|
||||
/usr/sbin/rcwrepl
|
||||
/usr/sbin/wrepld
|
||||
%endif
|
||||
%if %{make_vscan}
|
||||
|
||||
%files vscan
|
||||
/usr/lib/samba/vscan
|
||||
%doc samba-vscan-%{vscan_ver}/{AUTHORS,COPYING,ChangeLog,FAQ,NEWS,README,TODO}
|
||||
%endif
|
||||
%if %{make_python}
|
||||
|
||||
%files python
|
||||
%doc source/python/README
|
||||
%doc source/python/examples
|
||||
%doc source/python/gprinterdata
|
||||
%doc source/python/gtdbtool
|
||||
%doc source/python/gtkdictbrowser.py
|
||||
/usr/lib/%{python_ver}/lib-dynload/samba
|
||||
%endif
|
||||
|
||||
%files -n libsmbclient
|
||||
%{_libdir}/libsmbclient.so.*
|
||||
|
||||
%files -n libsmbclient-devel
|
||||
%{_includedir}/libsmbclient.h
|
||||
%{_libdir}/libsmbclient.a
|
||||
%{_libdir}/libsmbclient.so
|
||||
|
||||
%description
|
||||
samba3
|
||||
|
||||
|
||||
%description client
|
||||
samba3-client
|
||||
|
||||
|
||||
%description winbind
|
||||
samba3-winbind
|
||||
|
||||
|
||||
%description utils
|
||||
samba3-utils
|
||||
|
||||
|
||||
%description doc
|
||||
samba3-doc
|
||||
|
||||
|
||||
%description docbook
|
||||
samba3-docbook
|
||||
|
||||
|
||||
%description pdb
|
||||
samba3-pdb
|
||||
|
||||
%if %{make_cifsvfs}
|
||||
|
||||
%description cifsmount
|
||||
samba3-cifsmount
|
||||
|
||||
%endif
|
||||
%if %{make_vscan}
|
||||
|
||||
%description vscan
|
||||
samba3-vscan
|
||||
|
||||
%endif
|
||||
%if %{make_python}
|
||||
|
||||
%description python
|
||||
samba3-python
|
||||
|
||||
%endif
|
||||
%if %{make_wrepld}
|
||||
|
||||
%description wrepld
|
||||
samba3-wrepld
|
||||
|
||||
%endif
|
||||
|
||||
%description -n libsmbclient
|
||||
This package includes the libsmbclient library.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
The Samba Team <samba@samba.org>
|
||||
|
||||
|
||||
%description -n libsmbclient-devel
|
||||
This package contains static libraries and header files needed to develop
|
||||
programs which make use of the smbclient programming interface.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
The Samba Team <samba@samba.org>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user