mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-14 08:02:10 -05:00

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.
173 lines
4.5 KiB
CMake
173 lines
4.5 KiB
CMake
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
|
add_platform_sources_to_library(utils
|
|
utils/arm_arch_queries.c
|
|
utils/capi.c
|
|
utils/defaults.c
|
|
utils/dll_hijacking_protection.c
|
|
utils/dputs.c
|
|
utils/escape_registry_key.c
|
|
utils/filename.c
|
|
utils/fontspec.c
|
|
utils/getdlgitemtext_alloc.c
|
|
utils/get_username.c
|
|
utils/is_console_handle.c
|
|
utils/load_system32_dll.c
|
|
utils/ltime.c
|
|
utils/makedlgitemborderless.c
|
|
utils/message_box.c
|
|
utils/minefield.c
|
|
utils/open_for_write_would_lose_data.c
|
|
utils/pgp_fingerprints_msgbox.c
|
|
utils/platform_get_x_display.c
|
|
utils/registry_get_string.c
|
|
utils/request_file.c
|
|
utils/security.c
|
|
utils/split_into_argv.c
|
|
utils/version.c
|
|
utils/win_strerror.c
|
|
winucs.c)
|
|
if(NOT HAVE_SECUREZEROMEMORY)
|
|
add_platform_sources_to_library(utils ../utils/smemclr.c)
|
|
endif()
|
|
if(NOT HAVE_STRTOUMAX)
|
|
add_platform_sources_to_library(utils utils/strtoumax.c)
|
|
endif()
|
|
add_platform_sources_to_library(eventloop
|
|
wincliloop.c winhandl.c)
|
|
add_platform_sources_to_library(console
|
|
winselcli.c winnohlp.c wincons.c)
|
|
add_platform_sources_to_library(settings
|
|
winstore.c)
|
|
add_platform_sources_to_library(network
|
|
winnet.c winhsock.c winnpc.c winnps.c winproxy.c winx11.c)
|
|
add_platform_sources_to_library(sshcommon
|
|
winnoise.c)
|
|
add_platform_sources_to_library(sshclient
|
|
winpgntc.c wingss.c winshare.c)
|
|
add_platform_sources_to_library(sftpclient
|
|
winsftp.c)
|
|
add_platform_sources_to_library(otherbackends
|
|
winser.c)
|
|
add_platform_sources_to_library(agent
|
|
winpgntc.c)
|
|
add_platform_sources_to_library(guiterminal
|
|
windlg.c winctrls.c wincfg.c winprint.c winjump.c sizetip.c)
|
|
add_dependencies(guiterminal generated_licence_h) # windlg.c uses licence.h
|
|
|
|
add_library(guimisc STATIC
|
|
winselgui.c)
|
|
|
|
add_executable(pageant
|
|
winpgnt.c
|
|
winhelp.c
|
|
pageant.rc)
|
|
add_dependencies(pageant generated_licence_h)
|
|
target_link_libraries(pageant
|
|
guimisc eventloop agent network crypto utils
|
|
${platform_libraries})
|
|
set_target_properties(pageant PROPERTIES
|
|
WIN32_EXECUTABLE ON
|
|
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
|
|
installed_program(pageant)
|
|
|
|
add_executable(plink
|
|
winplink.c
|
|
${CMAKE_SOURCE_DIR}/be_all_s.c
|
|
winnojmp.c
|
|
winnohlp.c
|
|
plink.rc)
|
|
add_dependencies(plink generated_licence_h)
|
|
target_link_libraries(plink
|
|
eventloop console noterminal sshclient otherbackends settings network crypto
|
|
utils
|
|
${platform_libraries})
|
|
installed_program(plink)
|
|
|
|
add_executable(pscp
|
|
${CMAKE_SOURCE_DIR}/pscp.c
|
|
${CMAKE_SOURCE_DIR}/be_ssh.c
|
|
winnojmp.c
|
|
winnohlp.c
|
|
pscp.rc)
|
|
add_dependencies(pscp generated_licence_h)
|
|
target_link_libraries(pscp
|
|
sftpclient eventloop console sshclient settings network crypto utils
|
|
${platform_libraries})
|
|
installed_program(pscp)
|
|
|
|
add_executable(psftp
|
|
${CMAKE_SOURCE_DIR}/psftp.c
|
|
${CMAKE_SOURCE_DIR}/be_ssh.c
|
|
winnojmp.c
|
|
winnohlp.c
|
|
psftp.rc)
|
|
add_dependencies(psftp generated_licence_h)
|
|
target_link_libraries(psftp
|
|
sftpclient eventloop console sshclient settings network crypto utils
|
|
${platform_libraries})
|
|
installed_program(psftp)
|
|
|
|
add_executable(psocks
|
|
winsocks.c
|
|
winnohlp.c
|
|
${CMAKE_SOURCE_DIR}/psocks.c
|
|
${CMAKE_SOURCE_DIR}/norand.c
|
|
${CMAKE_SOURCE_DIR}/nocproxy.c
|
|
${CMAKE_SOURCE_DIR}/portfwd.c)
|
|
target_link_libraries(psocks
|
|
eventloop console network utils
|
|
${platform_libraries})
|
|
|
|
add_executable(putty
|
|
window.c
|
|
winhelp.c
|
|
${CMAKE_SOURCE_DIR}/be_all_s.c
|
|
putty.rc)
|
|
add_dependencies(putty generated_licence_h)
|
|
target_link_libraries(putty
|
|
guiterminal guimisc eventloop sshclient otherbackends settings network crypto
|
|
utils
|
|
${platform_libraries})
|
|
set_target_properties(putty PROPERTIES
|
|
WIN32_EXECUTABLE ON
|
|
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
|
|
installed_program(putty)
|
|
|
|
add_executable(puttytel
|
|
window.c
|
|
winhelp.c
|
|
${CMAKE_SOURCE_DIR}/be_nos_s.c
|
|
${CMAKE_SOURCE_DIR}/nogss.c
|
|
${CMAKE_SOURCE_DIR}/norand.c
|
|
${CMAKE_SOURCE_DIR}/nocproxy.c
|
|
puttytel.rc)
|
|
add_dependencies(puttytel generated_licence_h)
|
|
target_link_libraries(puttytel
|
|
guiterminal guimisc eventloop otherbackends settings network utils
|
|
${platform_libraries})
|
|
set_target_properties(puttytel PROPERTIES
|
|
WIN32_EXECUTABLE ON
|
|
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
|
|
installed_program(puttytel)
|
|
|
|
add_executable(puttygen
|
|
winpgen.c
|
|
${CMAKE_SOURCE_DIR}/notiming.c
|
|
winnoise.c
|
|
winnojmp.c
|
|
winstore.c
|
|
winhelp.c
|
|
${CMAKE_SOURCE_DIR}/sshpubk.c
|
|
${CMAKE_SOURCE_DIR}/sshrand.c
|
|
winctrls.c
|
|
puttygen.rc)
|
|
add_dependencies(puttygen generated_licence_h)
|
|
target_link_libraries(puttygen
|
|
keygen guimisc crypto utils
|
|
${platform_libraries})
|
|
set_target_properties(puttygen PROPERTIES
|
|
WIN32_EXECUTABLE ON
|
|
LINK_FLAGS "${LFLAG_MANIFEST_NO}")
|
|
installed_program(puttygen)
|