The branch, master has been updated
       via  76360ca s3/smbd: use stat from smb_fname if valid in 
refuse_symlink()
       via  b13b3c1 s3/smbd: in call_trans2qfilepathinfo call lstat when 
dealing with posix pathnames
       via  49c5e4f s3-registry: create winprint print processor entry for x64 
as well.
       via  add8419 libgpo: accept more boolean matches in gp_inifile_getbool().
       via  88fc7a7 s3-rpc_client: make it more clear printer driver version is 
a QWORD not a DWORD.
       via  180fc18 s4-torture: also test NULL servername in 
spoolss_GetPrinterDriverPackagePath
       via  d6d7871 s3-spoolss: avoid referencing p->opnum in 
_spoolss_AddPrinterDriverEx
       via  f3e94b8 s3-rpcclient: add getdriverpackagepath command.
       via  9123783 s3-waf: give rpcclient its own wscript_build.
       via  149da58 s4-torture: use torture_comment in torture_rpc_connection()
       via  24b5a44 s3-spoolss: add missing newline in debug message of 
_spoolss_OpenPrinterEx.
       via  bed0d84 s4-torture: add test for spoolss_LogJobInfoForBranchOffice
       via  0d2dd7e spoolss: add IDL for spoolss_LogJobInfoForBranchOffice.
       via  45748ae pidl: in s3 server templates, support default HRESULT error 
returns.
      from  dd8553b s4-kdc: Move kpasswd_make_pwchange_reply() to a helper file

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


- Log -----------------------------------------------------------------
commit 76360caad20dae0389e3e78d58d5866e5657a6cd
Author: Ralph Boehme <[email protected]>
Date:   Sat Sep 10 14:43:07 2016 +0200

    s3/smbd: use stat from smb_fname if valid in refuse_symlink()
    
    Now that refuse_symlink() gets passed in a smb_fname and not just a char
    buffer, we can try to reuse its stat info and save one stat call here.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Sun Sep 11 23:52:17 CEST 2016 on sn-devel-144

commit b13b3c11054f918f18841186a6efc5dedd2ffd66
Author: Ralph Boehme <[email protected]>
Date:   Sun Sep 11 15:35:37 2016 +0200

    s3/smbd: in call_trans2qfilepathinfo call lstat when dealing with posix 
pathnames
    
    This might be an info level SMB_INFO_QUERY_ALL_EAS which is not covered
    by INFO_LEVEL_IS_UNIX(). If smb_fname is a symlink we would then stat it
    in POSIX context.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 49c5e4fbceaeab7dcf83edda2020667b194e5545
Author: Günther Deschner <[email protected]>
Date:   Sat Sep 10 11:07:54 2016 +0200

    s3-registry: create winprint print processor entry for x64 as well.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit add8419783e76dee165feea9093571bd534bcfa1
Author: Günther Deschner <[email protected]>
Date:   Thu Sep 8 21:28:22 2016 +0200

    libgpo: accept more boolean matches in gp_inifile_getbool().
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 88fc7a74b5834c03f1f5947297df5effa414ee70
Author: Günther Deschner <[email protected]>
Date:   Thu Sep 8 21:22:17 2016 +0200

    s3-rpc_client: make it more clear printer driver version is a QWORD not a 
DWORD.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 180fc18f49181adf14714e1d0d59c0820ac23489
Author: Günther Deschner <[email protected]>
Date:   Thu Sep 8 21:09:42 2016 +0200

    s4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit d6d7871bde70459147fa79b27e88ffa9fb480cb6
Author: Günther Deschner <[email protected]>
Date:   Thu Sep 8 21:06:41 2016 +0200

    s3-spoolss: avoid referencing p->opnum in _spoolss_AddPrinterDriverEx
    
    When called by another protocol, this call would fail when called with an
    unexpected opnum... This change is in preparation for supporting MS-PAR.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit f3e94b88d7dbbc65a622a310602ec0a43f0e2a68
