The branch, master has been updated
       via  a66c034c8e3da47bf492efb631a737581cc4b0d6 (commit)
       via  2337f402f0f2fd6c1fa077b1b35347905a38c715 (commit)
       via  0cb430c22e9c0af2248fbc15ce97a4d760df189d (commit)
       via  888524623d179ceb4d540f5ac0f3b013d3ce5735 (commit)
       via  d217bd00a18787fa56ea571d67e3bd5afb9244d6 (commit)
       via  99c68fa23e5911b2037165f3cf73a49abb5251ce (commit)
      from  465176b7e2fc1370dded850a80a8fe8519e79db8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a66c034c8e3da47bf492efb631a737581cc4b0d6
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 16:02:09 2008 -0800

    librpc: Re-run make idl-full from source3

commit 2337f402f0f2fd6c1fa077b1b35347905a38c715
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 13:47:58 2008 -0800

    pidl: Fix a const build warning in the samba3 merged build
    
    The warning:
    ../librpc/gen_ndr/ndr_spoolss.c: In function 
‘ndr_pull_spoolss_EnumPrinterData’:
    ../librpc/gen_ndr/ndr_spoolss.c:14792: warning: passing argument 1 of 
‘memset’ discards qualifiers from pointer target type
    
    In some case the pidl generated code needs to memset a const struct
    field.  This causes the above warning.  This patch discardeds the const
    in this case.  I'm open to a more elegant fix, but this eliminates the
    warning and should be relatively safe.

commit 0cb430c22e9c0af2248fbc15ce97a4d760df189d
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 13:41:18 2008 -0800

    s3/s4: Move CONST_DISCARD into lib/util so it's available from s3 and s4

commit 888524623d179ceb4d540f5ac0f3b013d3ce5735
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 13:45:29 2008 -0800

    s3 build: Remove redundant #defines that are in idl generated headers
    
    This fixes a series of samba3 build warnings in the merged build:
    'error: "X" redefined', where X is one of the redundant #defines

commit d217bd00a18787fa56ea571d67e3bd5afb9244d6
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 14:40:33 2008 -0800

    s4: simplify some overly-complicated logic

commit 99c68fa23e5911b2037165f3cf73a49abb5251ce
Author: Tim Prouty <[email protected]>
Date:   Tue Dec 30 12:53:34 2008 -0800

    s3 build: Fix warning

-----------------------------------------------------------------------

Summary of changes:
 lib/util/util.h                          |    2 +
 librpc/gen_ndr/ndr_eventlog.c            |    2 +-
 librpc/gen_ndr/ndr_ntsvcs.c              |    4 +-
 librpc/gen_ndr/ndr_svcctl.c              |   12 ++--
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |    2 +-
 source3/include/includes.h               |    2 -
 source3/include/rpc_spoolss.h            |  104 +-----------------------------
 source3/smbd/server.c                    |    2 +
 source4/libcli/resolve/dns_ex.c          |    2 +-
 9 files changed, 18 insertions(+), 114 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util.h b/lib/util/util.h
index dced557..c6805d4 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -750,4 +750,6 @@ bool unmap_file(void *start, size_t size);
 
 void print_asc(int level, const uint8_t *buf,int len);
 
+#define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
+
 #endif /* _SAMBA_UTIL_H_ */
diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c
index fdef52f..6116434 100644
--- a/librpc/gen_ndr/ndr_eventlog.c
+++ b/librpc/gen_ndr/ndr_eventlog.c
@@ -902,7 +902,7 @@ static enum ndr_err_code 
ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i
                        return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of 
range");
                }
                NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
-               memset(r->out.data, 0, (r->in.number_of_bytes) * 
sizeof(*r->out.data));
+               memset(CONST_DISCARD(struct eventlog_ReadEventLogW 
*,r->out.data), 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
                NDR_PULL_ALLOC(ndr, r->out.sent_size);
                ZERO_STRUCTP(r->out.sent_size);
                NDR_PULL_ALLOC(ndr, r->out.real_size);
diff --git a/librpc/gen_ndr/ndr_ntsvcs.c b/librpc/gen_ndr/ndr_ntsvcs.c
index ef2ecc1..32040d9 100644
--- a/librpc/gen_ndr/ndr_ntsvcs.c
+++ b/librpc/gen_ndr/ndr_ntsvcs.c
@@ -580,7 +580,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct 
ndr_pull *ndr, int fl
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length);
-               memset(r->out.buffer, 0, (*r->in.length) * 
sizeof(*r->out.buffer));
+               memset(CONST_DISCARD(struct PNP_GetDeviceList *,r->out.buffer), 
0, (*r->in.length) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.length);
                *r->out.length = *r->in.length;
        }
