Commit 8b19dfb
cifs: Fix getting and setting SACLs over SMB1
SMB1 callback get_cifs_acl_by_fid() currently ignores its last argument and
therefore ignores request for SACL_SECINFO. Fix this issue by correctly
propagating info argument from get_cifs_acl() and get_cifs_acl_by_fid() to
CIFSSMBGetCIFSACL() function and pass SACL_SECINFO when requested.
For accessing SACLs it is needed to open object with SYSTEM_SECURITY
access. Pass this flag when trying to get or set SACLs.
Same logic is in the SMB2+ code path.
This change fixes getting and setting of "system.cifs_ntsd_full" and
"system.smb3_ntsd_full" xattrs over SMB1 as currently it silentely ignored
SACL part of passed xattr buffer.
Fixes: 3970acf ("SMB3: Add support for getting and setting SACLs")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 25f6184 commit 8b19dfb
3 files changed
+18
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
1398 | | - | |
| 1398 | + | |
1399 | 1399 | | |
1400 | 1400 | | |
1401 | 1401 | | |
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
1410 | | - | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | | - | |
| 1422 | + | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | 1425 | | |
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1449 | 1452 | | |
1450 | 1453 | | |
1451 | | - | |
| 1454 | + | |
1452 | 1455 | | |
1453 | 1456 | | |
1454 | 1457 | | |
| |||
1472 | 1475 | | |
1473 | 1476 | | |
1474 | 1477 | | |
1475 | | - | |
| 1478 | + | |
1476 | 1479 | | |
1477 | 1480 | | |
1478 | 1481 | | |
| |||
1485 | 1488 | | |
1486 | 1489 | | |
1487 | 1490 | | |
1488 | | - | |
| 1491 | + | |
1489 | 1492 | | |
1490 | 1493 | | |
1491 | 1494 | | |
| |||
1498 | 1501 | | |
1499 | 1502 | | |
1500 | 1503 | | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1505 | 1510 | | |
1506 | 1511 | | |
1507 | 1512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3369 | 3369 | | |
3370 | 3370 | | |
3371 | 3371 | | |
3372 | | - | |
| 3372 | + | |
3373 | 3373 | | |
3374 | 3374 | | |
3375 | 3375 | | |
| |||
3392 | 3392 | | |
3393 | 3393 | | |
3394 | 3394 | | |
3395 | | - | |
| 3395 | + | |
3396 | 3396 | | |
3397 | 3397 | | |
3398 | 3398 | | |
| |||
0 commit comments