@@ -666,7 +666,7 @@ static void mode_to_access_flags(umode_t mode, umode_t bits_to_use,
666666 return ;
667667}
668668
669- static __u16 cifs_copy_ace (struct cifs_ace * dst , struct cifs_ace * src , struct smb_sid * psid )
669+ static __u16 cifs_copy_ace (struct smb_ace * dst , struct smb_ace * src , struct smb_sid * psid )
670670{
671671 __u16 size = 1 + 1 + 2 + 4 ;
672672
@@ -685,7 +685,7 @@ static __u16 cifs_copy_ace(struct cifs_ace *dst, struct cifs_ace *src, struct sm
685685 return size ;
686686}
687687
688- static __u16 fill_ace_for_sid (struct cifs_ace * pntace ,
688+ static __u16 fill_ace_for_sid (struct smb_ace * pntace ,
689689 const struct smb_sid * psid , __u64 nmode ,
690690 umode_t bits , __u8 access_type ,
691691 bool allow_delete_child )
@@ -723,7 +723,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
723723
724724
725725#ifdef CONFIG_CIFS_DEBUG2
726- static void dump_ace (struct cifs_ace * pace , char * end_of_acl )
726+ static void dump_ace (struct smb_ace * pace , char * end_of_acl )
727727{
728728 int num_subauth ;
729729
@@ -766,7 +766,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
766766 int num_aces = 0 ;
767767 int acl_size ;
768768 char * acl_base ;
769- struct cifs_ace * * ppace ;
769+ struct smb_ace * * ppace ;
770770
771771 /* BB need to add parm so we can store the SID BB */
772772
@@ -799,15 +799,15 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
799799 if (num_aces > 0 ) {
800800 umode_t denied_mode = 0 ;
801801
802- if (num_aces > ULONG_MAX / sizeof (struct cifs_ace * ))
802+ if (num_aces > ULONG_MAX / sizeof (struct smb_ace * ))
803803 return ;
804- ppace = kmalloc_array (num_aces , sizeof (struct cifs_ace * ),
804+ ppace = kmalloc_array (num_aces , sizeof (struct smb_ace * ),
805805 GFP_KERNEL );
806806 if (!ppace )
807807 return ;
808808
809809 for (i = 0 ; i < num_aces ; ++ i ) {
810- ppace [i ] = (struct cifs_ace * ) (acl_base + acl_size );
810+ ppace [i ] = (struct smb_ace * ) (acl_base + acl_size );
811811#ifdef CONFIG_CIFS_DEBUG2
812812 dump_ace (ppace [i ], end_of_acl );
813813#endif
@@ -849,7 +849,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
849849
850850/* memcpy((void *)(&(cifscred->aces[i])),
851851 (void *)ppace[i],
852- sizeof(struct cifs_ace )); */
852+ sizeof(struct smb_ace )); */
853853
854854 acl_base = (char * )ppace [i ];
855855 acl_size = le16_to_cpu (ppace [i ]-> size );
@@ -861,7 +861,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
861861 return ;
862862}
863863
864- unsigned int setup_authusers_ACE (struct cifs_ace * pntace )
864+ unsigned int setup_authusers_ACE (struct smb_ace * pntace )
865865{
866866 int i ;
867867 unsigned int ace_size = 20 ;
@@ -885,7 +885,7 @@ unsigned int setup_authusers_ACE(struct cifs_ace *pntace)
885885 * Fill in the special SID based on the mode. See
886886 * https://technet.microsoft.com/en-us/library/hh509017(v=ws.10).aspx
887887 */
888- unsigned int setup_special_mode_ACE (struct cifs_ace * pntace , __u64 nmode )
888+ unsigned int setup_special_mode_ACE (struct smb_ace * pntace , __u64 nmode )
889889{
890890 int i ;
891891 unsigned int ace_size = 28 ;
@@ -907,7 +907,7 @@ unsigned int setup_special_mode_ACE(struct cifs_ace *pntace, __u64 nmode)
907907 return ace_size ;
908908}
909909
910- unsigned int setup_special_user_owner_ACE (struct cifs_ace * pntace )
910+ unsigned int setup_special_user_owner_ACE (struct smb_ace * pntace )
911911{
912912 int i ;
913913 unsigned int ace_size = 28 ;
@@ -944,17 +944,17 @@ static void populate_new_aces(char *nacl_base,
944944 __u64 deny_user_mode = 0 ;
945945 __u64 deny_group_mode = 0 ;
946946 bool sticky_set = false;
947- struct cifs_ace * pnntace = NULL ;
947+ struct smb_ace * pnntace = NULL ;
948948
949949 nmode = * pnmode ;
950950 num_aces = * pnum_aces ;
951951 nsize = * pnsize ;
952952
953953 if (modefromsid ) {
954- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
954+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
955955 nsize += setup_special_mode_ACE (pnntace , nmode );
956956 num_aces ++ ;
957- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
957+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
958958 nsize += setup_authusers_ACE (pnntace );
959959 num_aces ++ ;
960960 goto set_size ;
@@ -992,39 +992,39 @@ static void populate_new_aces(char *nacl_base,
992992 sticky_set = true;
993993
994994 if (deny_user_mode ) {
995- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
995+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
996996 nsize += fill_ace_for_sid (pnntace , pownersid , deny_user_mode ,
997997 0700 , ACCESS_DENIED , false);
998998 num_aces ++ ;
999999 }
10001000
10011001 /* Group DENY ACE does not conflict with owner ALLOW ACE. Keep in preferred order*/
10021002 if (deny_group_mode && !(deny_group_mode & (user_mode >> 3 ))) {
1003- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1003+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10041004 nsize += fill_ace_for_sid (pnntace , pgrpsid , deny_group_mode ,
10051005 0070 , ACCESS_DENIED , false);
10061006 num_aces ++ ;
10071007 }
10081008
1009- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1009+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10101010 nsize += fill_ace_for_sid (pnntace , pownersid , user_mode ,
10111011 0700 , ACCESS_ALLOWED , true);
10121012 num_aces ++ ;
10131013
10141014 /* Group DENY ACE conflicts with owner ALLOW ACE. So keep it after. */
10151015 if (deny_group_mode && (deny_group_mode & (user_mode >> 3 ))) {
1016- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1016+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10171017 nsize += fill_ace_for_sid (pnntace , pgrpsid , deny_group_mode ,
10181018 0070 , ACCESS_DENIED , false);
10191019 num_aces ++ ;
10201020 }
10211021
1022- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1022+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10231023 nsize += fill_ace_for_sid (pnntace , pgrpsid , group_mode ,
10241024 0070 , ACCESS_ALLOWED , !sticky_set );
10251025 num_aces ++ ;
10261026
1027- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1027+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10281028 nsize += fill_ace_for_sid (pnntace , & sid_everyone , other_mode ,
10291029 0007 , ACCESS_ALLOWED , !sticky_set );
10301030 num_aces ++ ;
@@ -1040,11 +1040,11 @@ static __u16 replace_sids_and_copy_aces(struct smb_acl *pdacl, struct smb_acl *p
10401040{
10411041 int i ;
10421042 u16 size = 0 ;
1043- struct cifs_ace * pntace = NULL ;
1043+ struct smb_ace * pntace = NULL ;
10441044 char * acl_base = NULL ;
10451045 u32 src_num_aces = 0 ;
10461046 u16 nsize = 0 ;
1047- struct cifs_ace * pnntace = NULL ;
1047+ struct smb_ace * pnntace = NULL ;
10481048 char * nacl_base = NULL ;
10491049 u16 ace_size = 0 ;
10501050
@@ -1057,8 +1057,8 @@ static __u16 replace_sids_and_copy_aces(struct smb_acl *pdacl, struct smb_acl *p
10571057
10581058 /* Go through all the ACEs */
10591059 for (i = 0 ; i < src_num_aces ; ++ i ) {
1060- pntace = (struct cifs_ace * ) (acl_base + size );
1061- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1060+ pntace = (struct smb_ace * ) (acl_base + size );
1061+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
10621062
10631063 if (pnownersid && compare_sids (& pntace -> sid , pownersid ) == 0 )
10641064 ace_size = cifs_copy_ace (pnntace , pntace , pnownersid );
@@ -1080,11 +1080,11 @@ static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
10801080{
10811081 int i ;
10821082 u16 size = 0 ;
1083- struct cifs_ace * pntace = NULL ;
1083+ struct smb_ace * pntace = NULL ;
10841084 char * acl_base = NULL ;
10851085 u32 src_num_aces = 0 ;
10861086 u16 nsize = 0 ;
1087- struct cifs_ace * pnntace = NULL ;
1087+ struct smb_ace * pnntace = NULL ;
10881088 char * nacl_base = NULL ;
10891089 u32 num_aces = 0 ;
10901090 bool new_aces_set = false;
@@ -1108,7 +1108,7 @@ static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
11081108
11091109 /* Retain old ACEs which we can retain */
11101110 for (i = 0 ; i < src_num_aces ; ++ i ) {
1111- pntace = (struct cifs_ace * ) (acl_base + size );
1111+ pntace = (struct smb_ace * ) (acl_base + size );
11121112
11131113 if (!new_aces_set && (pntace -> flags & INHERITED_ACE )) {
11141114 /* Place the new ACEs in between existing explicit and inherited */
@@ -1130,7 +1130,7 @@ static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
11301130 }
11311131
11321132 /* update the pointer to the next ACE to populate*/
1133- pnntace = (struct cifs_ace * ) (nacl_base + nsize );
1133+ pnntace = (struct smb_ace * ) (nacl_base + nsize );
11341134
11351135 nsize += cifs_copy_ace (pnntace , pntace , NULL );
11361136 num_aces ++ ;
@@ -1625,9 +1625,9 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
16251625 nsecdesclen = secdesclen ;
16261626 if (pnmode && * pnmode != NO_CHANGE_64 ) { /* chmod */
16271627 if (mode_from_sid )
1628- nsecdesclen += 2 * sizeof (struct cifs_ace );
1628+ nsecdesclen += 2 * sizeof (struct smb_ace );
16291629 else /* cifsacl */
1630- nsecdesclen += 5 * sizeof (struct cifs_ace );
1630+ nsecdesclen += 5 * sizeof (struct smb_ace );
16311631 } else { /* chown */
16321632 /* When ownership changes, changes new owner sid length could be different */
16331633 nsecdesclen = sizeof (struct smb_ntsd ) + (sizeof (struct smb_sid ) * 2 );
@@ -1636,7 +1636,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
16361636 dacl_ptr = (struct smb_acl * )((char * )pntsd + dacloffset );
16371637 if (mode_from_sid )
16381638 nsecdesclen +=
1639- le32_to_cpu (dacl_ptr -> num_aces ) * sizeof (struct cifs_ace );
1639+ le32_to_cpu (dacl_ptr -> num_aces ) * sizeof (struct smb_ace );
16401640 else /* cifsacl */
16411641 nsecdesclen += le16_to_cpu (dacl_ptr -> size );
16421642 }
0 commit comments