[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Tue Feb 22 14:37:03 MST 2011
The branch, master has been updated
via 7f0ef4f s3-waf: add check for sendfile on AIX.
via 2b53e7e s3-waf: add check for sendfile on solaris.
via 6c32fe5 s3-waf: add check for sendfile on hpux.
via 2babc4f s3-waf: add check for sendfile on freebsd.
via d71c024 s3-waf: add check for sendfile on linux.
via ef896e6 s3-waf: make sure ENABLE_BUILD_FARM_HACKS is enabled when run on the buildfarm.
via 28b4b05 s3-includes: move some chgpasswd related defines to the locations where they are used.
via 823f8b9 s3-printing: move more printing structs to printing.h
via 8225c0a s3-printing: only include printing where really needed.
via 5a0cf0c s3-printing: fix pcacp prototypes and includes.
via 66e040e s3-printing: isolate print notification prototypes better.
from 6700458 s4:librpc: let dcerpc-samr library use RPC_NDR_SAMR subsystem
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7f0ef4fb4ad430190d143b0ed73fb3a68dde17fd
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 21:36:35 2011 +0100
s3-waf: add check for sendfile on AIX.
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Tue Feb 22 22:36:53 CET 2011 on sn-devel-104
commit 2b53e7eec75b3ea210eceeec4361d14fc4576f27
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 21:33:06 2011 +0100
s3-waf: add check for sendfile on solaris.
Guenther
commit 6c32fe5207c4baab12212e9d53b80b41986ed1d7
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 21:24:39 2011 +0100
s3-waf: add check for sendfile on hpux.
Guenther
commit 2babc4fcf47ad865e301ce22cceff4e0b0429de9
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 21:16:39 2011 +0100
s3-waf: add check for sendfile on freebsd.
Guenther
commit d71c024131d4b108e5c6b4eacf5a75fef8c69215
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 21:11:15 2011 +0100
s3-waf: add check for sendfile on linux.
Guenther
commit ef896e647a1b19f8d0fc35dad823401e24354435
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 20:43:23 2011 +0100
s3-waf: make sure ENABLE_BUILD_FARM_HACKS is enabled when run on the buildfarm.
Guenther
commit 28b4b059386b4369d6ad85c82bbc150aa81609c4
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 19:45:24 2011 +0100
s3-includes: move some chgpasswd related defines to the locations where they are used.
Guenther
commit 823f8b90305e2fe4ef2c391aee8a6d508835d353
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 19:46:11 2011 +0100
s3-printing: move more printing structs to printing.h
Guenther
commit 8225c0ad6c5fbcb522912fa5f5af605f721e5216
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 19:24:31 2011 +0100
s3-printing: only include printing where really needed.
Guenther
commit 5a0cf0c77e033da68d9dedb048995aa2ade76460
Author: Günther Deschner <gd at samba.org>
Date: Mon Feb 21 14:37:21 2011 +0100
s3-printing: fix pcacp prototypes and includes.
Guenther
commit 66e040ee0ae0b58f4cd83b36d7f981b2fb703ed8
Author: Günther Deschner <gd at samba.org>
Date: Tue Feb 22 10:28:29 2011 +0100
s3-printing: isolate print notification prototypes better.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/auth/pass_check.c | 6 +
source3/include/includes.h | 12 --
source3/include/printing.h | 63 +++++++++
source3/include/proto.h | 100 --------------
source3/include/smb.h | 40 ------
source3/printing/load.c | 2 +-
source3/printing/load.h | 4 +
source3/printing/notify.c | 1 +
source3/printing/notify.h | 87 ++++++++++++
source3/printing/pcap.h | 6 +
source3/printing/printing.c | 2 +
source3/printing/tests/vlp.c | 1 +
source3/rpc_server/samr/srv_samr_chgpasswd.c | 6 +
source3/rpc_server/spoolss/srv_spoolss_nt.c | 1 +
source3/smbd/lanman.c | 1 +
source3/smbd/process.c | 1 +
source3/smbd/server.c | 2 +
source3/smbd/server_exit.c | 2 +
source3/smbd/server_reload.c | 1 +
source3/smbd/service.c | 1 +
source3/utils/smbcontrol.c | 1 +
source3/web/swat.c | 1 +
source3/wscript | 182 ++++++++++++++++++++++++++
23 files changed, 370 insertions(+), 153 deletions(-)
create mode 100644 source3/printing/load.h
create mode 100644 source3/printing/notify.h
Changeset truncated at 500 lines:
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index c61a10b..d3b9b92 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -25,6 +25,12 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
+/* what is the longest significant password available on your system?
+ Knowing this speeds up password searches a lot */
+#ifndef PASSWORD_LENGTH
+#define PASSWORD_LENGTH 8
+#endif
+
/* these are kept here to keep the string_combinations function simple */
static char *ths_user;
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 8276053..348dda1 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -738,18 +738,6 @@ enum flush_reason_enum {
#define OSF1_ENH_SEC 1
#endif
-#ifndef ALLOW_CHANGE_PASSWORD
-#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
-#define ALLOW_CHANGE_PASSWORD 1
-#endif
-#endif
-
-/* what is the longest significant password available on your system?
- Knowing this speeds up password searches a lot */
-#ifndef PASSWORD_LENGTH
-#define PASSWORD_LENGTH 8
-#endif
-
#if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
#define ULTRIX_AUTH 1
#endif
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 9f0fcde..72c9cef 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -25,6 +25,46 @@
SAMBA printing subsystem.
*/
+/* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
+
+enum {
+ LPQ_QUEUED = 0,
+ LPQ_PAUSED,
+ LPQ_SPOOLING,
+ LPQ_PRINTING,
+ LPQ_ERROR,
+ LPQ_DELETING,
+ LPQ_OFFLINE,
+ LPQ_PAPEROUT,
+ LPQ_PRINTED,
+ LPQ_DELETED,
+ LPQ_BLOCKED,
+ LPQ_USER_INTERVENTION,
+
+ /* smbd is dooing the file spooling before passing control to spoolss */
+ PJOB_SMBD_SPOOLING
+};
+
+typedef struct _print_queue_struct {
+ int job; /* normally the UNIX jobid -- see note in
+ printing.c:traverse_fn_delete() */
+ int size;
+ int page_count;
+ int status;
+ int priority;
+ time_t time;
+ fstring fs_user;
+ fstring fs_file;
+} print_queue_struct;
+
+enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR};
+
+typedef struct {
+ fstring message;
+ int qcount;
+ int status;
+} print_status_struct;
+
/* Information for print jobs */
struct printjob {
pid_t pid; /* which process launched the job */
@@ -101,6 +141,8 @@ struct tdb_print_db {
#define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
+/* The following definitions come from printing/printspoolss.c */
+
NTSTATUS print_spool_open(files_struct *fsp,
const char *fname,
uint16_t current_vuid);
@@ -157,5 +199,26 @@ WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx, int snum);
WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
struct messaging_context *msg_ctx, int snum);
+uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
+bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
+void rap_jobid_delete(const char* sharename, uint32 jobid);
+bool print_backend_init(struct messaging_context *msg_ctx);
+void start_background_queue(struct tevent_context *ev,
+ struct messaging_context *msg);
+void printing_end(void);
+
+/* The following definitions come from printing/lpq_parse.c */
+
+bool parse_lpq_entry(enum printing_types printing_type,char *line,
+ print_queue_struct *buf,
+ print_status_struct *status,bool first);
+uint32_t print_parse_jobid(const char *fname);
+
+/* The following definitions come from printing/printing_db.c */
+
+struct tdb_print_db *get_print_db_byname(const char *printername);
+void release_print_db( struct tdb_print_db *pdb);
+void close_all_print_db(void);
+TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
#endif /* PRINTING_H_ */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 30774c7..6958518 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3948,106 +3948,6 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
struct dom_sid *sid, const char **domain);
-/* The following definitions come from printing/load.c */
-
-void load_printers(struct tevent_context *ev,
- struct messaging_context *msg_ctx);
-
-/* The following definitions come from printing/lpq_parse.c */
-
-bool parse_lpq_entry(enum printing_types printing_type,char *line,
- print_queue_struct *buf,
- print_status_struct *status,bool first);
-uint32_t print_parse_jobid(const char *fname);
-
-/* The following definitions come from printing/notify.c */
-
-int print_queue_snum(const char *qname);
-void print_notify_send_messages(struct messaging_context *msg_ctx,
- unsigned int timeout);
-void notify_printer_status_byname(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 status);
-void notify_printer_status(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, uint32 status);
-void notify_job_status_byname(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 status,
- uint32 flags);
-void notify_job_status(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, uint32 status);
-void notify_job_total_bytes(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 size);
-void notify_job_total_pages(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 pages);
-void notify_job_username(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, char *name);
-void notify_job_name(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, char *name);
-void notify_job_submitted(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- time_t submitted);
-void notify_printer_driver(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *driver_name);
-void notify_printer_comment(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *comment);
-void notify_printer_sharename(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *share_name);
-void notify_printer_printername(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *printername);
-void notify_printer_port(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *port_name);
-void notify_printer_location(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *location);
-void notify_printer_byname(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- const char *printername, uint32 change,
- const char *value);
-void notify_printer_sepfile(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- int snum, const char *sepfile);
-
-/* The following definitions come from printing/pcap.c */
-
-void pcap_cache_reload(struct tevent_context *ev,
- struct messaging_context *msg_ctx,
- void (*post_cache_fill_fn)(struct tevent_context *,
- struct messaging_context *));
-bool pcap_printername_ok(const char *printername);
-
-/* The following definitions come from printing/printing.c */
-
-uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
-bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
-void rap_jobid_delete(const char* sharename, uint32 jobid);
-bool print_backend_init(struct messaging_context *msg_ctx);
-void start_background_queue(struct tevent_context *ev,
- struct messaging_context *msg);
-void printing_end(void);
-
-/* The following definitions come from printing/printing_db.c */
-
-struct tdb_print_db *get_print_db_byname(const char *printername);
-void release_print_db( struct tdb_print_db *pdb);
-void close_all_print_db(void);
-TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
-
/* The following definitions come from profile/profile.c */
void set_profile_level(int level, struct server_id src);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 0776ed9..d3fa3f2 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -591,46 +591,6 @@ typedef struct {
fstring domain; /* domain that the client specified */
} userdom_struct;
-/* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
-
-enum {
- LPQ_QUEUED = 0,
- LPQ_PAUSED,
- LPQ_SPOOLING,
- LPQ_PRINTING,
- LPQ_ERROR,
- LPQ_DELETING,
- LPQ_OFFLINE,
- LPQ_PAPEROUT,
- LPQ_PRINTED,
- LPQ_DELETED,
- LPQ_BLOCKED,
- LPQ_USER_INTERVENTION,
-
- /* smbd is dooing the file spooling before passing control to spoolss */
- PJOB_SMBD_SPOOLING
-};
-
-typedef struct _print_queue_struct {
- int job; /* normally the UNIX jobid -- see note in
- printing.c:traverse_fn_delete() */
- int size;
- int page_count;
- int status;
- int priority;
- time_t time;
- fstring fs_user;
- fstring fs_file;
-} print_queue_struct;
-
-enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR};
-
-typedef struct {
- fstring message;
- int qcount;
- int status;
-} print_status_struct;
-
/* used for server information: client, nameserv and ipc */
struct server_info_struct {
fstring name;
diff --git a/source3/printing/load.c b/source3/printing/load.c
index 66c3ffd..5acc258 100644
--- a/source3/printing/load.c
+++ b/source3/printing/load.c
@@ -19,7 +19,7 @@
#include "includes.h"
#include "printing/pcap.h"
-
+#include "printing/load.h"
/***************************************************************************
auto-load some homes and printer services
diff --git a/source3/printing/load.h b/source3/printing/load.h
new file mode 100644
index 0000000..df401a4
--- /dev/null
+++ b/source3/printing/load.h
@@ -0,0 +1,4 @@
+/* The following definitions come from printing/load.c */
+
+void load_printers(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index 84a979e..f1a7e4f 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -24,6 +24,7 @@
#include "librpc/gen_ndr/messaging.h"
#include "../librpc/gen_ndr/spoolss.h"
#include "nt_printing.h"
+#include "printing/notify.h"
static TALLOC_CTX *send_ctx;
diff --git a/source3/printing/notify.h b/source3/printing/notify.h
new file mode 100644
index 0000000..f3b9fe4
--- /dev/null
+++ b/source3/printing/notify.h
@@ -0,0 +1,87 @@
+#ifndef _PRINTING_NOTIFY_H_
+#define _PRINTING_NOTIFY_H_
+
+/*
+ Unix SMB/Netbios implementation.
+ Version 3.0
+ printing backend routines
+ Copyright (C) Tim Potter, 2002
+ Copyright (C) Gerald Carter, 2002
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The following definitions come from printing/notify.c */
+
+int print_queue_snum(const char *qname);
+void print_notify_send_messages(struct messaging_context *msg_ctx,
+ unsigned int timeout);
+void notify_printer_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 status);
+void notify_printer_status(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, uint32 status);
+void notify_job_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 status,
+ uint32 flags);
+void notify_job_status(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, uint32 status);
+void notify_job_total_bytes(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 size);
+void notify_job_total_pages(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 pages);
+void notify_job_username(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, char *name);
+void notify_job_name(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, char *name);
+void notify_job_submitted(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ time_t submitted);
+void notify_printer_driver(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *driver_name);
+void notify_printer_comment(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *comment);
+void notify_printer_sharename(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *share_name);
+void notify_printer_printername(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *printername);
+void notify_printer_port(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *port_name);
+void notify_printer_location(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *location);
+void notify_printer_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *printername, uint32 change,
+ const char *value);
+void notify_printer_sepfile(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *sepfile);
+#endif
diff --git a/source3/printing/pcap.h b/source3/printing/pcap.h
index 4198be1..e24142e 100644
--- a/source3/printing/pcap.h
+++ b/source3/printing/pcap.h
@@ -28,6 +28,12 @@ bool pcap_cache_replace(const struct pcap_cache *cache);
void pcap_printer_fn_specific(const struct pcap_cache *, void (*fn)(const char *, const char *, void *), void *);
void pcap_printer_fn(void (*fn)(const char *, const char *, void *), void *);
+void pcap_cache_reload(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ void (*post_cache_fill_fn)(struct tevent_context *,
+ struct messaging_context *));
+bool pcap_printername_ok(const char *printername);
+
/* The following definitions come from printing/print_aix.c */
bool aix_cache_reload(void);
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index ee0a100..ce112bb 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -25,6 +25,8 @@
#include "../librpc/gen_ndr/ndr_spoolss.h"
#include "nt_printing.h"
#include "../librpc/gen_ndr/netlogon.h"
+#include "printing/notify.h"
+#include "printing/pcap.h"
extern struct current_user current_user;
extern userdom_struct current_user_info;
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c
index 48b7120..494a811 100644
--- a/source3/printing/tests/vlp.c
+++ b/source3/printing/tests/vlp.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "printing.h"
#ifdef malloc
#undef malloc
diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c
index 85a63a5..8a68226 100644
--- a/source3/rpc_server/samr/srv_samr_chgpasswd.c
+++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c
@@ -50,6 +50,12 @@
#include "../lib/crypto/arcfour.h"
#include "rpc_server/samr/srv_samr_util.h"
+#ifndef ALLOW_CHANGE_PASSWORD
+#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
+#define ALLOW_CHANGE_PASSWORD 1
+#endif
+#endif
+
#if ALLOW_CHANGE_PASSWORD
static int findpty(char **slave)
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index a303a7a..8d8dd61 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -42,6 +42,7 @@
#include "secrets.h"
#include "../librpc/gen_ndr/netlogon.h"
#include "rpc_misc.h"
+#include "printing/notify.h"
/* macros stolen from s4 spoolss server */
#define SPOOLSS_BUFFER_UNION(fn,info,level) \
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 259da3d..64e0439 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -40,6 +40,7 @@
#include "rpc_client/init_lsa.h"
#include "rpc_server/rpc_ncacn_np.h"
#include "../libcli/security/security.h"
+#include "printing.h"
#ifdef CHECK_TYPES
#undef CHECK_TYPES
--
Samba Shared Repository
More information about the samba-cvs
mailing list