nwconn: route AFP backup timestamps through nwarchive
All checks were successful
Source release / source-package (push) Successful in 48s
All checks were successful
Source release / source-package (push) Successful in 48s
Implement the WebSDK AFP Set File Information Backup Date/Time request bitmap as a narrow metadata write that reuses mars_nwe's existing archive metadata helper instead of adding a new AFP-specific storage path. The AFP Attributes word already maps Archive through the NetWare FILE_ATTR_A path; Backup Date/Time is a separate SetInfo field and belongs in the existing nwarchive.c archive date/time metadata. Include nwarchive.h in nwconn, fill the AFP information record's Backup Date/Time fields from mars_nwe_get_archive_info(), and accept the SetInfo 0x2000 bitmap by calling mars_nwe_set_archive_info() after the normal AFP path resolution and Modify-rights gate. Extend the Linux Set File Information smoke helper with --backup-time-epoch/--backup-time-only, verify the returned 120-byte file information record at offsets 28/30, and have afp_smoke_suite.sh dump user.org.mars-nwe.netware.archive so reports prove that the WebSDK field is stored through the NetWare archive metadata path. Tests: git diff --check; bash -n tests/linux/afp_smoke_suite.sh; gcc -Iinclude -I/mnt/data/stubs -fsyntax-only tests/linux/afp_set_file_info_smoke.c
This commit is contained in:
@@ -809,3 +809,27 @@ Attributes, `0x1000` Modify Date/Time, and `0x4000` FinderInfo. Since these
|
||||
attributes now use the existing NetWare attribute path, the final
|
||||
`user.org.mars-nwe.afp.attributes` dump is optional and may report `ENODATA`;
|
||||
that is expected when no AFP-only attribute bits remain set.
|
||||
|
||||
### AFP Backup Date/Time smoke
|
||||
|
||||
`afp_set_file_info_smoke` supports the WebSDK Backup Date/Time request bitmap
|
||||
`0x2000` via:
|
||||
|
||||
```sh
|
||||
./afp_set_file_info_smoke \
|
||||
-S MARS -U SUPERVISOR -P secret \
|
||||
--backup-time-only --backup-time-epoch 1700000000 \
|
||||
SYS:PUBLIC/pmdflts.ini
|
||||
```
|
||||
|
||||
This is intentionally separate from the Archive attribute bit in the Attributes
|
||||
word. The server stores Backup Date/Time through `nwarchive.c` and the Linux
|
||||
suite dumps the corresponding xattr as:
|
||||
|
||||
```sh
|
||||
getfattr -n user.org.mars-nwe.netware.archive -e hex /var/mars_nwe/SYS/public/pmdflts.ini
|
||||
```
|
||||
|
||||
The expected AFP reply shows the same Backup Date/Time at offsets 28/30 of the
|
||||
120-byte file information record, while Archive/Hidden/System attributes remain
|
||||
mapped through the normal NetWare attribute store.
|
||||
|
||||
Reference in New Issue
Block a user