diff --git a/tests/linux/afp_entry_id_smoke.c b/tests/linux/afp_entry_id_smoke.c index 1ba5512..405ba78 100644 --- a/tests/linux/afp_entry_id_smoke.c +++ b/tests/linux/afp_entry_id_smoke.c @@ -177,9 +177,17 @@ int main(int argc, char **argv) return 2; } - conn = ncp_initialize(&argc, argv, 0, &init_err); + /* + * The smoke test needs normal file-service path access before it can send + * AFP 0x0c: it has to allocate/use a directory handle for the supplied + * VOL:PATH. ncp_initialize(..., 0, ...) intentionally clears the user + * name even if -U/-P were supplied, so mars_nwe treats the connection as + * unauthenticated and rejects non-login paths before the AFP request is + * reached. Require a login here; no-password users can still use -n. + */ + conn = ncp_initialize(&argc, argv, 1, &init_err); if (!conn) { - fprintf(stderr, "ncp_initialize failed: %ld\n", init_err); + fprintf(stderr, "ncp_initialize/login failed: %ld\n", init_err); usage(argv[0]); return 2; }