build: add optional Netatalk libatalk backend hook
Some checks failed
Source release / source-package (push) Failing after 41s
Some checks failed
Source release / source-package (push) Failing after 41s
Add an opt-in CMake hook for Netatalk/libatalk and a small nwconn-side helper layer for future AFP/Mac namespace work. NetWare AFP NCP 0x23 calls still have to be decoded and answered by MARS-NWE; libatalk is not used as an afpd proxy. Instead, expose local helper wrappers that can read AppleDouble/Finder Info metadata and resource-fork sizes from a backing Unix path when libatalk is available. The WebSDK documents the AFP calls as NetWare server entry points for Mac namespace semantics, and the SDK headers expose probes such as NWAFPSupported() plus AFP entry-id and file-information calls. Those calls require AFP entry IDs, Finder Info, resource forks, and per-volume Mac namespace state before MARS-NWE can return success. Keep NCP 0x23 returning invalid namespace for now, but record whether the libatalk metadata backend was compiled in when rejecting AFP calls. Update TODO.md to track the remaining NetWare AFP implementation work on top of the new backend hook. This adds build-time integration and local metadata helpers only; it does not change AFP protocol behavior.
This commit is contained in:
@@ -60,7 +60,7 @@ ELSE(ENABLE_INTERNAL_RIP_SAP)
|
||||
ENDIF(ENABLE_INTERNAL_RIP_SAP)
|
||||
|
||||
add_executable(nwserv nwserv.c net1.c tools.c ${EMUTLI} ${EMUTLI1} ${NWROUTE_0} )
|
||||
add_executable(nwconn nwconn.c net1.c tools.c connect.c namspace.c nwvolume.c nwfile.c unxfile.c nwqconn.c nameos2.c namedos.c nwfname.c nwshare.c extpipe.c nwattrib.c trustee.c nwarchive.c ${EMUTLI} )
|
||||
add_executable(nwconn nwconn.c net1.c tools.c connect.c namspace.c nwvolume.c nwfile.c unxfile.c nwqconn.c nameos2.c namedos.c nwfname.c nwshare.c extpipe.c nwattrib.c trustee.c nwarchive.c nwatalk.c ${EMUTLI} )
|
||||
add_executable(ncpserv ncpserv.c net1.c tools.c ${EMUTLI} )
|
||||
add_executable(nwclient nwclient.c net1.c tools.c ${EMUTLI} )
|
||||
add_executable(nwbind nwbind.c net1.c tools.c nwdbm.c nwcrypt.c unxlog.c sema.c nwqueue.c unxfile.c ${EMUTLI} )
|
||||
@@ -77,6 +77,10 @@ add_executable(ftrustee ftrustee.c tools.c nwfname.c unxfile.c nwvolume.c nwattr
|
||||
|
||||
target_link_libraries(nwserv ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwconn ${CRYPT_LIBRARIES} ${XATTR_LIBRARIES} )
|
||||
IF(MARS_NWE_NETATALK_SUPPORT)
|
||||
target_include_directories(nwconn PRIVATE ${NETATALK_INCLUDE_DIRS})
|
||||
target_link_libraries(nwconn ${NETATALK_LIBRARIES})
|
||||
ENDIF(MARS_NWE_NETATALK_SUPPORT)
|
||||
target_link_libraries(ncpserv ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwclient ${CRYPT_LIBRARIES} )
|
||||
target_link_libraries(nwbind ${CRYPT_LIBRARIES} ${GDBM_LIBRARIES} )
|
||||
|
||||
16
src/nwconn.c
16
src/nwconn.c
@@ -46,6 +46,7 @@
|
||||
#include "nwdbm.h"
|
||||
#include "nwconn.h"
|
||||
#include "trustee.h"
|
||||
#include "nwatalk.h"
|
||||
|
||||
int act_pid = 0;
|
||||
|
||||
@@ -2383,9 +2384,24 @@ static int handle_ncp_serv(void)
|
||||
} break;
|
||||
|
||||
case 0x23 : { /* div AFP Calls */
|
||||
/*
|
||||
* NetWare AFP calls are server-side NCP entry points for
|
||||
* Mac namespace semantics: AFP entry IDs, Finder Info,
|
||||
* AppleDouble metadata, resource forks, and per-volume Mac
|
||||
* namespace state.
|
||||
*
|
||||
* Netatalk/libatalk can be enabled at build time as an
|
||||
* optional local metadata backend for AppleDouble/Finder
|
||||
* Info/resource-fork access, but mars_nwe must still
|
||||
* decode and answer the NetWare NCP calls itself. Do not
|
||||
* proxy these calls to afpd or report success until the
|
||||
* required Mac namespace semantics exist.
|
||||
*/
|
||||
#if 0
|
||||
int ufunc = (int) *requestdata;
|
||||
#endif
|
||||
XDPRINTF((3,0, "AFP call rejected: Mac namespace unavailable, libatalk backend=%s",
|
||||
nwatalk_backend_available() ? "enabled" : "disabled"));
|
||||
completition=0xbf; /* we say invalid namespace here */
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user