@@ -896,7 +896,7 @@ static enum ndr_err_code 
ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
                NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
                *r->out.reg_data_type = *r->in.reg_data_type;
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size);
-               memset(r->out.buffer, 0, (*r->in.buffer_size) * 
sizeof(*r->out.buffer));
+               memset(CONST_DISCARD(struct PNP_GetDeviceRegProp 
*,r->out.buffer), 0, (*r->in.buffer_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.buffer_size);
                *r->out.buffer_size = *r->in.buffer_size;
                NDR_PULL_ALLOC(ndr, r->out.needed);
diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c
index 95da357..1cab496 100644
--- a/librpc/gen_ndr/ndr_svcctl.c
+++ b/librpc/gen_ndr/ndr_svcctl.c
@@ -926,7 +926,7 @@ static enum ndr_err_code 
ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p
                        return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of 
range");
                }
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buffer_size);
-               memset(r->out.buffer, 0, (r->in.buffer_size) * 
sizeof(*r->out.buffer));
+               memset(CONST_DISCARD(struct svcctl_QueryServiceObjectSecurity 
*,r->out.buffer), 0, (r->in.buffer_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.needed);
                ZERO_STRUCTP(r->out.needed);
        }
@@ -2028,7 +2028,7 @@ static enum ndr_err_code 
ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
                        return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of 
range");
                }
                NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.buf_size);
-               memset(r->out.service_status, 0, (r->in.buf_size) * 
sizeof(*r->out.service_status));
+               memset(CONST_DISCARD(struct svcctl_EnumDependentServicesW 
*,r->out.service_status), 0, (r->in.buf_size) * sizeof(*r->out.service_status));
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
                NDR_PULL_ALLOC(ndr, r->out.services_returned);
@@ -2181,7 +2181,7 @@ static enum ndr_err_code 
ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
                }
                NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.buf_size);
-               memset(r->out.service, 0, (r->in.buf_size) * 
sizeof(*r->out.service));
+               memset(CONST_DISCARD(struct svcctl_EnumServicesStatusW 
*,r->out.service), 0, (r->in.buf_size) * sizeof(*r->out.service));
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
                NDR_PULL_ALLOC(ndr, r->out.services_returned);
@@ -5386,7 +5386,7 @@ static enum ndr_err_code 
ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
                        return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of 
range");
                }
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
-               memset(r->out.buffer, 0, (r->in.buf_size) * 
sizeof(*r->out.buffer));
+               memset(CONST_DISCARD(struct svcctl_QueryServiceConfig2W 
*,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
        }
@@ -5494,7 +5494,7 @@ static enum ndr_err_code 
ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
                        return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of 
range");
                }
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
-               memset(r->out.buffer, 0, (r->in.buf_size) * 
sizeof(*r->out.buffer));
+               memset(CONST_DISCARD(struct svcctl_QueryServiceStatusEx 
*,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
        }
@@ -5868,7 +5868,7 @@ static enum ndr_err_code 
ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
                }
                NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size);
