Files
mcde/lib/McdeSys/Makefile.am
T
lotherkandClaude Opus 5.5 40f0cdaaee MCDE: no ssh option injection from mDNS -- McdeSys keeps only good host names, dtfile starts ssh without a shell
Review 2026-11-13 (tasksd t0076): dtfile's network view ran
system("dtterm -title '%s' -e ssh '%s' &") with the mDNS service name and
host target, and its comment said McdeSys had checked the host -- it had
not: mcde_sys_net_add() only copied it.  A host advertising _ssh._tcp with
the target "-oProxyCommand=..." reached ssh as an option, and ssh runs a
ProxyCommand through a shell.

- netmount.c mcde_sys_net_add(): GoodHost() once for every name from the
  network (no leading -, letters/digits/. - _ : only); control characters
  in the free-text service name become ?.
- NetView.c: SshTerminal() forks and execs dtterm -e ssh -- HOST, no shell,
  detached by a second fork (daemon(3) pattern); no system() is left in
  the MCDE programs.
- test_netmount (make check): 12 host names, kept or dropped as expected,
  and the control character; PASS with test_sysinfo
  (build/logs/mcde-linux-netview-2026-11-13.log; dtfile builds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:38:53 +00:00

28 lines
1.1 KiB
Makefile

MAINTAINERCLEANFILES = Makefile.in
# McdeSys, MCDE's layer between the desktop and the operating system
# (include/Mcde/McdeSys.h): common.c is POSIX, one backend per system.
lib_LTLIBRARIES = libMcdeSys.la
libMcdeSys_la_CPPFLAGS = -I$(top_srcdir)/include
libMcdeSys_la_SOURCES = common.c net.c sound.c users.c share.c netmount.c backup.c private.h
if NETBSD
libMcdeSys_la_SOURCES += netbsd.c disk_netbsd.c
# crypt(3), for the password hash; proplib(3), for the battery; libdns_sd
# (base), for the computers on the network (netbsd.c)
libMcdeSys_la_LIBADD = -lcrypt -lprop -ldns_sd
else
libMcdeSys_la_SOURCES += linux.c disk_linux.c
endif
libMcdeSys_la_LDFLAGS = -version-info 1:0:0
# what the system tells about itself, for a look by hand: make check runs it
check_PROGRAMS = test_sysinfo test_netmount
test_sysinfo_SOURCES = test_sysinfo.c
test_sysinfo_CPPFLAGS = -I$(top_srcdir)/include
test_sysinfo_LDADD = libMcdeSys.la
test_netmount_SOURCES = test_netmount.c
test_netmount_CPPFLAGS = -I$(top_srcdir)/include
test_netmount_LDADD = libMcdeSys.la
TESTS = test_sysinfo test_netmount