summaryrefslogtreecommitdiff
path: root/source4/lib/policy
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 20:23:56 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 20:25:00 +0200
commit26bcbf6e3542fb350045888473a6e25d661ff6fa (patch)
treebe3bc04e11d0686f89bdcb970746c3f9628240d6 /source4/lib/policy
parent91c49c2fb29a188db24695a78b365aeb4f51db27 (diff)
downloadsamba-26bcbf6e3542fb350045888473a6e25d661ff6fa.tar.gz
samba-26bcbf6e3542fb350045888473a6e25d661ff6fa.tar.bz2
samba-26bcbf6e3542fb350045888473a6e25d661ff6fa.zip
s4:libpolicy - Solaris compatibility fix
Diffstat (limited to 'source4/lib/policy')
-rw-r--r--source4/lib/policy/gp_filesys.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/policy/gp_filesys.c b/source4/lib/policy/gp_filesys.c
index 78b5c336ea..51bdbfd2d6 100644
--- a/source4/lib/policy/gp_filesys.c
+++ b/source4/lib/policy/gp_filesys.c
@@ -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);