Author: Günther Deschner <[email protected]>
Date:   Thu Sep 8 20:57:05 2016 +0200

    s3-rpcclient: add getdriverpackagepath command.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 9123783d1be9449043f3aa65c57ed89b0b5d3069
Author: Günther Deschner <[email protected]>
Date:   Thu Jan 10 13:53:56 2013 +0100

    s3-waf: give rpcclient its own wscript_build.
    
    Guenther
    Reviewed-by: Jeremy Allison <[email protected]>

commit 149da58ca63d03b6983b9927ca65cebd4a9bbefb
Author: Günther Deschner <[email protected]>
Date:   Fri Sep 2 12:44:34 2016 +0200

    s4-torture: use torture_comment in torture_rpc_connection()
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 24b5a44c7d5b39ec97bf75dbf8115e28e46d6006
Author: Günther Deschner <[email protected]>
Date:   Thu Aug 25 17:10:09 2016 +0200

    s3-spoolss: add missing newline in debug message of _spoolss_OpenPrinterEx.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit bed0d84550f80b5cf1f8c5265802e3bd690151a6
Author: Günther Deschner <[email protected]>
Date:   Tue Sep 6 12:11:26 2016 +0200

    s4-torture: add test for spoolss_LogJobInfoForBranchOffice
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 0d2dd7eb9b8ef8f9a373f51e13f218cac4d9db62
Author: Günther Deschner <[email protected]>
Date:   Tue Aug 23 12:28:53 2016 +0200

    spoolss: add IDL for spoolss_LogJobInfoForBranchOffice.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 45748aeb593398a39c3c1db3b6047cee960e95b5
Author: Günther Deschner <[email protected]>
Date:   Mon Apr 7 15:47:43 2014 +0200

    pidl: in s3 server templates, support default HRESULT error returns.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

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

Summary of changes:
 libgpo/gpo_ini.c                            |  6 +-
 librpc/idl/spoolss.idl                      | 97 +++++++++++++++++++++++++++++
 pidl/lib/Parse/Pidl/Samba3/Template.pm      |  2 +
 selftest/knownfail                          |  1 +
 source3/registry/reg_backend_db.c           |  1 +
 source3/rpc_client/cli_winreg_spoolss.c     |  6 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c | 54 +++++++++++-----
 source3/rpcclient/cmd_spoolss.c             | 69 ++++++++++++++++++++
 source3/rpcclient/wscript_build             | 54 ++++++++++++++++
 source3/smbd/trans2.c                       | 14 +++--
 source3/wscript_build                       | 53 +---------------
 source4/torture/rpc/rpc.c                   |  2 +-
 source4/torture/rpc/spoolss.c               | 77 +++++++++++++++++++++++
 13 files changed, 357 insertions(+), 79 deletions(-)
 create mode 100644 source3/rpcclient/wscript_build


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_ini.c b/libgpo/gpo_ini.c
index a91bb92..c027612 100644
--- a/libgpo/gpo_ini.c
+++ b/libgpo/gpo_ini.c
@@ -197,12 +197,14 @@ NTSTATUS gp_inifile_getbool(struct gp_inifile_context 
*ctx, const char *key, boo
                return result;
        }
 
