Last 2 VFS_STAT -> LSTAT fixes I can see in the modules code.
authorJeremy Allison <jra@samba.org>
Sat, 17 Oct 2009 00:20:40 +0000 (17:20 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 17 Oct 2009 00:20:40 +0000 (17:20 -0700)
Jeremy.

source3/modules/vfs_afsacl.c
source3/modules/vfs_hpuxacl.c

index 1c310c7185983dc6bb3db02125ddccaf4b731181..4666be2aa31a5a25c9084586f0417ca71aee8e3a 100644 (file)
@@ -659,8 +659,15 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl,
                            uint32 security_info,
                            struct security_descriptor **ppdesc)
 {
                            uint32 security_info,
                            struct security_descriptor **ppdesc)
 {
+       int ret;
+
        /* Get the stat struct for the owner info. */
        /* Get the stat struct for the owner info. */
-       if(SMB_VFS_STAT(conn, smb_fname) != 0) {
+       if (lp_posix_pathnames()) {
+               ret = SMB_VFS_LSTAT(conn, smb_fname);
+       } else {
+               ret = SMB_VFS_STAT(conn, smb_fname);
+       }
+       if (ret == -1) {
                return 0;
        }
 
                return 0;
        }
 
index df70f1ea08c22c3cce5ce77b34d96a5297490f8f..5a54f79da360f556b6d8146030bde0ed1b6fb7fa 100644 (file)
@@ -255,7 +255,12 @@ 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.
         */
         * that has _not_ been specified in "type" from the file first 
         * and concatenate it with the acl provided.
         */
-       if (SMB_VFS_STAT(handle->conn, smb_fname) != 0) {
+       if (lp_posix_pathnames()) {
+               ret = SMB_VFS_LSTAT(handle->conn, smb_fname);
+       } else {
+               ret = SMB_VFS_STAT(handle->conn, smb_fname);
+       }
+       if (ret != 0) {
                DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
                goto done;
        }
                DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
                goto done;
        }