-               memset(r->out.services, 0, (r->in.buf_size) * 
sizeof(*r->out.services));
+               memset(CONST_DISCARD(struct EnumServicesStatusExW 
*,r->out.services), 0, (r->in.buf_size) * sizeof(*r->out.services));
                NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
                ZERO_STRUCTP(r->out.bytes_needed);
                NDR_PULL_ALLOC(ndr, r->out.service_returned);
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index ee81e51..5c9123a 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2165,7 +2165,7 @@ sub ParseFunctionPull($$)
                        if (grep(/in/, @{$e->{DIRECTION}})) {
                                $self->pidl("memcpy(r->out.$e->{NAME}, 
r->in.$e->{NAME}, ($size) * sizeof(*r->in.$e->{NAME}));");
                        } else {
-                               $self->pidl("memset(r->out.$e->{NAME}, 0, 
($size) * sizeof(*r->out.$e->{NAME}));");
+                               $self->pidl("memset(CONST_DISCARD(struct 
$fn->{NAME} *,r->out.$e->{NAME}), 0, ($size) * sizeof(*r->out.$e->{NAME}));");
                        }
                } else {
                        $self->pidl("NDR_PULL_ALLOC($ndr, r->out.$e->{NAME});");
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 4e41fa3..3f35602 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1048,8 +1048,6 @@ ssize_t readahead(int fd, off64_t offset, size_t count);
 #undef HAVE_MMAP
 #endif
 
-#define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
-
 void smb_panic( const char *why ) _NORETURN_;
 void dump_core(void) _NORETURN_;
 void exit_server(const char *const reason) _NORETURN_;
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 98f6110..0ef2e6b 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -20,6 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "../librpc/gen_ndr/spoolss.h"
+
 #ifndef _RPC_SPOOLSS_H         /* _RPC_SPOOLSS_H */
 #define _RPC_SPOOLSS_H
 
@@ -127,43 +129,6 @@
 #define PRINTER_CONTROL_SET_STATUS     0x00000004
 
 #define PRINTER_STATUS_OK               0x00000000
-#define PRINTER_STATUS_PAUSED          0x00000001
-#define PRINTER_STATUS_ERROR           0x00000002
-#define PRINTER_STATUS_PENDING_DELETION        0x00000004
-#define PRINTER_STATUS_PAPER_JAM       0x00000008
-
-#define PRINTER_STATUS_PAPER_OUT       0x00000010
-#define PRINTER_STATUS_MANUAL_FEED     0x00000020
-#define PRINTER_STATUS_PAPER_PROBLEM   0x00000040
-#define PRINTER_STATUS_OFFLINE         0x00000080
-
-#define PRINTER_STATUS_IO_ACTIVE       0x00000100
-#define PRINTER_STATUS_BUSY            0x00000200
-#define PRINTER_STATUS_PRINTING                0x00000400
-#define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
-
-#define PRINTER_STATUS_NOT_AVAILABLE   0x00001000
-#define PRINTER_STATUS_WAITING         0x00002000
-#define PRINTER_STATUS_PROCESSING      0x00004000
-#define PRINTER_STATUS_INITIALIZING    0x00008000
-
-#define PRINTER_STATUS_WARMING_UP      0x00010000
-#define PRINTER_STATUS_TONER_LOW       0x00020000
-#define PRINTER_STATUS_NO_TONER                0x00040000
-#define PRINTER_STATUS_PAGE_PUNT       0x00080000
-
-#define PRINTER_STATUS_USER_INTERVENTION       0x00100000
-#define PRINTER_STATUS_OUT_OF_MEMORY   0x00200000
-#define PRINTER_STATUS_DOOR_OPEN       0x00400000
-#define PRINTER_STATUS_SERVER_UNKNOWN  0x00800000
-
-#define PRINTER_STATUS_POWER_SAVE      0x01000000
-
-#define SERVER_ACCESS_ADMINISTER       0x00000001
-#define SERVER_ACCESS_ENUMERATE                0x00000002
-#define PRINTER_ACCESS_ADMINISTER      0x00000004
-#define PRINTER_ACCESS_USE             0x00000008
-#define JOB_ACCESS_ADMINISTER          0x00000010
 #define JOB_ACCESS_READ                        0x00000020
 
 /* JOB status codes. */
@@ -181,31 +146,6 @@
 #define JOB_STATUS_BLOCKED             0x0200
 #define JOB_STATUS_USER_INTERVENTION   0x0400
 
-/* Access rights for print servers */
-#define SERVER_ALL_ACCESS      
STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
-#define SERVER_READ            
STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
-#define SERVER_WRITE           
STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
-#define SERVER_EXECUTE         
STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
-
-/* Access rights for printers */
-#define PRINTER_ALL_ACCESS     
STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
-#define PRINTER_READ          STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
-#define PRINTER_WRITE         STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
-#define PRINTER_EXECUTE       STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
-
-/* Access rights for jobs */
-#define JOB_ALL_ACCESS 
STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER|JOB_ACCESS_READ|PRINTER_ACCESS_USE
-#define JOB_READ       
STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER|JOB_ACCESS_READ
-#define JOB_WRITE      
STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
-#define JOB_EXECUTE    
STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
-
-/* ACE masks for the various print permissions */
-
-#define PRINTER_ACE_FULL_CONTROL      (GENERIC_ALL_ACCESS|PRINTER_ALL_ACCESS)
-#define PRINTER_ACE_MANAGE_DOCUMENTS  (GENERIC_ALL_ACCESS|READ_CONTROL_ACCESS)
-#define PRINTER_ACE_PRINT             
(GENERIC_EXECUTE_ACCESS|READ_CONTROL_ACCESS|PRINTER_ACCESS_USE)
-
-
 /* Notify field types */
 
 #define NOTIFY_ONE_VALUE 1             /* Notify data is stored in value1 */
@@ -366,24 +306,6 @@ PRINTER_MESSAGE_INFO;
  * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
  */
 
-#define PRINTER_ATTRIBUTE_QUEUED               0x00000001
-#define PRINTER_ATTRIBUTE_DIRECT               0x00000002
-#define PRINTER_ATTRIBUTE_DEFAULT              0x00000004
-#define PRINTER_ATTRIBUTE_SHARED               0x00000008
-
-#define PRINTER_ATTRIBUTE_NETWORK              0x00000010
-#define PRINTER_ATTRIBUTE_HIDDEN               0x00000020
-#define PRINTER_ATTRIBUTE_LOCAL                        0x00000040
-#define PRINTER_ATTRIBUTE_ENABLE_DEVQ          0x00000080
-
-#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS      0x00000100
-#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST    0x00000200
-#define PRINTER_ATTRIBUTE_WORK_OFFLINE         0x00000400
-#define PRINTER_ATTRIBUTE_ENABLE_BIDI          0x00000800
-
-#define PRINTER_ATTRIBUTE_RAW_ONLY             0x00001000
-#define PRINTER_ATTRIBUTE_PUBLISHED            0x00002000
-
 #define PRINTER_ATTRIBUTE_SAMBA                        
(PRINTER_ATTRIBUTE_RAW_ONLY|\
                                                 PRINTER_ATTRIBUTE_SHARED|\
                                                 PRINTER_ATTRIBUTE_LOCAL)
@@ -394,29 +316,9 @@ PRINTER_MESSAGE_INFO;
 #define MIN_PRIORITY    1
 #define DEF_PRIORITY    1
 
-/* the flags of the query */
-#define PRINTER_ENUM_DEFAULT           0x00000001
-#define PRINTER_ENUM_LOCAL             0x00000002
-#define PRINTER_ENUM_CONNECTIONS       0x00000004
-#define PRINTER_ENUM_FAVORITE          0x00000004
-#define PRINTER_ENUM_NAME              0x00000008
-#define PRINTER_ENUM_REMOTE            0x00000010
-#define PRINTER_ENUM_SHARED            0x00000020
-#define PRINTER_ENUM_NETWORK           0x00000040
-
 /* the flags of each printers */
-#define PRINTER_ENUM_UNKNOWN_8         0x00000008
-#define PRINTER_ENUM_EXPAND            0x00004000
-#define PRINTER_ENUM_CONTAINER         0x00008000
+#define PRINTER_ENUM_UNKNOWN_8         0x00000008
 #define PRINTER_ENUM_ICONMASK          0x00ff0000
-#define PRINTER_ENUM_ICON1             0x00010000
-#define PRINTER_ENUM_ICON2             0x00020000
-#define PRINTER_ENUM_ICON3             0x00040000
-#define PRINTER_ENUM_ICON4             0x00080000
-#define PRINTER_ENUM_ICON5             0x00100000
-#define PRINTER_ENUM_ICON6             0x00200000
-#define PRINTER_ENUM_ICON7             0x00400000
-#define PRINTER_ENUM_ICON8             0x00800000
 
 /* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */
 
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index cfdd05b..254180a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -59,6 +59,7 @@ int get_client_fd(void)
        return server_fd;
 }
 
+#ifdef CLUSTER_SUPPORT
 static int client_get_tcp_info(struct sockaddr_storage *server,
                               struct sockaddr_storage *client)
 {
@@ -76,6 +77,7 @@ static int client_get_tcp_info(struct sockaddr_storage 
*server,
        }
        return 0;
 }
+#endif
 
 struct event_context *smbd_event_context(void)
 {
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index be93538..2970681 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -278,7 +278,7 @@ static void run_child_getaddrinfo(struct dns_ex_state 
*state, int fd)
        hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
 
        ret = getaddrinfo(state->name.name, "0", &hints, &res_list);
-#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
+#ifdef EAI_NODATA
        if (ret == EAI_NODATA && state->do_fallback) {
 #else
        if (ret == EAI_NONAME && state->do_fallback) {


-- 
Samba Shared Repository

Reply via email to