@@ -758,7 +758,7 @@ static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
758
758
}
759
759
#endif
760
760
761
- static void parse_dacl (struct cifs_acl * pdacl , char * end_of_acl ,
761
+ static void parse_dacl (struct smb_acl * pdacl , char * end_of_acl ,
762
762
struct smb_sid * pownersid , struct smb_sid * pgrpsid ,
763
763
struct cifs_fattr * fattr , bool mode_from_special_sid )
764
764
{
@@ -793,7 +793,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
793
793
fattr -> cf_mode &= ~(0777 );
794
794
795
795
acl_base = (char * )pdacl ;
796
- acl_size = sizeof (struct cifs_acl );
796
+ acl_size = sizeof (struct smb_acl );
797
797
798
798
num_aces = le32_to_cpu (pdacl -> num_aces );
799
799
if (num_aces > 0 ) {
@@ -1034,7 +1034,7 @@ static void populate_new_aces(char *nacl_base,
1034
1034
* pnsize = nsize ;
1035
1035
}
1036
1036
1037
- static __u16 replace_sids_and_copy_aces (struct cifs_acl * pdacl , struct cifs_acl * pndacl ,
1037
+ static __u16 replace_sids_and_copy_aces (struct smb_acl * pdacl , struct smb_acl * pndacl ,
1038
1038
struct smb_sid * pownersid , struct smb_sid * pgrpsid ,
1039
1039
struct smb_sid * pnownersid , struct smb_sid * pngrpsid )
1040
1040
{
@@ -1049,11 +1049,11 @@ static __u16 replace_sids_and_copy_aces(struct cifs_acl *pdacl, struct cifs_acl
1049
1049
u16 ace_size = 0 ;
1050
1050
1051
1051
acl_base = (char * )pdacl ;
1052
- size = sizeof (struct cifs_acl );
1052
+ size = sizeof (struct smb_acl );
1053
1053
src_num_aces = le32_to_cpu (pdacl -> num_aces );
1054
1054
1055
1055
nacl_base = (char * )pndacl ;
1056
- nsize = sizeof (struct cifs_acl );
1056
+ nsize = sizeof (struct smb_acl );
1057
1057
1058
1058
/* Go through all the ACEs */
1059
1059
for (i = 0 ; i < src_num_aces ; ++ i ) {
@@ -1074,7 +1074,7 @@ static __u16 replace_sids_and_copy_aces(struct cifs_acl *pdacl, struct cifs_acl
1074
1074
return nsize ;
1075
1075
}
1076
1076
1077
- static int set_chmod_dacl (struct cifs_acl * pdacl , struct cifs_acl * pndacl ,
1077
+ static int set_chmod_dacl (struct smb_acl * pdacl , struct smb_acl * pndacl ,
1078
1078
struct smb_sid * pownersid , struct smb_sid * pgrpsid ,
1079
1079
__u64 * pnmode , bool mode_from_sid )
1080
1080
{
@@ -1091,7 +1091,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
1091
1091
1092
1092
/* Assuming that pndacl and pnmode are never NULL */
1093
1093
nacl_base = (char * )pndacl ;
1094
- nsize = sizeof (struct cifs_acl );
1094
+ nsize = sizeof (struct smb_acl );
1095
1095
1096
1096
/* If pdacl is NULL, we don't have a src. Simply populate new ACL. */
1097
1097
if (!pdacl ) {
@@ -1103,7 +1103,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
1103
1103
}
1104
1104
1105
1105
acl_base = (char * )pdacl ;
1106
- size = sizeof (struct cifs_acl );
1106
+ size = sizeof (struct smb_acl );
1107
1107
src_num_aces = le32_to_cpu (pdacl -> num_aces );
1108
1108
1109
1109
/* Retain old ACEs which we can retain */
@@ -1196,7 +1196,7 @@ static int parse_sec_desc(struct cifs_sb_info *cifs_sb,
1196
1196
{
1197
1197
int rc = 0 ;
1198
1198
struct smb_sid * owner_sid_ptr , * group_sid_ptr ;
1199
- struct cifs_acl * dacl_ptr ; /* no need for SACL ptr */
1199
+ struct smb_acl * dacl_ptr ; /* no need for SACL ptr */
1200
1200
char * end_of_acl = ((char * )pntsd ) + acl_len ;
1201
1201
__u32 dacloffset ;
1202
1202
@@ -1208,7 +1208,7 @@ static int parse_sec_desc(struct cifs_sb_info *cifs_sb,
1208
1208
group_sid_ptr = (struct smb_sid * )((char * )pntsd +
1209
1209
le32_to_cpu (pntsd -> gsidoffset ));
1210
1210
dacloffset = le32_to_cpu (pntsd -> dacloffset );
1211
- dacl_ptr = (struct cifs_acl * )((char * )pntsd + dacloffset );
1211
+ dacl_ptr = (struct smb_acl * )((char * )pntsd + dacloffset );
1212
1212
cifs_dbg (NOISY , "revision %d type 0x%x ooffset 0x%x goffset 0x%x sacloffset 0x%x dacloffset 0x%x\n" ,
1213
1213
pntsd -> revision , pntsd -> type , le32_to_cpu (pntsd -> osidoffset ),
1214
1214
le32_to_cpu (pntsd -> gsidoffset ),
@@ -1259,14 +1259,14 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd,
1259
1259
__u32 sidsoffset ;
1260
1260
struct smb_sid * owner_sid_ptr , * group_sid_ptr ;
1261
1261
struct smb_sid * nowner_sid_ptr = NULL , * ngroup_sid_ptr = NULL ;
1262
- struct cifs_acl * dacl_ptr = NULL ; /* no need for SACL ptr */
1263
- struct cifs_acl * ndacl_ptr = NULL ; /* no need for SACL ptr */
1262
+ struct smb_acl * dacl_ptr = NULL ; /* no need for SACL ptr */
1263
+ struct smb_acl * ndacl_ptr = NULL ; /* no need for SACL ptr */
1264
1264
char * end_of_acl = ((char * )pntsd ) + secdesclen ;
1265
1265
u16 size = 0 ;
1266
1266
1267
1267
dacloffset = le32_to_cpu (pntsd -> dacloffset );
1268
1268
if (dacloffset ) {
1269
- dacl_ptr = (struct cifs_acl * )((char * )pntsd + dacloffset );
1269
+ dacl_ptr = (struct smb_acl * )((char * )pntsd + dacloffset );
1270
1270
if (end_of_acl < (char * )dacl_ptr + le16_to_cpu (dacl_ptr -> size )) {
1271
1271
cifs_dbg (VFS , "Server returned illegal ACL size\n" );
1272
1272
return - EINVAL ;
@@ -1280,7 +1280,7 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd,
1280
1280
1281
1281
if (pnmode && * pnmode != NO_CHANGE_64 ) { /* chmod */
1282
1282
ndacloffset = sizeof (struct smb_ntsd );
1283
- ndacl_ptr = (struct cifs_acl * )((char * )pnntsd + ndacloffset );
1283
+ ndacl_ptr = (struct smb_acl * )((char * )pnntsd + ndacloffset );
1284
1284
ndacl_ptr -> revision =
1285
1285
dacloffset ? dacl_ptr -> revision : cpu_to_le16 (ACL_REVISION );
1286
1286
@@ -1298,7 +1298,7 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd,
1298
1298
* aclflag |= CIFS_ACL_DACL ;
1299
1299
} else {
1300
1300
ndacloffset = sizeof (struct smb_ntsd );
1301
- ndacl_ptr = (struct cifs_acl * )((char * )pnntsd + ndacloffset );
1301
+ ndacl_ptr = (struct smb_acl * )((char * )pnntsd + ndacloffset );
1302
1302
ndacl_ptr -> revision =
1303
1303
dacloffset ? dacl_ptr -> revision : cpu_to_le16 (ACL_REVISION );
1304
1304
ndacl_ptr -> num_aces = dacl_ptr ? dacl_ptr -> num_aces : 0 ;
@@ -1580,7 +1580,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
1580
1580
__u32 secdesclen = 0 ;
1581
1581
__u32 nsecdesclen = 0 ;
1582
1582
__u32 dacloffset = 0 ;
1583
- struct cifs_acl * dacl_ptr = NULL ;
1583
+ struct smb_acl * dacl_ptr = NULL ;
1584
1584
struct smb_ntsd * pntsd = NULL ; /* acl obtained from server */
1585
1585
struct smb_ntsd * pnntsd = NULL ; /* modified acl to be sent to server */
1586
1586
struct cifs_sb_info * cifs_sb = CIFS_SB (inode -> i_sb );
@@ -1633,7 +1633,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
1633
1633
nsecdesclen = sizeof (struct smb_ntsd ) + (sizeof (struct smb_sid ) * 2 );
1634
1634
dacloffset = le32_to_cpu (pntsd -> dacloffset );
1635
1635
if (dacloffset ) {
1636
- dacl_ptr = (struct cifs_acl * )((char * )pntsd + dacloffset );
1636
+ dacl_ptr = (struct smb_acl * )((char * )pntsd + dacloffset );
1637
1637
if (mode_from_sid )
1638
1638
nsecdesclen +=
1639
1639
le32_to_cpu (dacl_ptr -> num_aces ) * sizeof (struct cifs_ace );
0 commit comments