The branch, master has been updated
       via  58715dd... s4:libpolicy - fix printf output specifiers to suppress 
warning
       via  26bcbf6... s4:libpolicy - Solaris compatibility fix
      from  91c49c2... s4:ldap.py - test subtree deletes through a new testcase

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


- Log -----------------------------------------------------------------
commit 58715dd3652ba53fa85cb5457be5d8c607b3d798
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Sun Jun 20 20:34:48 2010 +0200

    s4:libpolicy - fix printf output specifiers to suppress warning

commit 26bcbf6e3542fb350045888473a6e25d661ff6fa
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Sun Jun 20 20:23:56 2010 +0200

    s4:libpolicy - Solaris compatibility fix

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

Summary of changes:
 source4/lib/policy/gp_filesys.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/policy/gp_filesys.c b/source4/lib/policy/gp_filesys.c
index 78b5c33..b932ee5 100644
--- a/source4/lib/policy/gp_filesys.c
+++ b/source4/lib/policy/gp_filesys.c
@@ -254,7 +254,7 @@ static NTSTATUS gp_get_file (struct smbcli_tree *tree, 
const char *remote_src,
        /* Bytes read should match the file size, or the copy was incomplete */
        if (nread != file_size) {
                DEBUG(0, ("Remote/local file size mismatch after copying file: "
-                         "%s (remote %ld, local %ld).\n",
+                         "%s (remote %zu, local %zu).\n",
                          remote_src, file_size, nread));
                talloc_free(buf);
                return NT_STATUS_UNSUCCESSFUL;
@@ -402,6 +402,7 @@ static NTSTATUS push_recursive (struct gp_context *gp_ctx, 
const char *local_pat
        int local_fd, remote_fd;
        int buf[1024];
        int nread, total_read;
+       struct stat s;
 
        dir = opendir(local_path);
        while ((dirent = readdir(dir)) != NULL) {
@@ -418,7 +419,10 @@ static NTSTATUS push_recursive (struct gp_context *gp_ctx, 
const char *local_pat
                                                    remote_path, 
dirent->d_name);
                NT_STATUS_HAVE_NO_MEMORY(entry_remote_path);
 
-               if (dirent->d_type == DT_DIR) {
+               if (stat(dirent->d_name, &s) != 0) {
+                       return NT_STATUS_UNSUCCESSFUL;
+               }
+               if (s.st_mode & S_IFDIR) {
                        DEBUG(6, ("Pushing directory %s to %s on sysvol\n",
                                  entry_local_path, entry_remote_path));
                        smbcli_mkdir(gp_ctx->cli->tree, entry_remote_path);


-- 
Samba Shared Repository

Reply via email to