mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
cc3e4992d5
This is a module that I'd noticed in the past was too monolithic. There's a big pile of stub functions in uxpgnt.c that only have to be there because the implementation of true X11 _forwarding_ (i.e. actually managing a channel within an SSH connection), which Pageant doesn't need, was in the same module as more general X11-related utility functions which Pageant does need. So I've broken up this awkward monolith. Now x11fwd.c contains only the code that really does all go together for dealing with SSH X forwarding: the management of an X forwarding channel (including the vtables to make it behave as Channel at the SSH end and a Plug at the end that connects to the local X server), and the management of authorisation for those channels, including maintaining a tree234 of possible auth values and verifying the one we received. Most of the functions removed from this file have moved into the utils subdir, and also into the utils library (i.e. further down the link order), because they were basically just string and data processing. One exception is x11_setup_display, which parses a display string and returns a struct telling you everything about how to connect to it. That talks to the networking code (it does name lookups and makes a SockAddr), so it has to live in the network library rather than utils, and therefore it's not in the utils subdirectory either. The other exception is x11_get_screen_number, which it turned out nothing called at all! Apparently the job it used to do is now done as part of x11_setup_display. So I've just removed it completely.
226 lines
5.9 KiB
CMake
226 lines
5.9 KiB
CMake
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
|
add_platform_sources_to_library(utils
|
|
utils/arm_arch_queries.c
|
|
utils/block_signal.c
|
|
utils/cloexec.c
|
|
utils/dputs.c
|
|
utils/filename.c
|
|
utils/fontspec.c
|
|
utils/getticks.c
|
|
utils/get_username.c
|
|
utils/keysym_to_unicode.c
|
|
utils/make_dir_and_check_ours.c
|
|
utils/make_dir_path.c
|
|
utils/nonblock.c
|
|
utils/open_for_write_would_lose_data.c
|
|
utils/pgp_fingerprints.c
|
|
utils/pollwrap.c
|
|
utils/signal.c
|
|
utils/x11_ignore_error.c
|
|
../utils/smemclr.c
|
|
# Compiled icon pixmap files
|
|
xpmpucfg.c xpmputty.c xpmptcfg.c xpmpterm.c
|
|
# We want the ISO C implementation of ltime(), because we don't have
|
|
# a local better alternative
|
|
../utils/ltime.c)
|
|
add_platform_sources_to_library(eventloop
|
|
uxcliloop.c uxsel.c)
|
|
add_platform_sources_to_library(console
|
|
uxcons.c)
|
|
add_platform_sources_to_library(settings
|
|
uxstore.c)
|
|
add_platform_sources_to_library(network
|
|
uxnet.c uxfdsock.c uxagentsock.c uxpeer.c uxproxy.c ux_x11.c)
|
|
add_platform_sources_to_library(sshcommon
|
|
uxnoise.c)
|
|
add_platform_sources_to_library(sshclient
|
|
uxgss.c uxagentc.c uxshare.c)
|
|
add_platform_sources_to_library(sshserver
|
|
uxsftpserver.c procnet.c)
|
|
add_platform_sources_to_library(sftpclient
|
|
uxsftp.c)
|
|
add_platform_sources_to_library(otherbackends
|
|
uxser.c)
|
|
add_platform_sources_to_library(agent
|
|
uxagentc.c)
|
|
|
|
add_executable(fuzzterm
|
|
${CMAKE_SOURCE_DIR}/fuzzterm.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/logging.c
|
|
${CMAKE_SOURCE_DIR}/noprint.c
|
|
uxucs.c
|
|
uxnogtk.c)
|
|
add_dependencies(fuzzterm generated_licence_h)
|
|
target_link_libraries(fuzzterm
|
|
guiterminal eventloop charset settings utils)
|
|
|
|
add_executable(osxlaunch
|
|
osxlaunch.c)
|
|
|
|
add_executable(plink
|
|
uxplink.c
|
|
${CMAKE_SOURCE_DIR}/be_all_s.c
|
|
uxnogtk.c)
|
|
target_link_libraries(plink
|
|
eventloop noterminal console sshclient otherbackends settings network crypto
|
|
utils)
|
|
installed_program(plink)
|
|
|
|
add_executable(pscp
|
|
${CMAKE_SOURCE_DIR}/pscp.c
|
|
${CMAKE_SOURCE_DIR}/be_ssh.c
|
|
uxnogtk.c)
|
|
target_link_libraries(pscp
|
|
sftpclient eventloop console sshclient settings network crypto utils)
|
|
installed_program(pscp)
|
|
|
|
add_executable(psftp
|
|
${CMAKE_SOURCE_DIR}/psftp.c
|
|
${CMAKE_SOURCE_DIR}/be_ssh.c
|
|
uxnogtk.c)
|
|
target_link_libraries(psftp
|
|
sftpclient eventloop console sshclient settings network crypto utils)
|
|
installed_program(psftp)
|
|
|
|
add_executable(psocks
|
|
uxsocks.c
|
|
${CMAKE_SOURCE_DIR}/psocks.c
|
|
${CMAKE_SOURCE_DIR}/norand.c
|
|
${CMAKE_SOURCE_DIR}/nocproxy.c
|
|
${CMAKE_SOURCE_DIR}/portfwd.c
|
|
uxnogtk.c)
|
|
target_link_libraries(psocks
|
|
eventloop console network utils)
|
|
|
|
add_executable(psusan
|
|
uxpsusan.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
${CMAKE_SOURCE_DIR}/scpserver.c
|
|
uxnogtk.c
|
|
uxpty.c)
|
|
target_link_libraries(psusan
|
|
eventloop sshserver keygen settings network crypto utils)
|
|
installed_program(psusan)
|
|
|
|
add_library(puttygen-common OBJECT
|
|
${CMAKE_SOURCE_DIR}/notiming.c
|
|
uxgen.c
|
|
uxnogtk.c
|
|
uxnoise.c
|
|
uxstore.c
|
|
${CMAKE_SOURCE_DIR}/sshpubk.c
|
|
${CMAKE_SOURCE_DIR}/sshrand.c)
|
|
|
|
add_executable(puttygen
|
|
${CMAKE_SOURCE_DIR}/cmdgen.c)
|
|
target_link_libraries(puttygen
|
|
puttygen-common keygen console crypto utils)
|
|
installed_program(puttygen)
|
|
|
|
add_executable(cgtest
|
|
${CMAKE_SOURCE_DIR}/cgtest.c)
|
|
target_link_libraries(cgtest
|
|
puttygen-common keygen console crypto utils)
|
|
|
|
add_executable(testsc
|
|
${CMAKE_SOURCE_DIR}/testsc.c)
|
|
target_link_libraries(testsc crypto utils)
|
|
|
|
add_executable(testzlib
|
|
${CMAKE_SOURCE_DIR}/testzlib.c
|
|
${CMAKE_SOURCE_DIR}/sshzlib.c)
|
|
target_link_libraries(testzlib utils)
|
|
|
|
add_executable(uppity
|
|
uxserver.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/scpserver.c
|
|
uxnogtk.c
|
|
uxpty.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c)
|
|
target_link_libraries(uppity
|
|
eventloop sshserver keygen settings network crypto utils)
|
|
|
|
if(GTK_FOUND)
|
|
add_platform_sources_to_library(utils
|
|
gtkcols.c)
|
|
add_platform_sources_to_library(guiterminal
|
|
gtkwin.c gtkfont.c gtkdlg.c gtkcfg.c gtkcomm.c uxcfg.c uxucs.c uxprint.c)
|
|
add_dependencies(guiterminal generated_licence_h) # gtkdlg.c uses licence.h
|
|
|
|
add_library(guimisc STATIC
|
|
gtkmisc.c)
|
|
|
|
add_executable(pageant
|
|
uxpgnt.c
|
|
${CMAKE_SOURCE_DIR}/be_misc.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
gtkask.c
|
|
ux_x11.c
|
|
uxnoise.c
|
|
${CMAKE_SOURCE_DIR}/x11fwd.c)
|
|
target_link_libraries(pageant
|
|
guimisc eventloop console agent settings network crypto utils
|
|
${GTK_LIBRARIES})
|
|
installed_program(pageant)
|
|
|
|
add_executable(pterm
|
|
uxpterm.c
|
|
gtkmain.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
uxpty.c)
|
|
target_link_libraries(pterm
|
|
guiterminal guimisc eventloop settings charset utils
|
|
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
|
installed_program(pterm)
|
|
|
|
add_executable(ptermapp
|
|
uxpterm.c
|
|
gtkapp.c
|
|
${CMAKE_SOURCE_DIR}/nocmdline.c
|
|
${CMAKE_SOURCE_DIR}/be_none.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
uxpty.c)
|
|
target_link_libraries(ptermapp
|
|
guiterminal guimisc eventloop settings charset utils
|
|
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
|
|
|
add_executable(putty
|
|
uxputty.c
|
|
gtkmain.c
|
|
${CMAKE_SOURCE_DIR}/be_all_s.c)
|
|
target_link_libraries(putty
|
|
guiterminal guimisc eventloop sshclient otherbackends settings
|
|
network crypto charset utils
|
|
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
|
set_target_properties(putty
|
|
PROPERTIES LINK_INTERFACE_MULTIPLICITY 2)
|
|
installed_program(putty)
|
|
|
|
add_executable(puttyapp
|
|
uxputty.c
|
|
gtkapp.c
|
|
${CMAKE_SOURCE_DIR}/nocmdline.c
|
|
${CMAKE_SOURCE_DIR}/be_all_s.c)
|
|
target_link_libraries(puttyapp
|
|
guiterminal guimisc eventloop sshclient otherbackends settings
|
|
network crypto charset utils
|
|
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
|
|
|
add_executable(puttytel
|
|
uxputty.c
|
|
gtkmain.c
|
|
${CMAKE_SOURCE_DIR}/be_nos_s.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
${CMAKE_SOURCE_DIR}/norand.c
|
|
${CMAKE_SOURCE_DIR}/nocproxy.c)
|
|
target_link_libraries(puttytel
|
|
guiterminal guimisc eventloop otherbackends settings network charset utils
|
|
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
|
endif()
|