The Samba-Bugzilla – Attachment 4862 Details for
Bug 6769
symlink unlink does nothing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Further fix for 3.4.3.
look (text/plain), 4.79 KB, created by
Jeremy Allison
on 2009-10-16 19:19:06 UTC
(
hide
)
Description:
Further fix for 3.4.3.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-10-16 19:19:06 UTC
Size:
4.79 KB
patch
obsolete
>diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c >index 462e593..e58b294 100644 >--- a/source3/modules/nfs4_acls.c >+++ b/source3/modules/nfs4_acls.c >@@ -165,10 +165,16 @@ static int smbacl4_GetFileOwner(struct connection_struct *conn, > const char *filename, > SMB_STRUCT_STAT *psbuf) > { >+ int ret; > memset(psbuf, 0, sizeof(SMB_STRUCT_STAT)); > > /* Get the stat struct for the owner info. */ >- if (SMB_VFS_STAT(conn, filename, psbuf) != 0) >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(conn, filename, psbuf); >+ } else { >+ ret = SMB_VFS_STAT(conn, filename, psbuf); >+ } >+ if (ret == -1) > { > DEBUG(8, ("SMB_VFS_STAT failed with error %s\n", > strerror(errno))); >diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c >index 8c89d2f..9588c2d 100644 >--- a/source3/modules/vfs_afsacl.c >+++ b/source3/modules/vfs_afsacl.c >@@ -660,9 +660,15 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl, > struct security_descriptor **ppdesc) > { > SMB_STRUCT_STAT sbuf; >+ int ret; > > /* Get the stat struct for the owner info. */ >- if(SMB_VFS_STAT(conn, name, &sbuf) != 0) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(conn, name, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(conn, name, &sbuf); >+ } >+ if (ret == -1) { > return 0; > } > >diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c >index f929340..e75a9c6 100644 >--- a/source3/modules/vfs_hpuxacl.c >+++ b/source3/modules/vfs_hpuxacl.c >@@ -248,7 +248,13 @@ int hpuxacl_sys_acl_set_file(vfs_handle_struct *handle, > * that has _not_ been specified in "type" from the file first > * and concatenate it with the acl provided. > */ >- if (SMB_VFS_STAT(handle->conn, name, &s) != 0) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, name, &s); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, name, &s); >+ } >+ >+ if (ret != 0) { > DEBUG(10, ("Error in stat call: %s\n", strerror(errno))); > goto done; > } >diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c >index 4e37ed6..3fe8f6d 100644 >--- a/source3/modules/vfs_xattr_tdb.c >+++ b/source3/modules/vfs_xattr_tdb.c >@@ -212,10 +212,17 @@ static ssize_t xattr_tdb_getxattr(struct vfs_handle_struct *handle, > SMB_STRUCT_STAT sbuf; > struct file_id id; > struct db_context *db; >+ int ret; > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } > >@@ -334,10 +341,17 @@ static int xattr_tdb_setxattr(struct vfs_handle_struct *handle, > SMB_STRUCT_STAT sbuf; > struct file_id id; > struct db_context *db; >+ int ret; > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } > >@@ -439,10 +453,17 @@ static ssize_t xattr_tdb_listxattr(struct vfs_handle_struct *handle, > SMB_STRUCT_STAT sbuf; > struct file_id id; > struct db_context *db; >+ int ret; > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } > >@@ -539,10 +560,17 @@ static int xattr_tdb_removexattr(struct vfs_handle_struct *handle, > SMB_STRUCT_STAT sbuf; > struct file_id id; > struct db_context *db; >+ int ret; > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } > >@@ -621,7 +649,13 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle, const char *path) > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } > >@@ -660,7 +694,13 @@ static int xattr_tdb_rmdir(vfs_handle_struct *handle, const char *path) > > SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1); > >- if (SMB_VFS_STAT(handle->conn, path, &sbuf) == -1) { >+ if (lp_posix_pathnames()) { >+ ret = SMB_VFS_LSTAT(handle->conn, path, &sbuf); >+ } else { >+ ret = SMB_VFS_STAT(handle->conn, path, &sbuf); >+ } >+ >+ if (ret == -1) { > return -1; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6769
:
4770
|
4771
|
4772
|
4792
|
4793
|
4796
|
4797
|
4801
|
4802
|
4811
|
4822
|
4823
|
4824
| 4862