Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d61e5808d9a4e7c7f25914ceae50664a6454c3ca
Commit: d61e5808d9a4e7c7f25914ceae50664a6454c3ca
Parent: 630f3f0c45a80ab907d216191ef4a205c249fa1b
Author: Steve French <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 04:32:43 2007 +0000
Committer: Steve French <[EMAIL PROTECTED]>
CommitDate: Fri Oct 26 04:32:43 2007 +0000
[CIFS] acl support part 7
Also fixes typo, build break
Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
fs/cifs/cifsacl.c | 21 ++++++++++++++++++---
fs/cifs/cifsacl.h | 2 +-
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 14200bd..3a2d67b 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -134,14 +134,29 @@ int compare_sids(const struct cifs_sid *ctsid, const
struct cifs_sid *cwsid)
pmode is the existing mode (we only want to overwrite part of this
bits to set can be: S_IRWXU, S_IRWXG or S_IRWXO ie 00700 or 00070 or 00007
*/
-static void access_flags_to_mode(__u32 access_flags, umode_t * pmode,
+static void access_flags_to_mode(__u32 ace_flags, umode_t *pmode,
umode_t bits_to_set)
{
+ *pmode &= ~bits_to_set;
+
+ if (ace_flags & GENERIC_ALL) {
+ *pmode |= (S_IRWXUGO & bits_to_set);
#ifdef CONFIG_CIFS_DEBUG2
- cFYI(1, ("access flags 0x%x mode now 0x%x", access_flags, *pmode);
+ cFYI(1, ("all perms"));
#endif
+ return;
+ }
+ if ((ace_flags & GENERIC_WRITE) || (ace_flags & FILE_WRITE_RIGHTS))
+ *pmode |= (S_IWUGO & bits_to_set);
+ if ((ace_flags & GENERIC_READ) || (ace_flags & FILE_READ_RIGHTS))
+ *pmode |= (S_IRUGO & bits_to_set);
+ if ((ace_flags & GENERIC_EXECUTE) || (ace_flags & FILE_EXEC_RIGHTS))
+ *pmode |= (S_IXUGO & bits_to_set);
+#ifdef CONFIG_CIFS_DEBUG2
+ cFYI(1, ("access flags 0x%x mode now 0x%x", ace_flags, *pmode);
+#endif
return;
}
@@ -242,7 +257,7 @@ static void parse_ace(struct cifs_ace *pace, char
*end_of_acl)
static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
- struct cifs_sid *pownersid, struct cifs_sid *pgrpsid
+ struct cifs_sid *pownersid, struct cifs_sid *pgrpsid,
struct inode *inode)
{
int i;
diff --git a/fs/cifs/cifsacl.h b/fs/cifs/cifsacl.h
index 06d5200..30b0caf 100644
--- a/fs/cifs/cifsacl.h
+++ b/fs/cifs/cifsacl.h
@@ -73,7 +73,7 @@ struct cifs_wksid {
#ifdef CONFIG_CIFS_EXPERIMENTAL
extern int match_sid(struct cifs_sid *);
-extern int compare_sids(struct cifs_sid *, struct cifs_sid *);
+extern int compare_sids(const struct cifs_sid *, const struct cifs_sid *);
#endif /* CONFIG_CIFS_EXPERIMENTAL */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html