-       if (strequal(value, "Yes")) {
+       if (strequal(value, "Yes") ||
+           strequal(value, "True")) {
                if (ret) {
                        *ret = true;
                }
                return NT_STATUS_OK;
-       } else if (strequal(value, "No")) {
+       } else if (strequal(value, "No") ||
+                  strequal(value, "False")) {
                if (ret) {
                        *ret = false;
                }
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index ae10917..c9d9b36 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -3413,4 +3413,101 @@ cpp_quote("#define spoolss_security_descriptor 
security_descriptor")
                [out,ref] uint32 *pcProperties,
                [out,ref,size_is(,*pcProperties)] RPC_PrintNamedProperty 
**ppProperties
        );
+
+       /******************/
+       /* Function: 0x72 */
+       [todo] WERROR spoolss_72(
+       );
+
+       /******************/
+       /* Function: 0x73 */
+       [todo] WERROR spoolss_73(
+       );
+
+       /******************/
+       /* Function: 0x71 */
+       typedef enum {
+               kInvalidJobState = 0,
+               kLogJobPrinted = 1,
+               kLogJobRendered = 2,
+               kLogJobError = 3,
+               kLogJobPipelineError = 4,
+               kLogOfflineFileFull = 5
+       } EBranchOfficeJobEventType;
+
+       typedef struct {
+               DWORD Status;
+               [string,charset(UTF16)] uint16 *pDocumentName;
+               [string,charset(UTF16)] uint16 *pUserName;
+               [string,charset(UTF16)] uint16 *pMachineName;
+               [string,charset(UTF16)] uint16 *pPrinterName;
+               [string,charset(UTF16)] uint16 *pPortName;
+               hyper Size;
+               DWORD TotalPages;
+       } spoolss_BranchOfficeJobDataPrinted;
+
+       typedef struct {
+               hyper Size;
+               DWORD ICMMethod;
+               short Color;
+               short PrintQuality;
+               short YResolution;
+               short Copies;
+               short TTOption;
+       } spoolss_BranchOfficeJobDataRendered;
+
+       typedef struct {
+               WERROR LastError;
+               [string,charset(UTF16)] uint16 *pDocumentName;
+               [string,charset(UTF16)] uint16 *pUserName;
+               [string,charset(UTF16)] uint16 *pPrinterName;
+               [string,charset(UTF16)] uint16 *pDataType;
+               hyper TotalSize;
+               hyper PrintedSize;
+               DWORD TotalPages;
+               DWORD PrintedPages;
+               [string,charset(UTF16)] uint16 *pMachineName;
+               [string,charset(UTF16)] uint16 *pJobError;
+               [string,charset(UTF16)] uint16 *pErrorDescription;
+       } spoolss_BranchOfficeJobDataError;
+
+       typedef struct {
+               [string,charset(UTF16)] uint16 *pDocumentName;
+               [string,charset(UTF16)] uint16 *pPrinterName;
+               [string,charset(UTF16)] uint16 *pExtraErrorInfo;
+       } spoolss_BranchOfficeJobDataPipelineFailed;
+
+       typedef struct {
+               [string,charset(UTF16)] uint16 *pMachineName;
+       } spoolss_BranchOfficeLogOfflineFileFull;
+
+       typedef [ms_union,switch_type(EBranchOfficeJobEventType)] union {
+               [case(kLogJobPrinted)]
+                       spoolss_BranchOfficeJobDataPrinted LogJobPrinted;
+               [case(kLogJobRendered)]
+                       spoolss_BranchOfficeJobDataRendered LogJobRendered;
+               [case(kLogJobError)]
+                       spoolss_BranchOfficeJobDataError LogJobError;
+               [case(kLogJobPipelineError)]
+                       spoolss_BranchOfficeJobDataPipelineFailed 
LogPipelineFailed;
+               [case(kLogOfflineFileFull)]
+                       spoolss_BranchOfficeLogOfflineFileFull 
LogOfflineFileFull;
+       } spoolss_BranchOfficeJobInfo;
+
+       typedef struct {
+               EBranchOfficeJobEventType eEventType;
+               DWORD JobId;
+               [switch_is(eEventType)] spoolss_BranchOfficeJobInfo JobInfo;
+       } spoolss_BranchOfficeJobData;
+
+       typedef struct {
+               DWORD cJobDataEntries;
+               [size_is(cJobDataEntries)] spoolss_BranchOfficeJobData 
JobData[];
+       } spoolss_BranchOfficeJobDataContainer;
+
+       WERROR spoolss_LogJobInfoForBranchOffice(
+               [in,ref] policy_handle *hPrinter,
+               [in,ref] spoolss_BranchOfficeJobDataContainer 
*pBranchOfficeJobDataContainer
+       );
+
 }
diff --git a/pidl/lib/Parse/Pidl/Samba3/Template.pm 
b/pidl/lib/Parse/Pidl/Samba3/Template.pm
index 4750cef..d50f706 100644
--- a/pidl/lib/Parse/Pidl/Samba3/Template.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/Template.pm
@@ -70,6 +70,8 @@ $pad"."struct $fname *r)
                $res .= "\treturn NT_STATUS_NOT_IMPLEMENTED;\n";
        } elsif ($d->{RETURN_TYPE} eq "WERROR") {
                $res .= "\treturn WERR_NOT_SUPPORTED;\n";
+       } elsif ($d->{RETURN_TYPE} eq "HRESULT") {
+               $res .= "\treturn HRES_ERROR_NOT_SUPPORTED;\n";
        }
 
        $res .= "}
