Bugzilla – Attachment 53691 Details for
Bug 43095
File access rights are not determined correctly (OpenAFS, ACLs)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to allow the use of real access() calls
libreoffice-real-access.patch (text/plain), 1.56 KB, created by
Moritz Bechler
on 2011-11-19 11:43:11 UTC
(
hide
)
Description:
Patch to allow the use of real access() calls
Filename:
MIME Type:
Creator:
Moritz Bechler
Created:
2011-11-19 11:43:11 UTC
Size:
1.56 KB
patch
obsolete
>--- file_stat.cxx.orig 2011-11-19 20:36:46.000000001 +0100 >+++ file_stat.cxx 2011-11-19 20:38:58.000000001 +0100 >@@ -165,6 +165,22 @@ > } > } > >+ /* contrary to what is stated above the use of access calls >+ is required on network file systems not using unix semantics >+ (AFS) >+ */ >+ inline void set_file_access_real_rights(const rtl::OUString& file_path, oslFileStatus* pStat) >+ { >+ pStat->uValidFields |= osl_FileStatus_Mask_Attributes; >+ >+ if (access_u(file_path.pData, W_OK) < 0) >+ pStat->uAttributes |= osl_File_Attribute_ReadOnly; >+ >+ if (access_u(file_path.pData, X_OK) == 0) >+ pStat->uAttributes |= osl_File_Attribute_Executable; >+ } >+ >+ > inline void set_file_hidden_status(const rtl::OUString& file_path, oslFileStatus* pStat) > { > pStat->uAttributes = osl::systemPathIsHiddenFileOrDirectoryEntry(file_path) ? osl_File_Attribute_Hidden : 0; >@@ -179,10 +195,15 @@ > set_file_hidden_status(file_path, pStat); > set_file_access_mask(file_stat, pStat); > >+#ifdef FAKE_ACCESS_RIGHTS > // we set the file access rights only on demand > // because it's potentially expensive > if (uFieldMask & osl_FileStatus_Mask_Attributes) > set_file_access_rights(file_stat, pStat); >+#else >+ if (uFieldMask & osl_FileStatus_Mask_Attributes) >+ set_file_access_real_rights(file_path, pStat); >+#endif > } > > inline void set_file_access_time(const struct stat& file_stat, oslFileStatus* pStat)
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 43095
: 53691