diff --git a/selftest/knownfail b/selftest/knownfail
index 1051518..076880f 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -180,6 +180,7 @@
 ^samba3.rpc.spoolss.printer.addprinter.driver_info_winreg # knownfail or 
flapping?
 ^samba3.rpc.spoolss.printer.addprinterex.driver_info_winreg # knownfail or 
flapping?
 ^samba3.rpc.spoolss.printer.*.publish_toggle\(.*\)$ # needs spoolss AD member 
env
+^samba3.rpc.spoolss.printer.*.log_jobinfo\(.*\)$ # not implemented yet
 ^samba3.rpc.spoolss.printserver.*.add_processor\(.*\)$
 ^samba3.rpc.spoolss.printserver.*.get_core_printer_drivers\(.*\)$
 ^samba3.rpc.spoolss.printserver.*.get_printer_driver_package_path\(.*\)$
diff --git a/source3/registry/reg_backend_db.c 
b/source3/registry/reg_backend_db.c
index bdfe7d2..45d74d5 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -126,6 +126,7 @@ static const char *builtin_registry_paths[] = {
        KEY_PRINTING "\\Forms",
        KEY_PRINTING "\\Printers",
        KEY_PRINTING "\\Environments\\Windows NT x86\\Print 
Processors\\winprint",
+       KEY_PRINTING "\\Environments\\Windows x64\\Print Processors\\winprint",
        KEY_SHARES,
        KEY_EVENTLOG,
        KEY_SMBCONF,
diff --git a/source3/rpc_client/cli_winreg_spoolss.c 
b/source3/rpc_client/cli_winreg_spoolss.c
index ac4fe86..8014e41 100644
--- a/source3/rpc_client/cli_winreg_spoolss.c
+++ b/source3/rpc_client/cli_winreg_spoolss.c
@@ -563,7 +563,7 @@ static WERROR winreg_printer_write_ver(TALLOC_CTX *mem_ctx,
        return result;
 }
 
-static WERROR winreg_printer_ver_to_dword(const char *str, uint64_t *data)
+static WERROR winreg_printer_ver_to_qword(const char *str, uint64_t *data)
 {
        unsigned int v1, v2, v3, v4;
 
@@ -3659,7 +3659,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
                                              "DriverVersion",
                                              &tmp_str);
                if (W_ERROR_IS_OK(result)) {
-                       result = winreg_printer_ver_to_dword(tmp_str,
+                       result = winreg_printer_ver_to_qword(tmp_str,
                                                &info8->driver_version);
                }
                CHECK_ERROR(result);
@@ -3727,7 +3727,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
                                              "MinInboxDriverVerVersion",
                                              &tmp_str);
                if (W_ERROR_IS_OK(result)) {
-                       result = winreg_printer_ver_to_dword(tmp_str,
+                       result = winreg_printer_ver_to_qword(tmp_str,
                                        &info8->min_inbox_driver_ver_version);
                }
                CHECK_ERROR(result);
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c 
b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 7413d9d..90aac33 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -1819,9 +1819,8 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
                                close_printer_handle(p, r->out.handle);
                                ZERO_STRUCTP(r->out.handle);
                                DEBUG(3,("access DENIED as user is not root, "
-                                       "has no printoperator privilege, "
-                                       "not a member of the printoperator 
builtin group and "
-                                       "is not in printer admin list"));
+                                       "has no printoperator privilege and is "
+                                       "not a member of the printoperator 
builtin group\n"));
                                return WERR_ACCESS_DENIED;
                        }
 
@@ -8439,18 +8438,6 @@ WERROR _spoolss_AddPrinterDriverEx(struct pipes_struct 
*p,
        WERROR err = WERR_OK;
        const char *driver_name = NULL;
        uint32_t version;
-       const char *fn;
-
-       switch (p->opnum) {
-               case NDR_SPOOLSS_ADDPRINTERDRIVER:
-                       fn = "_spoolss_AddPrinterDriver";
-                       break;
-               case NDR_SPOOLSS_ADDPRINTERDRIVEREX:
-                       fn = "_spoolss_AddPrinterDriverEx";
-                       break;
-               default:
-                       return WERR_INVALID_PARAM;
-       }
 
        /*
         * we only support the semantics of AddPrinterDriver()
@@ -8469,7 +8456,7 @@ WERROR _spoolss_AddPrinterDriverEx(struct pipes_struct *p,
        if (r->in.info_ctr->level != 3 &&
            r->in.info_ctr->level != 6 &&
            r->in.info_ctr->level != 8) {
-               DEBUG(0,("%s: level %d not yet implemented\n", fn,
+               DEBUG(0,("%s: level %d not yet implemented\n", __func__,
                        r->in.info_ctr->level));
                return WERR_UNKNOWN_LEVEL;
        }
@@ -8504,7 +8491,7 @@ WERROR _spoolss_AddPrinterDriverEx(struct pipes_struct *p,
 
        if (!srv_spoolss_drv_upgrade_printer(driver_name, p->msg_ctx)) {
                DEBUG(0,("%s: Failed to send message about upgrading driver 
[%s]!\n",
-                       fn, driver_name));
+                       __func__, driver_name));
        }
 
 done:
@@ -11303,3 +11290,36 @@ WERROR _spoolss_RpcEnumJobNamedProperties(struct 
pipes_struct *p,
        p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
        return WERR_NOT_SUPPORTED;
 }
+
+/****************************************************************
+ _spoolss_72
+****************************************************************/
+
+WERROR _spoolss_72(struct pipes_struct *p,
+                  struct spoolss_72 *r)
+{
+       p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_73
+****************************************************************/
+
+WERROR _spoolss_73(struct pipes_struct *p,
+                  struct spoolss_73 *r)
+{
+       p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
+       return WERR_NOT_SUPPORTED;
+}
+
+/****************************************************************
+ _spoolss_RpcLogJobInfoForBranchOffice
+****************************************************************/
+
+WERROR _spoolss_LogJobInfoForBranchOffice(struct pipes_struct *p,
+                                         struct 
spoolss_LogJobInfoForBranchOffice *r)
+{
+       p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
+       return WERR_NOT_SUPPORTED;
+}
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 3191e80..91f328e 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1600,6 +1600,74 @@ static WERROR cmd_spoolss_getdriverdir(struct 
rpc_pipe_client *cli,
 /****************************************************************************
 ****************************************************************************/
 
+static WERROR cmd_spoolss_getdriverpackagepath(struct rpc_pipe_client *cli,
+                                              TALLOC_CTX *mem_ctx,
+                                              int argc, const char **argv)
+{
+       HRESULT hresult;
+       NTSTATUS status;
+       const char *env = SPOOLSS_ARCHITECTURE_NT_X86;
+       uint32_t offered;
+       uint32_t needed;
+       struct dcerpc_binding_handle *b = cli->binding_handle;
+       const char *package_id = "";
+       const char *cab = NULL;
+
+       if (argc > 4) {
+               printf("Usage: %s [environment] [package_id]\n", argv[0]);
+               return WERR_OK;
+       }
+
+       /* Get the arguments need to open the printer handle */
+
+       if (argc >= 2) {
+               env = argv[1];
+       }
+
+       if (argc == 3) {
+               package_id = argv[2];
+       }
+
+       offered = 1;
+       cab = talloc_array(mem_ctx, char, offered);
+       status = dcerpc_spoolss_GetPrinterDriverPackagePath(b, mem_ctx,
+                                                           cli->srv_name_slash,
+                                                           env,
+                                                           NULL,
+                                                           package_id,
+                                                           cab,
+                                                           offered,
+                                                           &needed,
+                                                           &hresult);
+       if (!NT_STATUS_IS_OK(status)) {
+               return ntstatus_to_werror(status);
+       }
+
+       if (W_ERROR_EQUAL(W_ERROR(WIN32_FROM_HRESULT(hresult)), 
WERR_INSUFFICIENT_BUFFER)) {
+               offered = needed;
+               cab = talloc_zero_array(mem_ctx, char, offered);
+
+               status = dcerpc_spoolss_GetPrinterDriverPackagePath(b, mem_ctx,
+                                                                   
cli->srv_name_slash,
+                                                                   env,
+                                                                   NULL,
+                                                                   package_id,
+                                                                   cab,
+                                                                   offered,
+                                                                   &needed,
+                                                                   &hresult);
+               if (!NT_STATUS_IS_OK(status)) {
+                       return ntstatus_to_werror(status);
+               }
+       }
+
+       return W_ERROR(WIN32_FROM_HRESULT(hresult));
+}
+
+
+/****************************************************************************
+****************************************************************************/
+
 static void set_drv_info_3_env(TALLOC_CTX *mem_ctx,
                               struct spoolss_AddDriverInfo3 *info,
                               const char *arch)
@@ -3866,6 +3934,7 @@ struct cmd_set spoolss_commands[] = {
        { "getdataex",          RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_getprinterdataex,   &ndr_table_spoolss, NULL, "Get printer driver 
data with keyname", ""},
        { "getdriver",          RPC_RTYPE_WERROR, NULL, cmd_spoolss_getdriver,  
        &ndr_table_spoolss, NULL, "Get print driver information",        "" },
        { "getdriverdir",       RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_getdriverdir,       &ndr_table_spoolss, NULL, "Get print driver 
upload directory",   "" },
+       { "getdriverpackagepath", RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_getdriverpackagepath,     &ndr_table_spoolss, NULL, "Get print 
driver package download directory",   "" },
        { "getprinter",         RPC_RTYPE_WERROR, NULL, cmd_spoolss_getprinter, 
        &ndr_table_spoolss, NULL, "Get printer info",                    "" },
        { "openprinter",        RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_open_printer,       &ndr_table_spoolss, NULL, "Open printer 
handle",                 "" },
        { "openprinter_ex",     RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_open_printer_ex,    &ndr_table_spoolss, NULL, "Open printer 
handle",                 "" },
diff --git a/source3/rpcclient/wscript_build b/source3/rpcclient/wscript_build
new file mode 100644
index 0000000..3e8791d
--- /dev/null
+++ b/source3/rpcclient/wscript_build
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+bld.SAMBA3_BINARY('rpcclient',
+                 source='''rpcclient.c
+                 cmd_lsarpc.c
+                 cmd_samr.c
+                 cmd_spoolss.c
+                 cmd_netlogon.c
+                 cmd_srvsvc.c
+                 cmd_dfs.c
+                 cmd_epmapper.c
+                 cmd_dssetup.c
+                 cmd_echo.c
+                 cmd_shutdown.c
+                 cmd_test.c
+                 cmd_wkssvc.c
+                 cmd_ntsvcs.c
+                 cmd_drsuapi.c
+                 cmd_eventlog.c
+                 cmd_winreg.c
+                 cmd_fss.c
+                 cmd_clusapi.c
+                 cmd_witness.c
+                ''',
+                 deps='''
+                 talloc
+                 popt_samba3
+                 pdb
+                 libsmb
+                 param
+                 ndr-standard
+                 msrpc3
+                 SMBREADLINE
+                 trusts_util
+                 RPC_NDR_WINREG
+                 RPC_NDR_ECHO
+                 RPC_CLIENT_SCHANNEL
+                 DCUTIL
+                 LIBCLI_SAMR
+                 libcli_lsa3
+                 libcli_netlogon3
+                 cli_spoolss
+                 RPC_NDR_SRVSVC
+                 RPC_NDR_WKSSVC
+                 RPC_NDR_DSSETUP
+                 RPC_NDR_DFS
+                 RPC_NDR_DRSUAPI
+                 RPC_NDR_NTSVCS
+                 RPC_NDR_EVENTLOG
+                 INIT_SAMR
+                 RPC_NDR_FSRVP
+                 RPC_NDR_CLUSAPI
+                 RPC_NDR_WITNESS
+                 ''')
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 1775316..6999b2d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -55,7 +55,7 @@ static char *store_file_unix_basic_info2(connection_struct 
*conn,
                                const SMB_STRUCT_STAT *psbuf);
 
 /****************************************************************************
- Check if an open file handle or pathname is a symlink.
+ Check if an open file handle or smb_fname is a symlink.
 ****************************************************************************/
 
 static NTSTATUS refuse_symlink(connection_struct *conn,
@@ -68,6 +68,10 @@ static NTSTATUS refuse_symlink(connection_struct *conn,
        if (fsp) {
                pst = &fsp->fsp_name->st;
        } else {
+               pst = &smb_fname->st;
+       }
+
+       if (!VALID_STAT(*pst)) {
                int ret = vfs_stat_smb_basename(conn,
                                smb_fname,
                                &sbuf);
@@ -76,6 +80,7 @@ static NTSTATUS refuse_symlink(connection_struct *conn,
                }
                pst = &sbuf;
        }
+
        if (S_ISLNK(pst->st_ex_mode)) {
                return NT_STATUS_ACCESS_DENIED;
        }
@@ -5767,7 +5772,8 @@ static void call_trans2qfilepathinfo(connection_struct 
*conn,
                        }
                        if (info_level == SMB_QUERY_FILE_UNIX_BASIC ||
                                        info_level == SMB_QUERY_FILE_UNIX_INFO2 
||
-                                       info_level == SMB_QUERY_FILE_UNIX_LINK) 
{
+                                       info_level == SMB_QUERY_FILE_UNIX_LINK 
||
+                                       req->posix_pathnames) {
                                ucf_flags |= UCF_UNIX_NAME_LOOKUP;
                        }
                }
@@ -5831,7 +5837,7 @@ static void call_trans2qfilepathinfo(connection_struct 
*conn,
                                return;
                        }
 
-                       if (INFO_LEVEL_IS_UNIX(info_level)) {
+                       if (INFO_LEVEL_IS_UNIX(info_level) || 
req->posix_pathnames) {
                                /* Always do lstat for UNIX calls. */
                                if (SMB_VFS_LSTAT(conn, smb_fname_base) != 0) {
                                        DEBUG(3,("call_trans2qfilepathinfo: "
@@ -5877,7 +5883,7 @@ static void call_trans2qfilepathinfo(connection_struct 
*conn,
                        }
                }
 
-               if (INFO_LEVEL_IS_UNIX(info_level)) {
+               if (INFO_LEVEL_IS_UNIX(info_level) || req->posix_pathnames) {
                        /* Always do lstat for UNIX calls. */
                        if (SMB_VFS_LSTAT(conn, smb_fname)) {
                                DEBUG(3,("call_trans2qfilepathinfo: "
diff --git a/source3/wscript_build b/source3/wscript_build
index e25b8d5..a59927a 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -998,58 +998,6 @@ bld.SAMBA3_BINARY('winbindd/winbindd',
                  enabled=bld.env.build_winbind,
                  install_path='${SBINDIR}')
 


-- 
Samba Shared Repository

Reply via email to