adding vendor deps
This commit is contained in:
parent
42cf0e62a8
commit
4c6eed5c0a
116 changed files with 61253 additions and 0 deletions
2
vendor/CMakeLists.txt
vendored
Normal file
2
vendor/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
add_subdirectory( libssh2-1.4.2 )
|
||||
add_subdirectory( sigar )
|
||||
48
vendor/libssh2-1.4.2/AUTHORS
vendored
Normal file
48
vendor/libssh2-1.4.2/AUTHORS
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
libssh2 is the result of many friendly people. This list is an attempt to
|
||||
mention all contributors. If we've missed anyone, tell us!
|
||||
|
||||
This list of names is a-z sorted.
|
||||
|
||||
Adam Gobiowski
|
||||
Alexander Holyapin
|
||||
Alexander Lamaison
|
||||
Ben Kibbey
|
||||
Bjorn Stenborg
|
||||
Carlo Bramini
|
||||
Dan Casey
|
||||
Dan Fandrich
|
||||
Daniel Stenberg
|
||||
David J Sullivan
|
||||
David Robins
|
||||
Edink Kadribasic
|
||||
Erik Brossler
|
||||
Francois Dupoux
|
||||
Guenter Knauf
|
||||
Heiner Steven
|
||||
James Housleys
|
||||
Jean-Louis Charton
|
||||
Jussi Mononen
|
||||
Mark McPherson
|
||||
Markus Moeller
|
||||
Mike Protts
|
||||
Mikhail Gusarov
|
||||
Neil Gierman
|
||||
Olivier Hervieu
|
||||
Paul Veldkamp
|
||||
Peter Krempa
|
||||
Peter O'Gorman
|
||||
Peter Stuge
|
||||
Romain Bondue
|
||||
Sara Golemon
|
||||
Satish Mittal
|
||||
Sean Peterson
|
||||
Selcuk Gueney
|
||||
Simon Hart
|
||||
Simon Josefsson
|
||||
Steven Ayre
|
||||
Steven Van Ingelgem
|
||||
Tor Arntsen
|
||||
Vincent Jaulin
|
||||
Vlad Grachov
|
||||
Wez Furlong
|
||||
Yang Tse
|
||||
16
vendor/libssh2-1.4.2/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
16
vendor/libssh2-1.4.2/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# Relative path conversion top directories.
|
||||
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/dlarimer/projects/AthenaRuntime")
|
||||
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/dlarimer/projects/AthenaRuntime")
|
||||
|
||||
# Force unix paths in dependencies.
|
||||
SET(CMAKE_FORCE_UNIX_PATHS 1)
|
||||
|
||||
|
||||
# The C and CXX include file regular expressions for this directory.
|
||||
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
||||
1
vendor/libssh2-1.4.2/CMakeFiles/progress.marks
vendored
Normal file
1
vendor/libssh2-1.4.2/CMakeFiles/progress.marks
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
10
|
||||
8
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/C.includecache
vendored
Normal file
8
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/C.includecache
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
|
||||
|
||||
#IncludeRegexScan: ^.*$
|
||||
|
||||
#IncludeRegexComplain: ^$
|
||||
|
||||
#IncludeRegexTransform:
|
||||
|
||||
48
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/DependInfo.cmake
vendored
Normal file
48
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/DependInfo.cmake
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# The set of languages for which implicit dependencies are needed:
|
||||
SET(CMAKE_DEPENDS_LANGUAGES
|
||||
"C"
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
SET(CMAKE_DEPENDS_CHECK_C
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/agent.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/channel.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/comp.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/crypt.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/global.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/hostkey.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/keepalive.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/kex.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/knownhost.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/libgcrypt.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/mac.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/misc.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/openssl.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/packet.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/pem.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/publickey.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/scp.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/session.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/sftp.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/transport.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/userauth.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/version.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o"
|
||||
)
|
||||
SET(CMAKE_C_COMPILER_ID "GNU")
|
||||
|
||||
# Targets to which this target links.
|
||||
SET(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
)
|
||||
|
||||
# The include file search paths:
|
||||
SET(CMAKE_C_TARGET_INCLUDE_PATH
|
||||
"."
|
||||
"/usr/local/include"
|
||||
"vendor/fc/include"
|
||||
"libs/cpparchive/include"
|
||||
"/opt/local/include"
|
||||
"libs/fa/include"
|
||||
"vendor/fc/vendor/libssh2-1.4.2/include"
|
||||
)
|
||||
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
649
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make
vendored
Normal file
649
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make
vendored
Normal file
|
|
@ -0,0 +1,649 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /opt/local/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /opt/local/bin/cmake -E remove -f
|
||||
|
||||
# The program to use to edit the cache.
|
||||
CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# Include any dependencies generated for this target.
|
||||
include vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend.make
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/progress.make
|
||||
|
||||
# Include the compile flags for this target's objects.
|
||||
include vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o: vendor/fc/vendor/libssh2-1.4.2/src/agent.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_1)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/agent.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/agent.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/agent.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/agent.c > CMakeFiles/ssh2.dir/src/agent.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/agent.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/agent.c -o CMakeFiles/ssh2.dir/src/agent.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o: vendor/fc/vendor/libssh2-1.4.2/src/channel.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_2)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/channel.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/channel.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/channel.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/channel.c > CMakeFiles/ssh2.dir/src/channel.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/channel.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/channel.c -o CMakeFiles/ssh2.dir/src/channel.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o: vendor/fc/vendor/libssh2-1.4.2/src/comp.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_3)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/comp.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/comp.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/comp.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/comp.c > CMakeFiles/ssh2.dir/src/comp.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/comp.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/comp.c -o CMakeFiles/ssh2.dir/src/comp.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o: vendor/fc/vendor/libssh2-1.4.2/src/crypt.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_4)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/crypt.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/crypt.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/crypt.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/crypt.c > CMakeFiles/ssh2.dir/src/crypt.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/crypt.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/crypt.c -o CMakeFiles/ssh2.dir/src/crypt.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o: vendor/fc/vendor/libssh2-1.4.2/src/global.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_5)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/global.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/global.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/global.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/global.c > CMakeFiles/ssh2.dir/src/global.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/global.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/global.c -o CMakeFiles/ssh2.dir/src/global.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o: vendor/fc/vendor/libssh2-1.4.2/src/hostkey.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_6)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/hostkey.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/hostkey.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/hostkey.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/hostkey.c > CMakeFiles/ssh2.dir/src/hostkey.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/hostkey.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/hostkey.c -o CMakeFiles/ssh2.dir/src/hostkey.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o: vendor/fc/vendor/libssh2-1.4.2/src/keepalive.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_7)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/keepalive.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/keepalive.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/keepalive.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/keepalive.c > CMakeFiles/ssh2.dir/src/keepalive.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/keepalive.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/keepalive.c -o CMakeFiles/ssh2.dir/src/keepalive.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o: vendor/fc/vendor/libssh2-1.4.2/src/kex.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_8)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/kex.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/kex.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/kex.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/kex.c > CMakeFiles/ssh2.dir/src/kex.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/kex.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/kex.c -o CMakeFiles/ssh2.dir/src/kex.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o: vendor/fc/vendor/libssh2-1.4.2/src/knownhost.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_9)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/knownhost.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/knownhost.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/knownhost.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/knownhost.c > CMakeFiles/ssh2.dir/src/knownhost.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/knownhost.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/knownhost.c -o CMakeFiles/ssh2.dir/src/knownhost.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o: vendor/fc/vendor/libssh2-1.4.2/src/libgcrypt.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_10)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/libgcrypt.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/libgcrypt.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/libgcrypt.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/libgcrypt.c > CMakeFiles/ssh2.dir/src/libgcrypt.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/libgcrypt.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/libgcrypt.c -o CMakeFiles/ssh2.dir/src/libgcrypt.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o: vendor/fc/vendor/libssh2-1.4.2/src/mac.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_11)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/mac.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/mac.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/mac.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/mac.c > CMakeFiles/ssh2.dir/src/mac.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/mac.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/mac.c -o CMakeFiles/ssh2.dir/src/mac.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o: vendor/fc/vendor/libssh2-1.4.2/src/misc.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_12)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/misc.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/misc.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/misc.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/misc.c > CMakeFiles/ssh2.dir/src/misc.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/misc.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/misc.c -o CMakeFiles/ssh2.dir/src/misc.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o: vendor/fc/vendor/libssh2-1.4.2/src/openssl.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_13)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/openssl.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/openssl.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/openssl.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/openssl.c > CMakeFiles/ssh2.dir/src/openssl.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/openssl.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/openssl.c -o CMakeFiles/ssh2.dir/src/openssl.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o: vendor/fc/vendor/libssh2-1.4.2/src/packet.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_14)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/packet.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/packet.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/packet.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/packet.c > CMakeFiles/ssh2.dir/src/packet.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/packet.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/packet.c -o CMakeFiles/ssh2.dir/src/packet.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o: vendor/fc/vendor/libssh2-1.4.2/src/pem.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_15)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/pem.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/pem.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/pem.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/pem.c > CMakeFiles/ssh2.dir/src/pem.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/pem.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/pem.c -o CMakeFiles/ssh2.dir/src/pem.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o: vendor/fc/vendor/libssh2-1.4.2/src/publickey.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_16)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/publickey.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/publickey.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/publickey.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/publickey.c > CMakeFiles/ssh2.dir/src/publickey.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/publickey.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/publickey.c -o CMakeFiles/ssh2.dir/src/publickey.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o: vendor/fc/vendor/libssh2-1.4.2/src/scp.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_17)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/scp.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/scp.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/scp.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/scp.c > CMakeFiles/ssh2.dir/src/scp.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/scp.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/scp.c -o CMakeFiles/ssh2.dir/src/scp.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o: vendor/fc/vendor/libssh2-1.4.2/src/session.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_18)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/session.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/session.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/session.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/session.c > CMakeFiles/ssh2.dir/src/session.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/session.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/session.c -o CMakeFiles/ssh2.dir/src/session.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o: vendor/fc/vendor/libssh2-1.4.2/src/sftp.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_19)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/sftp.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/sftp.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/sftp.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/sftp.c > CMakeFiles/ssh2.dir/src/sftp.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/sftp.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/sftp.c -o CMakeFiles/ssh2.dir/src/sftp.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o: vendor/fc/vendor/libssh2-1.4.2/src/transport.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_20)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/transport.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/transport.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/transport.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/transport.c > CMakeFiles/ssh2.dir/src/transport.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/transport.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/transport.c -o CMakeFiles/ssh2.dir/src/transport.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o: vendor/fc/vendor/libssh2-1.4.2/src/userauth.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_21)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/userauth.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/userauth.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/userauth.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/userauth.c > CMakeFiles/ssh2.dir/src/userauth.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/userauth.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/userauth.c -o CMakeFiles/ssh2.dir/src/userauth.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o: vendor/fc/vendor/libssh2-1.4.2/src/version.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_22)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/ssh2.dir/src/version.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/version.c
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ssh2.dir/src/version.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/version.c > CMakeFiles/ssh2.dir/src/version.c.i
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ssh2.dir/src/version.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/src/version.c -o CMakeFiles/ssh2.dir/src/version.c.s
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.provides: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.provides
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.provides.build: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o
|
||||
|
||||
# Object files for target ssh2
|
||||
ssh2_OBJECTS = \
|
||||
"CMakeFiles/ssh2.dir/src/agent.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/channel.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/comp.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/crypt.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/global.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/hostkey.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/keepalive.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/kex.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/knownhost.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/libgcrypt.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/mac.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/misc.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/openssl.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/packet.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/pem.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/publickey.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/scp.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/session.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/sftp.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/transport.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/userauth.c.o" \
|
||||
"CMakeFiles/ssh2.dir/src/version.c.o"
|
||||
|
||||
# External object files for target ssh2
|
||||
ssh2_EXTERNAL_OBJECTS =
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make
|
||||
vendor/fc/vendor/libssh2-1.4.2/libssh2.a: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/link.txt
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking C static library libssh2.a"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && $(CMAKE_COMMAND) -P CMakeFiles/ssh2.dir/cmake_clean_target.cmake
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/ssh2.dir/link.txt --verbose=$(VERBOSE)
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build: vendor/fc/vendor/libssh2-1.4.2/libssh2.a
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o.requires
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o.requires
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/requires
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/clean:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 && $(CMAKE_COMMAND) -P CMakeFiles/ssh2.dir/cmake_clean.cmake
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/clean
|
||||
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/dlarimer/projects/AthenaRuntime /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 /Users/dlarimer/projects/AthenaRuntime /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2 /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend
|
||||
|
||||
31
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/cmake_clean.cmake
vendored
Normal file
31
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/cmake_clean.cmake
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FILE(REMOVE_RECURSE
|
||||
"CMakeFiles/ssh2.dir/src/agent.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/channel.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/comp.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/crypt.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/global.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/hostkey.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/keepalive.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/kex.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/knownhost.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/libgcrypt.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/mac.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/misc.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/openssl.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/packet.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/pem.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/publickey.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/scp.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/session.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/sftp.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/transport.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/userauth.c.o"
|
||||
"CMakeFiles/ssh2.dir/src/version.c.o"
|
||||
"libssh2.pdb"
|
||||
"libssh2.a"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
FOREACH(lang C)
|
||||
INCLUDE(CMakeFiles/ssh2.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
ENDFOREACH(lang)
|
||||
3
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/cmake_clean_target.cmake
vendored
Normal file
3
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/cmake_clean_target.cmake
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
FILE(REMOVE_RECURSE
|
||||
"libssh2.a"
|
||||
)
|
||||
1098
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend.internal
vendored
Normal file
1098
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend.internal
vendored
Normal file
File diff suppressed because it is too large
Load diff
1098
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend.make
vendored
Normal file
1098
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/depend.make
vendored
Normal file
File diff suppressed because it is too large
Load diff
8
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
vendored
Normal file
8
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/flags.make
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# compile C with /opt/local/bin/gcc
|
||||
C_FLAGS = -O3 -DNDEBUG -I/Users/dlarimer/projects/AthenaRuntime -I/usr/local/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/include -I/Users/dlarimer/projects/AthenaRuntime/libs/cpparchive/include -I/opt/local/include -I/Users/dlarimer/projects/AthenaRuntime/libs/fa/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/include
|
||||
|
||||
C_DEFINES =
|
||||
|
||||
2
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/link.txt
vendored
Normal file
2
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/link.txt
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/opt/local/bin/ar cr libssh2.a CMakeFiles/ssh2.dir/src/agent.c.o CMakeFiles/ssh2.dir/src/channel.c.o CMakeFiles/ssh2.dir/src/comp.c.o CMakeFiles/ssh2.dir/src/crypt.c.o CMakeFiles/ssh2.dir/src/global.c.o CMakeFiles/ssh2.dir/src/hostkey.c.o CMakeFiles/ssh2.dir/src/keepalive.c.o CMakeFiles/ssh2.dir/src/kex.c.o CMakeFiles/ssh2.dir/src/knownhost.c.o CMakeFiles/ssh2.dir/src/libgcrypt.c.o CMakeFiles/ssh2.dir/src/mac.c.o CMakeFiles/ssh2.dir/src/misc.c.o CMakeFiles/ssh2.dir/src/openssl.c.o CMakeFiles/ssh2.dir/src/packet.c.o CMakeFiles/ssh2.dir/src/pem.c.o CMakeFiles/ssh2.dir/src/publickey.c.o CMakeFiles/ssh2.dir/src/scp.c.o CMakeFiles/ssh2.dir/src/session.c.o CMakeFiles/ssh2.dir/src/sftp.c.o CMakeFiles/ssh2.dir/src/transport.c.o CMakeFiles/ssh2.dir/src/userauth.c.o CMakeFiles/ssh2.dir/src/version.c.o
|
||||
/opt/local/bin/ranlib libssh2.a
|
||||
23
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/progress.make
vendored
Normal file
23
vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/progress.make
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
CMAKE_PROGRESS_1 =
|
||||
CMAKE_PROGRESS_2 = 75
|
||||
CMAKE_PROGRESS_3 =
|
||||
CMAKE_PROGRESS_4 = 76
|
||||
CMAKE_PROGRESS_5 =
|
||||
CMAKE_PROGRESS_6 = 77
|
||||
CMAKE_PROGRESS_7 =
|
||||
CMAKE_PROGRESS_8 = 78
|
||||
CMAKE_PROGRESS_9 =
|
||||
CMAKE_PROGRESS_10 = 79
|
||||
CMAKE_PROGRESS_11 =
|
||||
CMAKE_PROGRESS_12 = 80
|
||||
CMAKE_PROGRESS_13 =
|
||||
CMAKE_PROGRESS_14 =
|
||||
CMAKE_PROGRESS_15 = 81
|
||||
CMAKE_PROGRESS_16 =
|
||||
CMAKE_PROGRESS_17 = 82
|
||||
CMAKE_PROGRESS_18 =
|
||||
CMAKE_PROGRESS_19 = 83
|
||||
CMAKE_PROGRESS_20 =
|
||||
CMAKE_PROGRESS_21 = 84
|
||||
CMAKE_PROGRESS_22 =
|
||||
|
||||
28
vendor/libssh2-1.4.2/CMakeLists.txt
vendored
Normal file
28
vendor/libssh2-1.4.2/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
include_directories(include)
|
||||
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
||||
SET( sources
|
||||
src/agent.c
|
||||
src/channel.c
|
||||
src/comp.c
|
||||
src/crypt.c
|
||||
src/global.c
|
||||
src/hostkey.c
|
||||
src/keepalive.c
|
||||
src/kex.c
|
||||
src/knownhost.c
|
||||
src/libgcrypt.c
|
||||
src/mac.c
|
||||
src/misc.c
|
||||
src/openssl.c
|
||||
src/packet.c
|
||||
src/pem.c
|
||||
src/publickey.c
|
||||
src/scp.c
|
||||
src/session.c
|
||||
src/sftp.c
|
||||
src/transport.c
|
||||
src/userauth.c
|
||||
src/version.c
|
||||
)
|
||||
|
||||
SETUP_LIBRARY( ssh2 SOURCES ${sources} LIBRARIES ${libraries} LIBRARY_TYPE STATIC )
|
||||
42
vendor/libssh2-1.4.2/COPYING
vendored
Normal file
42
vendor/libssh2-1.4.2/COPYING
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2005,2006 Mikhail Gusarov <dottedmag@dottedmag.net>
|
||||
* Copyright (c) 2006-2007 The Written Word, Inc.
|
||||
* Copyright (c) 2007 Eli Fant <elifantu@mail.ru>
|
||||
* Copyright (c) 2009 Daniel Stenberg
|
||||
* Copyright (C) 2008, 2009 Simon Josefsson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
1
vendor/libssh2-1.4.2/ChangeLog
vendored
Normal file
1
vendor/libssh2-1.4.2/ChangeLog
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
see NEWS
|
||||
13
vendor/libssh2-1.4.2/HACKING
vendored
Normal file
13
vendor/libssh2-1.4.2/HACKING
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
libssh2 source code style guide:
|
||||
|
||||
- 4 level indent
|
||||
- spaces-only (no tabs)
|
||||
- open braces on the if/for line:
|
||||
|
||||
if (banana) {
|
||||
go_nuts();
|
||||
}
|
||||
|
||||
- keep source lines shorter than 80 columns
|
||||
- See libssh2-style.el for how to achieve this within Emacs
|
||||
776
vendor/libssh2-1.4.2/Makefile
vendored
Normal file
776
vendor/libssh2-1.4.2/Makefile
vendored
Normal file
|
|
@ -0,0 +1,776 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /opt/local/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /opt/local/bin/cmake -E remove -f
|
||||
|
||||
# The program to use to edit the cache.
|
||||
CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/opt/local/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/opt/local/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/opt/local/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: install/local
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: install/strip
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/opt/local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -E cmake_progress_start /Users/dlarimer/projects/AthenaRuntime/CMakeFiles /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/progress.marks
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/libssh2-1.4.2/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /Users/dlarimer/projects/AthenaRuntime/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/libssh2-1.4.2/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/libssh2-1.4.2/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/libssh2-1.4.2/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/rule:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/rule
|
||||
.PHONY : vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
ssh2: vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/rule
|
||||
.PHONY : ssh2
|
||||
|
||||
# fast build rule for target.
|
||||
ssh2/fast:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build
|
||||
.PHONY : ssh2/fast
|
||||
|
||||
src/agent.o: src/agent.c.o
|
||||
.PHONY : src/agent.o
|
||||
|
||||
# target to build an object file
|
||||
src/agent.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.o
|
||||
.PHONY : src/agent.c.o
|
||||
|
||||
src/agent.i: src/agent.c.i
|
||||
.PHONY : src/agent.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/agent.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.i
|
||||
.PHONY : src/agent.c.i
|
||||
|
||||
src/agent.s: src/agent.c.s
|
||||
.PHONY : src/agent.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/agent.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/agent.c.s
|
||||
.PHONY : src/agent.c.s
|
||||
|
||||
src/channel.o: src/channel.c.o
|
||||
.PHONY : src/channel.o
|
||||
|
||||
# target to build an object file
|
||||
src/channel.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.o
|
||||
.PHONY : src/channel.c.o
|
||||
|
||||
src/channel.i: src/channel.c.i
|
||||
.PHONY : src/channel.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/channel.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.i
|
||||
.PHONY : src/channel.c.i
|
||||
|
||||
src/channel.s: src/channel.c.s
|
||||
.PHONY : src/channel.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/channel.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/channel.c.s
|
||||
.PHONY : src/channel.c.s
|
||||
|
||||
src/comp.o: src/comp.c.o
|
||||
.PHONY : src/comp.o
|
||||
|
||||
# target to build an object file
|
||||
src/comp.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.o
|
||||
.PHONY : src/comp.c.o
|
||||
|
||||
src/comp.i: src/comp.c.i
|
||||
.PHONY : src/comp.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/comp.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.i
|
||||
.PHONY : src/comp.c.i
|
||||
|
||||
src/comp.s: src/comp.c.s
|
||||
.PHONY : src/comp.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/comp.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/comp.c.s
|
||||
.PHONY : src/comp.c.s
|
||||
|
||||
src/crypt.o: src/crypt.c.o
|
||||
.PHONY : src/crypt.o
|
||||
|
||||
# target to build an object file
|
||||
src/crypt.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.o
|
||||
.PHONY : src/crypt.c.o
|
||||
|
||||
src/crypt.i: src/crypt.c.i
|
||||
.PHONY : src/crypt.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/crypt.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.i
|
||||
.PHONY : src/crypt.c.i
|
||||
|
||||
src/crypt.s: src/crypt.c.s
|
||||
.PHONY : src/crypt.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/crypt.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/crypt.c.s
|
||||
.PHONY : src/crypt.c.s
|
||||
|
||||
src/global.o: src/global.c.o
|
||||
.PHONY : src/global.o
|
||||
|
||||
# target to build an object file
|
||||
src/global.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.o
|
||||
.PHONY : src/global.c.o
|
||||
|
||||
src/global.i: src/global.c.i
|
||||
.PHONY : src/global.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/global.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.i
|
||||
.PHONY : src/global.c.i
|
||||
|
||||
src/global.s: src/global.c.s
|
||||
.PHONY : src/global.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/global.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/global.c.s
|
||||
.PHONY : src/global.c.s
|
||||
|
||||
src/hostkey.o: src/hostkey.c.o
|
||||
.PHONY : src/hostkey.o
|
||||
|
||||
# target to build an object file
|
||||
src/hostkey.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.o
|
||||
.PHONY : src/hostkey.c.o
|
||||
|
||||
src/hostkey.i: src/hostkey.c.i
|
||||
.PHONY : src/hostkey.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/hostkey.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.i
|
||||
.PHONY : src/hostkey.c.i
|
||||
|
||||
src/hostkey.s: src/hostkey.c.s
|
||||
.PHONY : src/hostkey.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/hostkey.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/hostkey.c.s
|
||||
.PHONY : src/hostkey.c.s
|
||||
|
||||
src/keepalive.o: src/keepalive.c.o
|
||||
.PHONY : src/keepalive.o
|
||||
|
||||
# target to build an object file
|
||||
src/keepalive.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.o
|
||||
.PHONY : src/keepalive.c.o
|
||||
|
||||
src/keepalive.i: src/keepalive.c.i
|
||||
.PHONY : src/keepalive.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/keepalive.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.i
|
||||
.PHONY : src/keepalive.c.i
|
||||
|
||||
src/keepalive.s: src/keepalive.c.s
|
||||
.PHONY : src/keepalive.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/keepalive.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/keepalive.c.s
|
||||
.PHONY : src/keepalive.c.s
|
||||
|
||||
src/kex.o: src/kex.c.o
|
||||
.PHONY : src/kex.o
|
||||
|
||||
# target to build an object file
|
||||
src/kex.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.o
|
||||
.PHONY : src/kex.c.o
|
||||
|
||||
src/kex.i: src/kex.c.i
|
||||
.PHONY : src/kex.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/kex.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.i
|
||||
.PHONY : src/kex.c.i
|
||||
|
||||
src/kex.s: src/kex.c.s
|
||||
.PHONY : src/kex.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/kex.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/kex.c.s
|
||||
.PHONY : src/kex.c.s
|
||||
|
||||
src/knownhost.o: src/knownhost.c.o
|
||||
.PHONY : src/knownhost.o
|
||||
|
||||
# target to build an object file
|
||||
src/knownhost.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.o
|
||||
.PHONY : src/knownhost.c.o
|
||||
|
||||
src/knownhost.i: src/knownhost.c.i
|
||||
.PHONY : src/knownhost.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/knownhost.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.i
|
||||
.PHONY : src/knownhost.c.i
|
||||
|
||||
src/knownhost.s: src/knownhost.c.s
|
||||
.PHONY : src/knownhost.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/knownhost.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/knownhost.c.s
|
||||
.PHONY : src/knownhost.c.s
|
||||
|
||||
src/libgcrypt.o: src/libgcrypt.c.o
|
||||
.PHONY : src/libgcrypt.o
|
||||
|
||||
# target to build an object file
|
||||
src/libgcrypt.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.o
|
||||
.PHONY : src/libgcrypt.c.o
|
||||
|
||||
src/libgcrypt.i: src/libgcrypt.c.i
|
||||
.PHONY : src/libgcrypt.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/libgcrypt.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.i
|
||||
.PHONY : src/libgcrypt.c.i
|
||||
|
||||
src/libgcrypt.s: src/libgcrypt.c.s
|
||||
.PHONY : src/libgcrypt.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/libgcrypt.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/libgcrypt.c.s
|
||||
.PHONY : src/libgcrypt.c.s
|
||||
|
||||
src/mac.o: src/mac.c.o
|
||||
.PHONY : src/mac.o
|
||||
|
||||
# target to build an object file
|
||||
src/mac.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.o
|
||||
.PHONY : src/mac.c.o
|
||||
|
||||
src/mac.i: src/mac.c.i
|
||||
.PHONY : src/mac.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/mac.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.i
|
||||
.PHONY : src/mac.c.i
|
||||
|
||||
src/mac.s: src/mac.c.s
|
||||
.PHONY : src/mac.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/mac.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/mac.c.s
|
||||
.PHONY : src/mac.c.s
|
||||
|
||||
src/misc.o: src/misc.c.o
|
||||
.PHONY : src/misc.o
|
||||
|
||||
# target to build an object file
|
||||
src/misc.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.o
|
||||
.PHONY : src/misc.c.o
|
||||
|
||||
src/misc.i: src/misc.c.i
|
||||
.PHONY : src/misc.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/misc.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.i
|
||||
.PHONY : src/misc.c.i
|
||||
|
||||
src/misc.s: src/misc.c.s
|
||||
.PHONY : src/misc.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/misc.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/misc.c.s
|
||||
.PHONY : src/misc.c.s
|
||||
|
||||
src/openssl.o: src/openssl.c.o
|
||||
.PHONY : src/openssl.o
|
||||
|
||||
# target to build an object file
|
||||
src/openssl.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.o
|
||||
.PHONY : src/openssl.c.o
|
||||
|
||||
src/openssl.i: src/openssl.c.i
|
||||
.PHONY : src/openssl.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/openssl.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.i
|
||||
.PHONY : src/openssl.c.i
|
||||
|
||||
src/openssl.s: src/openssl.c.s
|
||||
.PHONY : src/openssl.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/openssl.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/openssl.c.s
|
||||
.PHONY : src/openssl.c.s
|
||||
|
||||
src/packet.o: src/packet.c.o
|
||||
.PHONY : src/packet.o
|
||||
|
||||
# target to build an object file
|
||||
src/packet.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.o
|
||||
.PHONY : src/packet.c.o
|
||||
|
||||
src/packet.i: src/packet.c.i
|
||||
.PHONY : src/packet.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/packet.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.i
|
||||
.PHONY : src/packet.c.i
|
||||
|
||||
src/packet.s: src/packet.c.s
|
||||
.PHONY : src/packet.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/packet.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/packet.c.s
|
||||
.PHONY : src/packet.c.s
|
||||
|
||||
src/pem.o: src/pem.c.o
|
||||
.PHONY : src/pem.o
|
||||
|
||||
# target to build an object file
|
||||
src/pem.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.o
|
||||
.PHONY : src/pem.c.o
|
||||
|
||||
src/pem.i: src/pem.c.i
|
||||
.PHONY : src/pem.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/pem.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.i
|
||||
.PHONY : src/pem.c.i
|
||||
|
||||
src/pem.s: src/pem.c.s
|
||||
.PHONY : src/pem.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/pem.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/pem.c.s
|
||||
.PHONY : src/pem.c.s
|
||||
|
||||
src/publickey.o: src/publickey.c.o
|
||||
.PHONY : src/publickey.o
|
||||
|
||||
# target to build an object file
|
||||
src/publickey.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.o
|
||||
.PHONY : src/publickey.c.o
|
||||
|
||||
src/publickey.i: src/publickey.c.i
|
||||
.PHONY : src/publickey.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/publickey.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.i
|
||||
.PHONY : src/publickey.c.i
|
||||
|
||||
src/publickey.s: src/publickey.c.s
|
||||
.PHONY : src/publickey.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/publickey.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/publickey.c.s
|
||||
.PHONY : src/publickey.c.s
|
||||
|
||||
src/scp.o: src/scp.c.o
|
||||
.PHONY : src/scp.o
|
||||
|
||||
# target to build an object file
|
||||
src/scp.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.o
|
||||
.PHONY : src/scp.c.o
|
||||
|
||||
src/scp.i: src/scp.c.i
|
||||
.PHONY : src/scp.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/scp.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.i
|
||||
.PHONY : src/scp.c.i
|
||||
|
||||
src/scp.s: src/scp.c.s
|
||||
.PHONY : src/scp.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/scp.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/scp.c.s
|
||||
.PHONY : src/scp.c.s
|
||||
|
||||
src/session.o: src/session.c.o
|
||||
.PHONY : src/session.o
|
||||
|
||||
# target to build an object file
|
||||
src/session.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.o
|
||||
.PHONY : src/session.c.o
|
||||
|
||||
src/session.i: src/session.c.i
|
||||
.PHONY : src/session.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/session.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.i
|
||||
.PHONY : src/session.c.i
|
||||
|
||||
src/session.s: src/session.c.s
|
||||
.PHONY : src/session.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/session.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/session.c.s
|
||||
.PHONY : src/session.c.s
|
||||
|
||||
src/sftp.o: src/sftp.c.o
|
||||
.PHONY : src/sftp.o
|
||||
|
||||
# target to build an object file
|
||||
src/sftp.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.o
|
||||
.PHONY : src/sftp.c.o
|
||||
|
||||
src/sftp.i: src/sftp.c.i
|
||||
.PHONY : src/sftp.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sftp.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.i
|
||||
.PHONY : src/sftp.c.i
|
||||
|
||||
src/sftp.s: src/sftp.c.s
|
||||
.PHONY : src/sftp.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sftp.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/sftp.c.s
|
||||
.PHONY : src/sftp.c.s
|
||||
|
||||
src/transport.o: src/transport.c.o
|
||||
.PHONY : src/transport.o
|
||||
|
||||
# target to build an object file
|
||||
src/transport.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.o
|
||||
.PHONY : src/transport.c.o
|
||||
|
||||
src/transport.i: src/transport.c.i
|
||||
.PHONY : src/transport.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/transport.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.i
|
||||
.PHONY : src/transport.c.i
|
||||
|
||||
src/transport.s: src/transport.c.s
|
||||
.PHONY : src/transport.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/transport.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/transport.c.s
|
||||
.PHONY : src/transport.c.s
|
||||
|
||||
src/userauth.o: src/userauth.c.o
|
||||
.PHONY : src/userauth.o
|
||||
|
||||
# target to build an object file
|
||||
src/userauth.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.o
|
||||
.PHONY : src/userauth.c.o
|
||||
|
||||
src/userauth.i: src/userauth.c.i
|
||||
.PHONY : src/userauth.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/userauth.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.i
|
||||
.PHONY : src/userauth.c.i
|
||||
|
||||
src/userauth.s: src/userauth.c.s
|
||||
.PHONY : src/userauth.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/userauth.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/userauth.c.s
|
||||
.PHONY : src/userauth.c.s
|
||||
|
||||
src/version.o: src/version.c.o
|
||||
.PHONY : src/version.o
|
||||
|
||||
# target to build an object file
|
||||
src/version.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.o
|
||||
.PHONY : src/version.c.o
|
||||
|
||||
src/version.i: src/version.c.i
|
||||
.PHONY : src/version.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/version.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.i
|
||||
.PHONY : src/version.c.i
|
||||
|
||||
src/version.s: src/version.c.s
|
||||
.PHONY : src/version.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/version.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/build.make vendor/fc/vendor/libssh2-1.4.2/CMakeFiles/ssh2.dir/src/version.c.s
|
||||
.PHONY : src/version.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... ssh2"
|
||||
@echo "... src/agent.o"
|
||||
@echo "... src/agent.i"
|
||||
@echo "... src/agent.s"
|
||||
@echo "... src/channel.o"
|
||||
@echo "... src/channel.i"
|
||||
@echo "... src/channel.s"
|
||||
@echo "... src/comp.o"
|
||||
@echo "... src/comp.i"
|
||||
@echo "... src/comp.s"
|
||||
@echo "... src/crypt.o"
|
||||
@echo "... src/crypt.i"
|
||||
@echo "... src/crypt.s"
|
||||
@echo "... src/global.o"
|
||||
@echo "... src/global.i"
|
||||
@echo "... src/global.s"
|
||||
@echo "... src/hostkey.o"
|
||||
@echo "... src/hostkey.i"
|
||||
@echo "... src/hostkey.s"
|
||||
@echo "... src/keepalive.o"
|
||||
@echo "... src/keepalive.i"
|
||||
@echo "... src/keepalive.s"
|
||||
@echo "... src/kex.o"
|
||||
@echo "... src/kex.i"
|
||||
@echo "... src/kex.s"
|
||||
@echo "... src/knownhost.o"
|
||||
@echo "... src/knownhost.i"
|
||||
@echo "... src/knownhost.s"
|
||||
@echo "... src/libgcrypt.o"
|
||||
@echo "... src/libgcrypt.i"
|
||||
@echo "... src/libgcrypt.s"
|
||||
@echo "... src/mac.o"
|
||||
@echo "... src/mac.i"
|
||||
@echo "... src/mac.s"
|
||||
@echo "... src/misc.o"
|
||||
@echo "... src/misc.i"
|
||||
@echo "... src/misc.s"
|
||||
@echo "... src/openssl.o"
|
||||
@echo "... src/openssl.i"
|
||||
@echo "... src/openssl.s"
|
||||
@echo "... src/packet.o"
|
||||
@echo "... src/packet.i"
|
||||
@echo "... src/packet.s"
|
||||
@echo "... src/pem.o"
|
||||
@echo "... src/pem.i"
|
||||
@echo "... src/pem.s"
|
||||
@echo "... src/publickey.o"
|
||||
@echo "... src/publickey.i"
|
||||
@echo "... src/publickey.s"
|
||||
@echo "... src/scp.o"
|
||||
@echo "... src/scp.i"
|
||||
@echo "... src/scp.s"
|
||||
@echo "... src/session.o"
|
||||
@echo "... src/session.i"
|
||||
@echo "... src/session.s"
|
||||
@echo "... src/sftp.o"
|
||||
@echo "... src/sftp.i"
|
||||
@echo "... src/sftp.s"
|
||||
@echo "... src/transport.o"
|
||||
@echo "... src/transport.i"
|
||||
@echo "... src/transport.s"
|
||||
@echo "... src/userauth.o"
|
||||
@echo "... src/userauth.i"
|
||||
@echo "... src/userauth.s"
|
||||
@echo "... src/version.o"
|
||||
@echo "... src/version.i"
|
||||
@echo "... src/version.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
102
vendor/libssh2-1.4.2/README
vendored
Normal file
102
vendor/libssh2-1.4.2/README
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
libssh2 - SSH2 library
|
||||
======================
|
||||
|
||||
libssh2 is a library implementing the SSH2 protocol, available under
|
||||
the revised BSD license.
|
||||
|
||||
Web site: http://www.libssh2.org/
|
||||
|
||||
Mailing list: http://cool.haxx.se/mailman/listinfo/libssh2-devel
|
||||
|
||||
The rest of this readme does not apply as the build system has been replaced
|
||||
with CMake for use in mace on windows/linux and mac.
|
||||
|
||||
|
||||
|
||||
Generic installation instructions are in INSTALL. Some ./configure
|
||||
options deserve additional comments:
|
||||
|
||||
* --enable-crypt-none
|
||||
|
||||
The SSH2 Transport allows for unencrypted data
|
||||
transmission using the "none" cipher. Because this is
|
||||
such a huge security hole, it is typically disabled on
|
||||
SSH2 implementations and is disabled in libssh2 by
|
||||
default as well.
|
||||
|
||||
Enabling this option will allow for "none" as a
|
||||
negotiable method, however it still requires that the
|
||||
method be advertized by the remote end and that no
|
||||
more-preferable methods are available.
|
||||
|
||||
* --enable-mac-none
|
||||
|
||||
The SSH2 Transport also allows implementations to
|
||||
forego a message authentication code. While this is
|
||||
less of a security risk than using a "none" cipher, it
|
||||
is still not recommended as disabling MAC hashes
|
||||
removes a layer of security.
|
||||
|
||||
Enabling this option will allow for "none" as a
|
||||
negotiable method, however it still requires that the
|
||||
method be advertized by the remote end and that no
|
||||
more-preferable methods are available.
|
||||
|
||||
* --disable-gex-new
|
||||
|
||||
The diffie-hellman-group-exchange-sha1 (dh-gex) key
|
||||
exchange method originally defined an exchange
|
||||
negotiation using packet type 30 to request a
|
||||
generation pair based on a single target value. Later
|
||||
refinement of dh-gex provided for range and target
|
||||
values. By default libssh2 will use the newer range
|
||||
method.
|
||||
|
||||
If you experience trouble connecting to an old SSH
|
||||
server using dh-gex, try this option to fallback on
|
||||
the older more reliable method.
|
||||
|
||||
* --with-libgcrypt
|
||||
* --without-libgcrypt
|
||||
* --with-libgcrypt-prefix=DIR
|
||||
|
||||
libssh2 can use the Libgcrypt library
|
||||
(http://www.gnupg.org/) for cryptographic operations.
|
||||
Either Libgcrypt or OpenSSL is required.
|
||||
|
||||
Configure will attempt to locate Libgcrypt
|
||||
automatically.
|
||||
|
||||
If your installation of Libgcrypt is in another
|
||||
location, specify it using --with-libgcrypt-prefix.
|
||||
|
||||
* --with-openssl
|
||||
* --without-openssl
|
||||
* --with-libssl-prefix=[DIR]
|
||||
|
||||
libssh2 can use the OpenSSL library
|
||||
(http://www.openssl.org) for cryptographic operations.
|
||||
Either Libgcrypt or OpenSSL is required.
|
||||
|
||||
Configure will attempt to locate OpenSSL in the
|
||||
default location.
|
||||
|
||||
If your installation of OpenSSL is in another
|
||||
location, specify it using --with-libssl-prefix.
|
||||
|
||||
* --with-libz
|
||||
* --without-libz
|
||||
* --with-libz-prefix=[DIR]
|
||||
|
||||
If present, libssh2 will attempt to use the zlib
|
||||
(http://www.zlib.org) for payload compression, however
|
||||
zlib is not required.
|
||||
|
||||
If your installation of Libz is in another location,
|
||||
specify it using --with-libz-prefix.
|
||||
|
||||
* --enable-debug
|
||||
|
||||
Will make the build use more pedantic and strict compiler
|
||||
options as well as enable the libssh2_trace() function (for
|
||||
showing debug traces).
|
||||
21
vendor/libssh2-1.4.2/RELEASE-NOTES
vendored
Normal file
21
vendor/libssh2-1.4.2/RELEASE-NOTES
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
libssh2 1.4.2
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o Return LIBSSH2_ERROR_SOCKET_DISCONNECT on EOF when reading banner
|
||||
o userauth.c: fread() from public key file to correctly detect any errors
|
||||
o configure.ac: Add option to disable build of the example applications
|
||||
o Added 'Requires.private:' line to libssh2.pc
|
||||
o SFTP: filter off incoming "zombie" responses
|
||||
o gettimeofday: no need for a replacement under cygwin
|
||||
o SSH_MSG_CHANNEL_REQUEST: default to want_reply
|
||||
o win32/libssh2_config.h: Remove hardcoded #define LIBSSH2_HAVE_ZLIB
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Alexander Lamaison, Rafael Kitover, Guenter Knauf, Peter Stuge,
|
||||
Oleksiy Zagorskyi
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
37
vendor/libssh2-1.4.2/cmake_install.cmake
vendored
Normal file
37
vendor/libssh2-1.4.2/cmake_install.cmake
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Install script for directory: /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2
|
||||
|
||||
# Set the install prefix
|
||||
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
IF(BUILD_TYPE)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
||||
# Set the component getting installed.
|
||||
IF(NOT CMAKE_INSTALL_COMPONENT)
|
||||
IF(COMPONENT)
|
||||
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
||||
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
ELSE(COMPONENT)
|
||||
SET(CMAKE_INSTALL_COMPONENT)
|
||||
ENDIF(COMPONENT)
|
||||
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
||||
|
||||
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
||||
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/libssh2.a")
|
||||
IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libssh2.a" AND
|
||||
NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libssh2.a")
|
||||
EXECUTE_PROCESS(COMMAND "/opt/local/bin/ranlib" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libssh2.a")
|
||||
ENDIF()
|
||||
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
||||
|
||||
1188
vendor/libssh2-1.4.2/include/libssh2.h
vendored
Normal file
1188
vendor/libssh2-1.4.2/include/libssh2.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
118
vendor/libssh2-1.4.2/include/libssh2_publickey.h
vendored
Normal file
118
vendor/libssh2-1.4.2/include/libssh2_publickey.h
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
/* Copyright (c) 2004-2006, Sara Golemon <sarag@libssh2.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* Note: This include file is only needed for using the
|
||||
* publickey SUBSYSTEM which is not the same as publickey
|
||||
* authentication. For authentication you only need libssh2.h
|
||||
*
|
||||
* For more information on the publickey subsystem,
|
||||
* refer to IETF draft: secsh-publickey
|
||||
*/
|
||||
|
||||
#ifndef LIBSSH2_PUBLICKEY_H
|
||||
#define LIBSSH2_PUBLICKEY_H 1
|
||||
|
||||
#include "libssh2.h"
|
||||
|
||||
typedef struct _LIBSSH2_PUBLICKEY LIBSSH2_PUBLICKEY;
|
||||
|
||||
typedef struct _libssh2_publickey_attribute {
|
||||
const char *name;
|
||||
unsigned long name_len;
|
||||
const char *value;
|
||||
unsigned long value_len;
|
||||
char mandatory;
|
||||
} libssh2_publickey_attribute;
|
||||
|
||||
typedef struct _libssh2_publickey_list {
|
||||
unsigned char *packet; /* For freeing */
|
||||
|
||||
const unsigned char *name;
|
||||
unsigned long name_len;
|
||||
const unsigned char *blob;
|
||||
unsigned long blob_len;
|
||||
unsigned long num_attrs;
|
||||
libssh2_publickey_attribute *attrs; /* free me */
|
||||
} libssh2_publickey_list;
|
||||
|
||||
/* Generally use the first macro here, but if both name and value are string literals, you can use _fast() to take advantage of preprocessing */
|
||||
#define libssh2_publickey_attribute(name, value, mandatory) \
|
||||
{ (name), strlen(name), (value), strlen(value), (mandatory) },
|
||||
#define libssh2_publickey_attribute_fast(name, value, mandatory) \
|
||||
{ (name), sizeof(name) - 1, (value), sizeof(value) - 1, (mandatory) },
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Publickey Subsystem */
|
||||
LIBSSH2_API LIBSSH2_PUBLICKEY *libssh2_publickey_init(LIBSSH2_SESSION *session);
|
||||
|
||||
LIBSSH2_API int libssh2_publickey_add_ex(LIBSSH2_PUBLICKEY *pkey,
|
||||
const unsigned char *name,
|
||||
unsigned long name_len,
|
||||
const unsigned char *blob,
|
||||
unsigned long blob_len, char overwrite,
|
||||
unsigned long num_attrs,
|
||||
const libssh2_publickey_attribute attrs[]);
|
||||
#define libssh2_publickey_add(pkey, name, blob, blob_len, overwrite, \
|
||||
num_attrs, attrs) \
|
||||
libssh2_publickey_add_ex((pkey), (name), strlen(name), (blob), (blob_len), \
|
||||
(overwrite), (num_attrs), (attrs))
|
||||
|
||||
LIBSSH2_API int libssh2_publickey_remove_ex(LIBSSH2_PUBLICKEY *pkey,
|
||||
const unsigned char *name,
|
||||
unsigned long name_len,
|
||||
const unsigned char *blob,
|
||||
unsigned long blob_len);
|
||||
#define libssh2_publickey_remove(pkey, name, blob, blob_len) \
|
||||
libssh2_publickey_remove_ex((pkey), (name), strlen(name), (blob), (blob_len))
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_publickey_list_fetch(LIBSSH2_PUBLICKEY *pkey,
|
||||
unsigned long *num_keys,
|
||||
libssh2_publickey_list **pkey_list);
|
||||
LIBSSH2_API void libssh2_publickey_list_free(LIBSSH2_PUBLICKEY *pkey,
|
||||
libssh2_publickey_list *pkey_list);
|
||||
|
||||
LIBSSH2_API int libssh2_publickey_shutdown(LIBSSH2_PUBLICKEY *pkey);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* ifndef: LIBSSH2_PUBLICKEY_H */
|
||||
345
vendor/libssh2-1.4.2/include/libssh2_sftp.h
vendored
Normal file
345
vendor/libssh2-1.4.2/include/libssh2_sftp.h
vendored
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
/* Copyright (c) 2004-2008, Sara Golemon <sarag@libssh2.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef LIBSSH2_SFTP_H
|
||||
#define LIBSSH2_SFTP_H 1
|
||||
|
||||
#include "libssh2.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Note: Version 6 was documented at the time of writing
|
||||
* However it was marked as "DO NOT IMPLEMENT" due to pending changes
|
||||
*
|
||||
* Let's start with Version 3 (The version found in OpenSSH) and go from there
|
||||
*/
|
||||
#define LIBSSH2_SFTP_VERSION 3
|
||||
|
||||
typedef struct _LIBSSH2_SFTP LIBSSH2_SFTP;
|
||||
typedef struct _LIBSSH2_SFTP_HANDLE LIBSSH2_SFTP_HANDLE;
|
||||
typedef struct _LIBSSH2_SFTP_ATTRIBUTES LIBSSH2_SFTP_ATTRIBUTES;
|
||||
typedef struct _LIBSSH2_SFTP_STATVFS LIBSSH2_SFTP_STATVFS;
|
||||
|
||||
/* Flags for open_ex() */
|
||||
#define LIBSSH2_SFTP_OPENFILE 0
|
||||
#define LIBSSH2_SFTP_OPENDIR 1
|
||||
|
||||
/* Flags for rename_ex() */
|
||||
#define LIBSSH2_SFTP_RENAME_OVERWRITE 0x00000001
|
||||
#define LIBSSH2_SFTP_RENAME_ATOMIC 0x00000002
|
||||
#define LIBSSH2_SFTP_RENAME_NATIVE 0x00000004
|
||||
|
||||
/* Flags for stat_ex() */
|
||||
#define LIBSSH2_SFTP_STAT 0
|
||||
#define LIBSSH2_SFTP_LSTAT 1
|
||||
#define LIBSSH2_SFTP_SETSTAT 2
|
||||
|
||||
/* Flags for symlink_ex() */
|
||||
#define LIBSSH2_SFTP_SYMLINK 0
|
||||
#define LIBSSH2_SFTP_READLINK 1
|
||||
#define LIBSSH2_SFTP_REALPATH 2
|
||||
|
||||
/* SFTP attribute flag bits */
|
||||
#define LIBSSH2_SFTP_ATTR_SIZE 0x00000001
|
||||
#define LIBSSH2_SFTP_ATTR_UIDGID 0x00000002
|
||||
#define LIBSSH2_SFTP_ATTR_PERMISSIONS 0x00000004
|
||||
#define LIBSSH2_SFTP_ATTR_ACMODTIME 0x00000008
|
||||
#define LIBSSH2_SFTP_ATTR_EXTENDED 0x80000000
|
||||
|
||||
/* SFTP statvfs flag bits */
|
||||
#define LIBSSH2_SFTP_ST_RDONLY 0x00000001
|
||||
#define LIBSSH2_SFTP_ST_NOSUID 0x00000002
|
||||
|
||||
struct _LIBSSH2_SFTP_ATTRIBUTES {
|
||||
/* If flags & ATTR_* bit is set, then the value in this struct will be
|
||||
* meaningful Otherwise it should be ignored
|
||||
*/
|
||||
unsigned long flags;
|
||||
|
||||
libssh2_uint64_t filesize;
|
||||
unsigned long uid, gid;
|
||||
unsigned long permissions;
|
||||
unsigned long atime, mtime;
|
||||
};
|
||||
|
||||
struct _LIBSSH2_SFTP_STATVFS {
|
||||
libssh2_uint64_t f_bsize; /* file system block size */
|
||||
libssh2_uint64_t f_frsize; /* fragment size */
|
||||
libssh2_uint64_t f_blocks; /* size of fs in f_frsize units */
|
||||
libssh2_uint64_t f_bfree; /* # free blocks */
|
||||
libssh2_uint64_t f_bavail; /* # free blocks for non-root */
|
||||
libssh2_uint64_t f_files; /* # inodes */
|
||||
libssh2_uint64_t f_ffree; /* # free inodes */
|
||||
libssh2_uint64_t f_favail; /* # free inodes for non-root */
|
||||
libssh2_uint64_t f_fsid; /* file system ID */
|
||||
libssh2_uint64_t f_flag; /* mount flags */
|
||||
libssh2_uint64_t f_namemax; /* maximum filename length */
|
||||
};
|
||||
|
||||
/* SFTP filetypes */
|
||||
#define LIBSSH2_SFTP_TYPE_REGULAR 1
|
||||
#define LIBSSH2_SFTP_TYPE_DIRECTORY 2
|
||||
#define LIBSSH2_SFTP_TYPE_SYMLINK 3
|
||||
#define LIBSSH2_SFTP_TYPE_SPECIAL 4
|
||||
#define LIBSSH2_SFTP_TYPE_UNKNOWN 5
|
||||
#define LIBSSH2_SFTP_TYPE_SOCKET 6
|
||||
#define LIBSSH2_SFTP_TYPE_CHAR_DEVICE 7
|
||||
#define LIBSSH2_SFTP_TYPE_BLOCK_DEVICE 8
|
||||
#define LIBSSH2_SFTP_TYPE_FIFO 9
|
||||
|
||||
/*
|
||||
* Reproduce the POSIX file modes here for systems that are not POSIX
|
||||
* compliant.
|
||||
*
|
||||
* These is used in "permissions" of "struct _LIBSSH2_SFTP_ATTRIBUTES"
|
||||
*/
|
||||
/* File type */
|
||||
#define LIBSSH2_SFTP_S_IFMT 0170000 /* type of file mask */
|
||||
#define LIBSSH2_SFTP_S_IFIFO 0010000 /* named pipe (fifo) */
|
||||
#define LIBSSH2_SFTP_S_IFCHR 0020000 /* character special */
|
||||
#define LIBSSH2_SFTP_S_IFDIR 0040000 /* directory */
|
||||
#define LIBSSH2_SFTP_S_IFBLK 0060000 /* block special */
|
||||
#define LIBSSH2_SFTP_S_IFREG 0100000 /* regular */
|
||||
#define LIBSSH2_SFTP_S_IFLNK 0120000 /* symbolic link */
|
||||
#define LIBSSH2_SFTP_S_IFSOCK 0140000 /* socket */
|
||||
|
||||
/* File mode */
|
||||
/* Read, write, execute/search by owner */
|
||||
#define LIBSSH2_SFTP_S_IRWXU 0000700 /* RWX mask for owner */
|
||||
#define LIBSSH2_SFTP_S_IRUSR 0000400 /* R for owner */
|
||||
#define LIBSSH2_SFTP_S_IWUSR 0000200 /* W for owner */
|
||||
#define LIBSSH2_SFTP_S_IXUSR 0000100 /* X for owner */
|
||||
/* Read, write, execute/search by group */
|
||||
#define LIBSSH2_SFTP_S_IRWXG 0000070 /* RWX mask for group */
|
||||
#define LIBSSH2_SFTP_S_IRGRP 0000040 /* R for group */
|
||||
#define LIBSSH2_SFTP_S_IWGRP 0000020 /* W for group */
|
||||
#define LIBSSH2_SFTP_S_IXGRP 0000010 /* X for group */
|
||||
/* Read, write, execute/search by others */
|
||||
#define LIBSSH2_SFTP_S_IRWXO 0000007 /* RWX mask for other */
|
||||
#define LIBSSH2_SFTP_S_IROTH 0000004 /* R for other */
|
||||
#define LIBSSH2_SFTP_S_IWOTH 0000002 /* W for other */
|
||||
#define LIBSSH2_SFTP_S_IXOTH 0000001 /* X for other */
|
||||
|
||||
/* macros to check for specific file types, added in 1.2.5 */
|
||||
#define LIBSSH2_SFTP_S_ISLNK(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFLNK)
|
||||
#define LIBSSH2_SFTP_S_ISREG(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFREG)
|
||||
#define LIBSSH2_SFTP_S_ISDIR(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFDIR)
|
||||
#define LIBSSH2_SFTP_S_ISCHR(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFCHR)
|
||||
#define LIBSSH2_SFTP_S_ISBLK(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFBLK)
|
||||
#define LIBSSH2_SFTP_S_ISFIFO(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFIFO)
|
||||
#define LIBSSH2_SFTP_S_ISSOCK(m) \
|
||||
(((m) & LIBSSH2_SFTP_S_IFMT) == LIBSSH2_SFTP_S_IFSOCK)
|
||||
|
||||
/* SFTP File Transfer Flags -- (e.g. flags parameter to sftp_open())
|
||||
* Danger will robinson... APPEND doesn't have any effect on OpenSSH servers */
|
||||
#define LIBSSH2_FXF_READ 0x00000001
|
||||
#define LIBSSH2_FXF_WRITE 0x00000002
|
||||
#define LIBSSH2_FXF_APPEND 0x00000004
|
||||
#define LIBSSH2_FXF_CREAT 0x00000008
|
||||
#define LIBSSH2_FXF_TRUNC 0x00000010
|
||||
#define LIBSSH2_FXF_EXCL 0x00000020
|
||||
|
||||
/* SFTP Status Codes (returned by libssh2_sftp_last_error() ) */
|
||||
#define LIBSSH2_FX_OK 0
|
||||
#define LIBSSH2_FX_EOF 1
|
||||
#define LIBSSH2_FX_NO_SUCH_FILE 2
|
||||
#define LIBSSH2_FX_PERMISSION_DENIED 3
|
||||
#define LIBSSH2_FX_FAILURE 4
|
||||
#define LIBSSH2_FX_BAD_MESSAGE 5
|
||||
#define LIBSSH2_FX_NO_CONNECTION 6
|
||||
#define LIBSSH2_FX_CONNECTION_LOST 7
|
||||
#define LIBSSH2_FX_OP_UNSUPPORTED 8
|
||||
#define LIBSSH2_FX_INVALID_HANDLE 9
|
||||
#define LIBSSH2_FX_NO_SUCH_PATH 10
|
||||
#define LIBSSH2_FX_FILE_ALREADY_EXISTS 11
|
||||
#define LIBSSH2_FX_WRITE_PROTECT 12
|
||||
#define LIBSSH2_FX_NO_MEDIA 13
|
||||
#define LIBSSH2_FX_NO_SPACE_ON_FILESYSTEM 14
|
||||
#define LIBSSH2_FX_QUOTA_EXCEEDED 15
|
||||
#define LIBSSH2_FX_UNKNOWN_PRINCIPLE 16 /* Initial mis-spelling */
|
||||
#define LIBSSH2_FX_UNKNOWN_PRINCIPAL 16
|
||||
#define LIBSSH2_FX_LOCK_CONFlICT 17 /* Initial mis-spelling */
|
||||
#define LIBSSH2_FX_LOCK_CONFLICT 17
|
||||
#define LIBSSH2_FX_DIR_NOT_EMPTY 18
|
||||
#define LIBSSH2_FX_NOT_A_DIRECTORY 19
|
||||
#define LIBSSH2_FX_INVALID_FILENAME 20
|
||||
#define LIBSSH2_FX_LINK_LOOP 21
|
||||
|
||||
/* Returned by any function that would block during a read/write opperation */
|
||||
#define LIBSSH2SFTP_EAGAIN LIBSSH2_ERROR_EAGAIN
|
||||
|
||||
/* SFTP API */
|
||||
LIBSSH2_API LIBSSH2_SFTP *libssh2_sftp_init(LIBSSH2_SESSION *session);
|
||||
LIBSSH2_API int libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp);
|
||||
LIBSSH2_API unsigned long libssh2_sftp_last_error(LIBSSH2_SFTP *sftp);
|
||||
LIBSSH2_API LIBSSH2_CHANNEL *libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp);
|
||||
|
||||
/* File / Directory Ops */
|
||||
LIBSSH2_API LIBSSH2_SFTP_HANDLE *libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *filename,
|
||||
unsigned int filename_len,
|
||||
unsigned long flags,
|
||||
long mode, int open_type);
|
||||
#define libssh2_sftp_open(sftp, filename, flags, mode) \
|
||||
libssh2_sftp_open_ex((sftp), (filename), strlen(filename), (flags), \
|
||||
(mode), LIBSSH2_SFTP_OPENFILE)
|
||||
#define libssh2_sftp_opendir(sftp, path) \
|
||||
libssh2_sftp_open_ex((sftp), (path), strlen(path), 0, 0, \
|
||||
LIBSSH2_SFTP_OPENDIR)
|
||||
|
||||
LIBSSH2_API ssize_t libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle,
|
||||
char *buffer, size_t buffer_maxlen);
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, \
|
||||
char *buffer, size_t buffer_maxlen,
|
||||
char *longentry,
|
||||
size_t longentry_maxlen,
|
||||
LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||
#define libssh2_sftp_readdir(handle, buffer, buffer_maxlen, attrs) \
|
||||
libssh2_sftp_readdir_ex((handle), (buffer), (buffer_maxlen), NULL, 0, \
|
||||
(attrs))
|
||||
|
||||
LIBSSH2_API ssize_t libssh2_sftp_write(LIBSSH2_SFTP_HANDLE *handle,
|
||||
const char *buffer, size_t count);
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
|
||||
#define libssh2_sftp_close(handle) libssh2_sftp_close_handle(handle)
|
||||
#define libssh2_sftp_closedir(handle) libssh2_sftp_close_handle(handle)
|
||||
|
||||
LIBSSH2_API void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset);
|
||||
LIBSSH2_API void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle,
|
||||
libssh2_uint64_t offset);
|
||||
#define libssh2_sftp_rewind(handle) libssh2_sftp_seek64((handle), 0)
|
||||
|
||||
LIBSSH2_API size_t libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle);
|
||||
LIBSSH2_API libssh2_uint64_t libssh2_sftp_tell64(LIBSSH2_SFTP_HANDLE *handle);
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle,
|
||||
LIBSSH2_SFTP_ATTRIBUTES *attrs,
|
||||
int setstat);
|
||||
#define libssh2_sftp_fstat(handle, attrs) \
|
||||
libssh2_sftp_fstat_ex((handle), (attrs), 0)
|
||||
#define libssh2_sftp_fsetstat(handle, attrs) \
|
||||
libssh2_sftp_fstat_ex((handle), (attrs), 1)
|
||||
|
||||
/* Miscellaneous Ops */
|
||||
LIBSSH2_API int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *source_filename,
|
||||
unsigned int srouce_filename_len,
|
||||
const char *dest_filename,
|
||||
unsigned int dest_filename_len,
|
||||
long flags);
|
||||
#define libssh2_sftp_rename(sftp, sourcefile, destfile) \
|
||||
libssh2_sftp_rename_ex((sftp), (sourcefile), strlen(sourcefile), \
|
||||
(destfile), strlen(destfile), \
|
||||
LIBSSH2_SFTP_RENAME_OVERWRITE | \
|
||||
LIBSSH2_SFTP_RENAME_ATOMIC | \
|
||||
LIBSSH2_SFTP_RENAME_NATIVE)
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *filename,
|
||||
unsigned int filename_len);
|
||||
#define libssh2_sftp_unlink(sftp, filename) \
|
||||
libssh2_sftp_unlink_ex((sftp), (filename), strlen(filename))
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle,
|
||||
LIBSSH2_SFTP_STATVFS *st);
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp,
|
||||
const char *path,
|
||||
size_t path_len,
|
||||
LIBSSH2_SFTP_STATVFS *st);
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *path,
|
||||
unsigned int path_len, long mode);
|
||||
#define libssh2_sftp_mkdir(sftp, path, mode) \
|
||||
libssh2_sftp_mkdir_ex((sftp), (path), strlen(path), (mode))
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *path,
|
||||
unsigned int path_len);
|
||||
#define libssh2_sftp_rmdir(sftp, path) \
|
||||
libssh2_sftp_rmdir_ex((sftp), (path), strlen(path))
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *path,
|
||||
unsigned int path_len,
|
||||
int stat_type,
|
||||
LIBSSH2_SFTP_ATTRIBUTES *attrs);
|
||||
#define libssh2_sftp_stat(sftp, path, attrs) \
|
||||
libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_STAT, \
|
||||
(attrs))
|
||||
#define libssh2_sftp_lstat(sftp, path, attrs) \
|
||||
libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_LSTAT, \
|
||||
(attrs))
|
||||
#define libssh2_sftp_setstat(sftp, path, attrs) \
|
||||
libssh2_sftp_stat_ex((sftp), (path), strlen(path), LIBSSH2_SFTP_SETSTAT, \
|
||||
(attrs))
|
||||
|
||||
LIBSSH2_API int libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp,
|
||||
const char *path,
|
||||
unsigned int path_len,
|
||||
char *target,
|
||||
unsigned int target_len, int link_type);
|
||||
#define libssh2_sftp_symlink(sftp, orig, linkpath) \
|
||||
libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \
|
||||
strlen(linkpath), LIBSSH2_SFTP_SYMLINK)
|
||||
#define libssh2_sftp_readlink(sftp, path, target, maxlen) \
|
||||
libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \
|
||||
LIBSSH2_SFTP_READLINK)
|
||||
#define libssh2_sftp_realpath(sftp, path, target, maxlen) \
|
||||
libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \
|
||||
LIBSSH2_SFTP_REALPATH)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* LIBSSH2_SFTP_H */
|
||||
BIN
vendor/libssh2-1.4.2/libssh2_debug.a
vendored
Normal file
BIN
vendor/libssh2-1.4.2/libssh2_debug.a
vendored
Normal file
Binary file not shown.
793
vendor/libssh2-1.4.2/src/agent.c
vendored
Normal file
793
vendor/libssh2-1.4.2/src/agent.c
vendored
Normal file
|
|
@ -0,0 +1,793 @@
|
|||
/*
|
||||
* Copyright (c) 2009 by Daiki Ueno
|
||||
* Copyright (C) 2010 by Daniel Stenberg
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "misc.h"
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
#else
|
||||
/* Use the existence of sys/un.h as a test if Unix domain socket is
|
||||
supported. winsock*.h define PF_UNIX/AF_UNIX but do not actually
|
||||
support them. */
|
||||
#undef PF_UNIX
|
||||
#endif
|
||||
#include "userauth.h"
|
||||
#include "session.h"
|
||||
|
||||
/* Requests from client to agent for protocol 1 key operations */
|
||||
#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
|
||||
#define SSH_AGENTC_RSA_CHALLENGE 3
|
||||
#define SSH_AGENTC_ADD_RSA_IDENTITY 7
|
||||
#define SSH_AGENTC_REMOVE_RSA_IDENTITY 8
|
||||
#define SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9
|
||||
#define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24
|
||||
|
||||
/* Requests from client to agent for protocol 2 key operations */
|
||||
#define SSH2_AGENTC_REQUEST_IDENTITIES 11
|
||||
#define SSH2_AGENTC_SIGN_REQUEST 13
|
||||
#define SSH2_AGENTC_ADD_IDENTITY 17
|
||||
#define SSH2_AGENTC_REMOVE_IDENTITY 18
|
||||
#define SSH2_AGENTC_REMOVE_ALL_IDENTITIES 19
|
||||
#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25
|
||||
|
||||
/* Key-type independent requests from client to agent */
|
||||
#define SSH_AGENTC_ADD_SMARTCARD_KEY 20
|
||||
#define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21
|
||||
#define SSH_AGENTC_LOCK 22
|
||||
#define SSH_AGENTC_UNLOCK 23
|
||||
#define SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26
|
||||
|
||||
/* Generic replies from agent to client */
|
||||
#define SSH_AGENT_FAILURE 5
|
||||
#define SSH_AGENT_SUCCESS 6
|
||||
|
||||
/* Replies from agent to client for protocol 1 key operations */
|
||||
#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2
|
||||
#define SSH_AGENT_RSA_RESPONSE 4
|
||||
|
||||
/* Replies from agent to client for protocol 2 key operations */
|
||||
#define SSH2_AGENT_IDENTITIES_ANSWER 12
|
||||
#define SSH2_AGENT_SIGN_RESPONSE 14
|
||||
|
||||
/* Key constraint identifiers */
|
||||
#define SSH_AGENT_CONSTRAIN_LIFETIME 1
|
||||
#define SSH_AGENT_CONSTRAIN_CONFIRM 2
|
||||
|
||||
/* non-blocking mode on agent connection is not yet implemented, but
|
||||
for future use. */
|
||||
typedef enum {
|
||||
agent_NB_state_init = 0,
|
||||
agent_NB_state_request_created,
|
||||
agent_NB_state_request_length_sent,
|
||||
agent_NB_state_request_sent,
|
||||
agent_NB_state_response_length_received,
|
||||
agent_NB_state_response_received
|
||||
} agent_nonblocking_states;
|
||||
|
||||
typedef struct agent_transaction_ctx {
|
||||
unsigned char *request;
|
||||
size_t request_len;
|
||||
unsigned char *response;
|
||||
size_t response_len;
|
||||
agent_nonblocking_states state;
|
||||
} *agent_transaction_ctx_t;
|
||||
|
||||
typedef int (*agent_connect_func)(LIBSSH2_AGENT *agent);
|
||||
typedef int (*agent_transact_func)(LIBSSH2_AGENT *agent,
|
||||
agent_transaction_ctx_t transctx);
|
||||
typedef int (*agent_disconnect_func)(LIBSSH2_AGENT *agent);
|
||||
|
||||
struct agent_publickey {
|
||||
struct list_node node;
|
||||
|
||||
/* this is the struct we expose externally */
|
||||
struct libssh2_agent_publickey external;
|
||||
};
|
||||
|
||||
struct agent_ops {
|
||||
agent_connect_func connect;
|
||||
agent_transact_func transact;
|
||||
agent_disconnect_func disconnect;
|
||||
};
|
||||
|
||||
struct _LIBSSH2_AGENT
|
||||
{
|
||||
LIBSSH2_SESSION *session; /* the session this "belongs to" */
|
||||
|
||||
libssh2_socket_t fd;
|
||||
|
||||
struct agent_ops *ops;
|
||||
|
||||
struct agent_transaction_ctx transctx;
|
||||
struct agent_publickey *identity;
|
||||
struct list_head head; /* list of public keys */
|
||||
};
|
||||
|
||||
#ifdef PF_UNIX
|
||||
static int
|
||||
agent_connect_unix(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
const char *path;
|
||||
struct sockaddr_un s_un;
|
||||
|
||||
path = getenv("SSH_AUTH_SOCK");
|
||||
if (!path)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_BAD_USE,
|
||||
"no auth sock variable");
|
||||
|
||||
agent->fd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
if (agent->fd < 0)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_BAD_SOCKET,
|
||||
"failed creating socket");
|
||||
|
||||
s_un.sun_family = AF_UNIX;
|
||||
strncpy (s_un.sun_path, path, sizeof s_un.sun_path);
|
||||
if (connect(agent->fd, (struct sockaddr*)(&s_un), sizeof s_un) != 0) {
|
||||
close (agent->fd);
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"failed connecting with agent");
|
||||
}
|
||||
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
static int
|
||||
agent_transact_unix(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
|
||||
{
|
||||
unsigned char buf[4];
|
||||
int rc;
|
||||
|
||||
/* Send the length of the request */
|
||||
if (transctx->state == agent_NB_state_request_created) {
|
||||
_libssh2_htonu32(buf, transctx->request_len);
|
||||
rc = LIBSSH2_SEND_FD(agent->session, agent->fd, buf, sizeof buf, 0);
|
||||
if (rc == -EAGAIN)
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
else if (rc < 0)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_SOCKET_SEND,
|
||||
"agent send failed");
|
||||
transctx->state = agent_NB_state_request_length_sent;
|
||||
}
|
||||
|
||||
/* Send the request body */
|
||||
if (transctx->state == agent_NB_state_request_length_sent) {
|
||||
rc = LIBSSH2_SEND_FD(agent->session, agent->fd, transctx->request,
|
||||
transctx->request_len, 0);
|
||||
if (rc == -EAGAIN)
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
else if (rc < 0)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_SOCKET_SEND,
|
||||
"agent send failed");
|
||||
transctx->state = agent_NB_state_request_sent;
|
||||
}
|
||||
|
||||
/* Receive the length of a response */
|
||||
if (transctx->state == agent_NB_state_request_sent) {
|
||||
rc = LIBSSH2_RECV_FD(agent->session, agent->fd, buf, sizeof buf, 0);
|
||||
if (rc < 0) {
|
||||
if (rc == -EAGAIN)
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_SOCKET_RECV,
|
||||
"agent recv failed");
|
||||
}
|
||||
transctx->response_len = _libssh2_ntohu32(buf);
|
||||
transctx->response = LIBSSH2_ALLOC(agent->session,
|
||||
transctx->response_len);
|
||||
if (!transctx->response)
|
||||
return LIBSSH2_ERROR_ALLOC;
|
||||
|
||||
transctx->state = agent_NB_state_response_length_received;
|
||||
}
|
||||
|
||||
/* Receive the response body */
|
||||
if (transctx->state == agent_NB_state_response_length_received) {
|
||||
rc = LIBSSH2_RECV_FD(agent->session, agent->fd, transctx->response,
|
||||
transctx->response_len, 0);
|
||||
if (rc < 0) {
|
||||
if (rc == -EAGAIN)
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_SOCKET_SEND,
|
||||
"agent recv failed");
|
||||
}
|
||||
transctx->state = agent_NB_state_response_received;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
agent_disconnect_unix(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
int ret;
|
||||
ret = close(agent->fd);
|
||||
|
||||
if(ret == -1)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_SOCKET_DISCONNECT,
|
||||
"failed closing the agent socket");
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
struct agent_ops agent_ops_unix = {
|
||||
agent_connect_unix,
|
||||
agent_transact_unix,
|
||||
agent_disconnect_unix
|
||||
};
|
||||
#endif /* PF_UNIX */
|
||||
|
||||
#ifdef WIN32
|
||||
/* Code to talk to Pageant was taken from PuTTY.
|
||||
*
|
||||
* Portions copyright Robert de Bath, Joris van Rantwijk, Delian
|
||||
* Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas
|
||||
* Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa,
|
||||
* Markus Kuhn, Colin Watson, and CORE SDI S.A.
|
||||
*/
|
||||
#define PAGEANT_COPYDATA_ID 0x804e50ba /* random goop */
|
||||
#define PAGEANT_MAX_MSGLEN 8192
|
||||
|
||||
static int
|
||||
agent_connect_pageant(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
HWND hwnd;
|
||||
hwnd = FindWindow("Pageant", "Pageant");
|
||||
if (!hwnd)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"failed connecting agent");
|
||||
agent->fd = 0; /* Mark as the connection has been established */
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
static int
|
||||
agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
|
||||
{
|
||||
HWND hwnd;
|
||||
char mapname[23];
|
||||
HANDLE filemap;
|
||||
unsigned char *p;
|
||||
unsigned char *p2;
|
||||
int id;
|
||||
COPYDATASTRUCT cds;
|
||||
|
||||
if (!transctx || 4 + transctx->request_len > PAGEANT_MAX_MSGLEN)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_INVAL,
|
||||
"illegal input");
|
||||
|
||||
hwnd = FindWindow("Pageant", "Pageant");
|
||||
if (!hwnd)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"found no pageant");
|
||||
|
||||
sprintf(mapname, "PageantRequest%08x", (unsigned)GetCurrentThreadId());
|
||||
filemap = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
|
||||
0, PAGEANT_MAX_MSGLEN, mapname);
|
||||
|
||||
if (filemap == NULL || filemap == INVALID_HANDLE_VALUE)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"failed setting up pageant filemap");
|
||||
|
||||
p2 = p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0);
|
||||
_libssh2_store_str(&p2, (const char *)transctx->request,
|
||||
transctx->request_len);
|
||||
|
||||
cds.dwData = PAGEANT_COPYDATA_ID;
|
||||
cds.cbData = 1 + strlen(mapname);
|
||||
cds.lpData = mapname;
|
||||
|
||||
id = SendMessage(hwnd, WM_COPYDATA, (WPARAM) NULL, (LPARAM) &cds);
|
||||
if (id > 0) {
|
||||
transctx->response_len = _libssh2_ntohu32(p);
|
||||
if (transctx->response_len > PAGEANT_MAX_MSGLEN) {
|
||||
UnmapViewOfFile(p);
|
||||
CloseHandle(filemap);
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"agent setup fail");
|
||||
}
|
||||
transctx->response = LIBSSH2_ALLOC(agent->session,
|
||||
transctx->response_len);
|
||||
if (!transctx->response) {
|
||||
UnmapViewOfFile(p);
|
||||
CloseHandle(filemap);
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_ALLOC,
|
||||
"agent malloc");
|
||||
}
|
||||
memcpy(transctx->response, p + 4, transctx->response_len);
|
||||
}
|
||||
|
||||
UnmapViewOfFile(p);
|
||||
CloseHandle(filemap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
agent_disconnect_pageant(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
agent->fd = LIBSSH2_INVALID_SOCKET;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct agent_ops agent_ops_pageant = {
|
||||
agent_connect_pageant,
|
||||
agent_transact_pageant,
|
||||
agent_disconnect_pageant
|
||||
};
|
||||
#endif /* WIN32 */
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
struct agent_ops *ops;
|
||||
} supported_backends[] = {
|
||||
#ifdef WIN32
|
||||
{"Pageant", &agent_ops_pageant},
|
||||
#endif /* WIN32 */
|
||||
#ifdef PF_UNIX
|
||||
{"Unix", &agent_ops_unix},
|
||||
#endif /* PF_UNIX */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static int
|
||||
agent_sign(LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len,
|
||||
const unsigned char *data, size_t data_len, void **abstract)
|
||||
{
|
||||
LIBSSH2_AGENT *agent = (LIBSSH2_AGENT *) (*abstract);
|
||||
agent_transaction_ctx_t transctx = &agent->transctx;
|
||||
struct agent_publickey *identity = agent->identity;
|
||||
ssize_t len = 1 + 4 + identity->external.blob_len + 4 + data_len + 4;
|
||||
ssize_t method_len;
|
||||
unsigned char *s;
|
||||
int rc;
|
||||
|
||||
/* Create a request to sign the data */
|
||||
if (transctx->state == agent_NB_state_init) {
|
||||
s = transctx->request = LIBSSH2_ALLOC(session, len);
|
||||
if (!transctx->request)
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"out of memory");
|
||||
|
||||
*s++ = SSH2_AGENTC_SIGN_REQUEST;
|
||||
/* key blob */
|
||||
_libssh2_store_str(&s, (const char *)identity->external.blob,
|
||||
identity->external.blob_len);
|
||||
/* data */
|
||||
_libssh2_store_str(&s, (const char *)data, data_len);
|
||||
|
||||
/* flags */
|
||||
_libssh2_store_u32(&s, 0);
|
||||
|
||||
transctx->request_len = s - transctx->request;
|
||||
transctx->state = agent_NB_state_request_created;
|
||||
}
|
||||
|
||||
/* Make sure to be re-called as a result of EAGAIN. */
|
||||
if (*transctx->request != SSH2_AGENTC_SIGN_REQUEST)
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_BAD_USE,
|
||||
"illegal request");
|
||||
|
||||
if (!agent->ops)
|
||||
/* if no agent has been connected, bail out */
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_BAD_USE,
|
||||
"agent not connected");
|
||||
|
||||
rc = agent->ops->transact(agent, transctx);
|
||||
if (rc) {
|
||||
goto error;
|
||||
}
|
||||
LIBSSH2_FREE(session, transctx->request);
|
||||
transctx->request = NULL;
|
||||
|
||||
len = transctx->response_len;
|
||||
s = transctx->response;
|
||||
len--;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
if (*s != SSH2_AGENT_SIGN_RESPONSE) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
s++;
|
||||
|
||||
/* Skip the entire length of the signature */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
s += 4;
|
||||
|
||||
/* Skip signing method */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
method_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
len -= method_len;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
s += method_len;
|
||||
|
||||
/* Read the signature */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
*sig_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
len -= *sig_len;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
*sig = LIBSSH2_ALLOC(session, *sig_len);
|
||||
if (!*sig) {
|
||||
rc = LIBSSH2_ERROR_ALLOC;
|
||||
goto error;
|
||||
}
|
||||
memcpy(*sig, s, *sig_len);
|
||||
|
||||
error:
|
||||
LIBSSH2_FREE(session, transctx->request);
|
||||
transctx->request = NULL;
|
||||
|
||||
LIBSSH2_FREE(session, transctx->response);
|
||||
transctx->response = NULL;
|
||||
|
||||
return _libssh2_error(session, rc, "agent sign failure");
|
||||
}
|
||||
|
||||
static int
|
||||
agent_list_identities(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
agent_transaction_ctx_t transctx = &agent->transctx;
|
||||
ssize_t len, num_identities;
|
||||
unsigned char *s;
|
||||
int rc;
|
||||
unsigned char c = SSH2_AGENTC_REQUEST_IDENTITIES;
|
||||
|
||||
/* Create a request to list identities */
|
||||
if (transctx->state == agent_NB_state_init) {
|
||||
transctx->request = &c;
|
||||
transctx->request_len = 1;
|
||||
transctx->state = agent_NB_state_request_created;
|
||||
}
|
||||
|
||||
/* Make sure to be re-called as a result of EAGAIN. */
|
||||
if (*transctx->request != SSH2_AGENTC_REQUEST_IDENTITIES)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_BAD_USE,
|
||||
"illegal agent request");
|
||||
|
||||
if (!agent->ops)
|
||||
/* if no agent has been connected, bail out */
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_BAD_USE,
|
||||
"agent not connected");
|
||||
|
||||
rc = agent->ops->transact(agent, transctx);
|
||||
if (rc) {
|
||||
goto error;
|
||||
}
|
||||
transctx->request = NULL;
|
||||
|
||||
len = transctx->response_len;
|
||||
s = transctx->response;
|
||||
len--;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
if (*s != SSH2_AGENT_IDENTITIES_ANSWER) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
s++;
|
||||
|
||||
/* Read the length of identities */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
num_identities = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
|
||||
while (num_identities--) {
|
||||
struct agent_publickey *identity;
|
||||
ssize_t comment_len;
|
||||
|
||||
identity = LIBSSH2_ALLOC(agent->session, sizeof *identity);
|
||||
if (!identity) {
|
||||
rc = LIBSSH2_ERROR_ALLOC;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Read the length of the blob */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
identity->external.blob_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
|
||||
/* Read the blob */
|
||||
len -= identity->external.blob_len;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
identity->external.blob = LIBSSH2_ALLOC(agent->session,
|
||||
identity->external.blob_len);
|
||||
if (!identity->external.blob) {
|
||||
rc = LIBSSH2_ERROR_ALLOC;
|
||||
goto error;
|
||||
}
|
||||
memcpy(identity->external.blob, s, identity->external.blob_len);
|
||||
s += identity->external.blob_len;
|
||||
|
||||
/* Read the length of the comment */
|
||||
len -= 4;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
comment_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
|
||||
/* Read the comment */
|
||||
len -= comment_len;
|
||||
if (len < 0) {
|
||||
rc = LIBSSH2_ERROR_AGENT_PROTOCOL;
|
||||
goto error;
|
||||
}
|
||||
identity->external.comment = LIBSSH2_ALLOC(agent->session,
|
||||
comment_len + 1);
|
||||
if (!identity->external.comment) {
|
||||
rc = LIBSSH2_ERROR_ALLOC;
|
||||
goto error;
|
||||
}
|
||||
identity->external.comment[comment_len] = '\0';
|
||||
memcpy(identity->external.comment, s, comment_len);
|
||||
s += comment_len;
|
||||
|
||||
_libssh2_list_add(&agent->head, &identity->node);
|
||||
}
|
||||
error:
|
||||
LIBSSH2_FREE(agent->session, transctx->response);
|
||||
transctx->response = NULL;
|
||||
|
||||
return _libssh2_error(agent->session, rc,
|
||||
"agent list id failed");
|
||||
}
|
||||
|
||||
static void
|
||||
agent_free_identities(LIBSSH2_AGENT *agent) {
|
||||
struct agent_publickey *node;
|
||||
struct agent_publickey *next;
|
||||
|
||||
for (node = _libssh2_list_first(&agent->head); node; node = next) {
|
||||
next = _libssh2_list_next(&node->node);
|
||||
LIBSSH2_FREE(agent->session, node->external.blob);
|
||||
LIBSSH2_FREE(agent->session, node->external.comment);
|
||||
LIBSSH2_FREE(agent->session, node);
|
||||
}
|
||||
_libssh2_list_init(&agent->head);
|
||||
}
|
||||
|
||||
#define AGENT_PUBLICKEY_MAGIC 0x3bdefed2
|
||||
/*
|
||||
* agent_publickey_to_external()
|
||||
*
|
||||
* Copies data from the internal to the external representation struct.
|
||||
*
|
||||
*/
|
||||
static struct libssh2_agent_publickey *
|
||||
agent_publickey_to_external(struct agent_publickey *node)
|
||||
{
|
||||
struct libssh2_agent_publickey *ext = &node->external;
|
||||
|
||||
ext->magic = AGENT_PUBLICKEY_MAGIC;
|
||||
ext->node = node;
|
||||
|
||||
return ext;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_init
|
||||
*
|
||||
* Init an ssh-agent handle. Returns the pointer to the handle.
|
||||
*
|
||||
*/
|
||||
LIBSSH2_API LIBSSH2_AGENT *
|
||||
libssh2_agent_init(LIBSSH2_SESSION *session)
|
||||
{
|
||||
LIBSSH2_AGENT *agent;
|
||||
|
||||
agent = LIBSSH2_ALLOC(session, sizeof *agent);
|
||||
if (!agent) {
|
||||
_libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate space for agent connection");
|
||||
return NULL;
|
||||
}
|
||||
memset(agent, 0, sizeof *agent);
|
||||
agent->session = session;
|
||||
_libssh2_list_init(&agent->head);
|
||||
|
||||
return agent;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_connect()
|
||||
*
|
||||
* Connect to an ssh-agent.
|
||||
*
|
||||
* Returns 0 if succeeded, or a negative value for error.
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_agent_connect(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
int i, rc = -1;
|
||||
for (i = 0; supported_backends[i].name; i++) {
|
||||
agent->ops = supported_backends[i].ops;
|
||||
rc = agent->ops->connect(agent);
|
||||
if (!rc)
|
||||
return 0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_list_identities()
|
||||
*
|
||||
* Request ssh-agent to list identities.
|
||||
*
|
||||
* Returns 0 if succeeded, or a negative value for error.
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_agent_list_identities(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
memset(&agent->transctx, 0, sizeof agent->transctx);
|
||||
/* Abondon the last fetched identities */
|
||||
agent_free_identities(agent);
|
||||
return agent_list_identities(agent);
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_get_identity()
|
||||
*
|
||||
* Traverse the internal list of public keys. Pass NULL to 'prev' to get
|
||||
* the first one. Or pass a poiner to the previously returned one to get the
|
||||
* next.
|
||||
*
|
||||
* Returns:
|
||||
* 0 if a fine public key was stored in 'store'
|
||||
* 1 if end of public keys
|
||||
* [negative] on errors
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_agent_get_identity(LIBSSH2_AGENT *agent,
|
||||
struct libssh2_agent_publickey **ext,
|
||||
struct libssh2_agent_publickey *oprev)
|
||||
{
|
||||
struct agent_publickey *node;
|
||||
if (oprev && oprev->node) {
|
||||
/* we have a starting point */
|
||||
struct agent_publickey *prev = oprev->node;
|
||||
|
||||
/* get the next node in the list */
|
||||
node = _libssh2_list_next(&prev->node);
|
||||
}
|
||||
else
|
||||
node = _libssh2_list_first(&agent->head);
|
||||
|
||||
if (!node)
|
||||
/* no (more) node */
|
||||
return 1;
|
||||
|
||||
*ext = agent_publickey_to_external(node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_userauth()
|
||||
*
|
||||
* Do publickey user authentication with the help of ssh-agent.
|
||||
*
|
||||
* Returns 0 if succeeded, or a negative value for error.
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_agent_userauth(LIBSSH2_AGENT *agent,
|
||||
const char *username,
|
||||
struct libssh2_agent_publickey *identity)
|
||||
{
|
||||
void *abstract = agent;
|
||||
int rc;
|
||||
|
||||
if (agent->session->userauth_pblc_state == libssh2_NB_state_idle) {
|
||||
memset(&agent->transctx, 0, sizeof agent->transctx);
|
||||
agent->identity = identity->node;
|
||||
}
|
||||
|
||||
BLOCK_ADJUST(rc, agent->session,
|
||||
_libssh2_userauth_publickey(agent->session, username,
|
||||
strlen(username),
|
||||
identity->blob,
|
||||
identity->blob_len,
|
||||
agent_sign,
|
||||
&abstract));
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_disconnect()
|
||||
*
|
||||
* Close a connection to an ssh-agent.
|
||||
*
|
||||
* Returns 0 if succeeded, or a negative value for error.
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_agent_disconnect(LIBSSH2_AGENT *agent)
|
||||
{
|
||||
if (agent->ops && agent->fd != LIBSSH2_INVALID_SOCKET)
|
||||
return agent->ops->disconnect(agent);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_agent_free()
|
||||
*
|
||||
* Free an ssh-agent handle. This function also frees the internal
|
||||
* collection of public keys.
|
||||
*/
|
||||
LIBSSH2_API void
|
||||
libssh2_agent_free(LIBSSH2_AGENT *agent) {
|
||||
/* Allow connection freeing when the socket has lost its connection */
|
||||
if (agent->fd != LIBSSH2_INVALID_SOCKET) {
|
||||
libssh2_agent_disconnect(agent);
|
||||
}
|
||||
agent_free_identities(agent);
|
||||
LIBSSH2_FREE(agent->session, agent);
|
||||
}
|
||||
2570
vendor/libssh2-1.4.2/src/channel.c
vendored
Normal file
2570
vendor/libssh2-1.4.2/src/channel.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
141
vendor/libssh2-1.4.2/src/channel.h
vendored
Normal file
141
vendor/libssh2-1.4.2/src/channel.h
vendored
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
#ifndef __LIBSSH2_CHANNEL_H
|
||||
#define __LIBSSH2_CHANNEL_H
|
||||
/* Copyright (c) 2008-2010 by Daniel Stenberg
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* _libssh2_channel_receive_window_adjust
|
||||
*
|
||||
* Adjust the receive window for a channel by adjustment bytes. If the amount
|
||||
* to be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is 0 the
|
||||
* adjustment amount will be queued for a later packet.
|
||||
*
|
||||
* Always non-blocking.
|
||||
*/
|
||||
int _libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL * channel,
|
||||
uint32_t adjustment,
|
||||
unsigned char force,
|
||||
unsigned int *store);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_flush
|
||||
*
|
||||
* Flush data from one (or all) stream
|
||||
* Returns number of bytes flushed, or negative on failure
|
||||
*/
|
||||
int _libssh2_channel_flush(LIBSSH2_CHANNEL *channel, int streamid);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_free
|
||||
*
|
||||
* Make sure a channel is closed, then remove the channel from the session
|
||||
* and free its resource(s)
|
||||
*
|
||||
* Returns 0 on success, negative on failure
|
||||
*/
|
||||
int _libssh2_channel_free(LIBSSH2_CHANNEL *channel);
|
||||
|
||||
int
|
||||
_libssh2_channel_extended_data(LIBSSH2_CHANNEL *channel, int ignore_mode);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_write
|
||||
*
|
||||
* Send data to a channel
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_channel_write(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
const unsigned char *buf, size_t buflen);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_open
|
||||
*
|
||||
* Establish a generic session channel
|
||||
*/
|
||||
LIBSSH2_CHANNEL *
|
||||
_libssh2_channel_open(LIBSSH2_SESSION * session, const char *channel_type,
|
||||
uint32_t channel_type_len,
|
||||
uint32_t window_size,
|
||||
uint32_t packet_size,
|
||||
const unsigned char *message, size_t message_len);
|
||||
|
||||
|
||||
/*
|
||||
* _libssh2_channel_process_startup
|
||||
*
|
||||
* Primitive for libssh2_channel_(shell|exec|subsystem)
|
||||
*/
|
||||
int
|
||||
_libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
|
||||
const char *request, size_t request_len,
|
||||
const char *message, size_t message_len);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_read
|
||||
*
|
||||
* Read data from a channel
|
||||
*
|
||||
* It is important to not return 0 until the currently read channel is
|
||||
* complete. If we read stuff from the wire but it was no payload data to fill
|
||||
* in the buffer with, we MUST make sure to return PACKET_EAGAIN.
|
||||
*/
|
||||
ssize_t _libssh2_channel_read(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
char *buf, size_t buflen);
|
||||
|
||||
uint32_t _libssh2_channel_nextid(LIBSSH2_SESSION * session);
|
||||
|
||||
LIBSSH2_CHANNEL *_libssh2_channel_locate(LIBSSH2_SESSION * session,
|
||||
uint32_t channel_id);
|
||||
|
||||
size_t _libssh2_channel_packet_data_len(LIBSSH2_CHANNEL * channel,
|
||||
int stream_id);
|
||||
|
||||
int _libssh2_channel_close(LIBSSH2_CHANNEL * channel);
|
||||
|
||||
/*
|
||||
* _libssh2_channel_forward_cancel
|
||||
*
|
||||
* Stop listening on a remote port and free the listener
|
||||
* Toss out any pending (un-accept()ed) connections
|
||||
*
|
||||
* Return 0 on success, LIBSSH2_ERROR_EAGAIN if would block, -1 on error
|
||||
*/
|
||||
int _libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
|
||||
|
||||
#endif /* __LIBSSH2_CHANNEL_H */
|
||||
|
||||
390
vendor/libssh2-1.4.2/src/comp.c
vendored
Normal file
390
vendor/libssh2-1.4.2/src/comp.c
vendored
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2010, Daniel Stenberg <daniel@haxx.se>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#ifdef LIBSSH2_HAVE_ZLIB
|
||||
# include <zlib.h>
|
||||
#endif
|
||||
|
||||
#include "comp.h"
|
||||
|
||||
/* ********
|
||||
* none *
|
||||
******** */
|
||||
|
||||
/*
|
||||
* comp_method_none_comp
|
||||
*
|
||||
* Minimalist compression: Absolutely none
|
||||
*/
|
||||
static int
|
||||
comp_method_none_comp(LIBSSH2_SESSION *session,
|
||||
unsigned char *dest,
|
||||
size_t *dest_len,
|
||||
const unsigned char *src,
|
||||
size_t src_len,
|
||||
void **abstract)
|
||||
{
|
||||
(void) session;
|
||||
(void) abstract;
|
||||
(void) dest;
|
||||
(void) dest_len;
|
||||
(void) src;
|
||||
(void) src_len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* comp_method_none_decomp
|
||||
*
|
||||
* Minimalist decompression: Absolutely none
|
||||
*/
|
||||
static int
|
||||
comp_method_none_decomp(LIBSSH2_SESSION * session,
|
||||
unsigned char **dest,
|
||||
size_t *dest_len,
|
||||
size_t payload_limit,
|
||||
const unsigned char *src,
|
||||
size_t src_len, void **abstract)
|
||||
{
|
||||
(void) session;
|
||||
(void) payload_limit;
|
||||
(void) abstract;
|
||||
*dest = (unsigned char *) src;
|
||||
*dest_len = src_len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_COMP_METHOD comp_method_none = {
|
||||
"none",
|
||||
0, /* not really compressing */
|
||||
NULL,
|
||||
comp_method_none_comp,
|
||||
comp_method_none_decomp,
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef LIBSSH2_HAVE_ZLIB
|
||||
/* ********
|
||||
* zlib *
|
||||
******** */
|
||||
|
||||
/* Memory management wrappers
|
||||
* Yes, I realize we're doing a callback to a callback,
|
||||
* Deal...
|
||||
*/
|
||||
|
||||
static voidpf
|
||||
comp_method_zlib_alloc(voidpf opaque, uInt items, uInt size)
|
||||
{
|
||||
LIBSSH2_SESSION *session = (LIBSSH2_SESSION *) opaque;
|
||||
|
||||
return (voidpf) LIBSSH2_ALLOC(session, items * size);
|
||||
}
|
||||
|
||||
static void
|
||||
comp_method_zlib_free(voidpf opaque, voidpf address)
|
||||
{
|
||||
LIBSSH2_SESSION *session = (LIBSSH2_SESSION *) opaque;
|
||||
|
||||
LIBSSH2_FREE(session, address);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* libssh2_comp_method_zlib_init
|
||||
* All your bandwidth are belong to us (so save some)
|
||||
*/
|
||||
static int
|
||||
comp_method_zlib_init(LIBSSH2_SESSION * session, int compr,
|
||||
void **abstract)
|
||||
{
|
||||
z_stream *strm;
|
||||
int status;
|
||||
|
||||
strm = LIBSSH2_ALLOC(session, sizeof(z_stream));
|
||||
if (!strm) {
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for "
|
||||
"zlib compression/decompression");
|
||||
}
|
||||
memset(strm, 0, sizeof(z_stream));
|
||||
|
||||
strm->opaque = (voidpf) session;
|
||||
strm->zalloc = (alloc_func) comp_method_zlib_alloc;
|
||||
strm->zfree = (free_func) comp_method_zlib_free;
|
||||
if (compr) {
|
||||
/* deflate */
|
||||
status = deflateInit(strm, Z_DEFAULT_COMPRESSION);
|
||||
} else {
|
||||
/* inflate */
|
||||
status = inflateInit(strm);
|
||||
}
|
||||
|
||||
if (status != Z_OK) {
|
||||
LIBSSH2_FREE(session, strm);
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||
"unhandled zlib error %d", status);
|
||||
return LIBSSH2_ERROR_COMPRESS;
|
||||
}
|
||||
*abstract = strm;
|
||||
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_comp_method_zlib_comp
|
||||
*
|
||||
* Compresses source to destination. Without allocation.
|
||||
*/
|
||||
static int
|
||||
comp_method_zlib_comp(LIBSSH2_SESSION *session,
|
||||
unsigned char *dest,
|
||||
|
||||
/* dest_len is a pointer to allow this function to
|
||||
update it with the final actual size used */
|
||||
size_t *dest_len,
|
||||
const unsigned char *src,
|
||||
size_t src_len,
|
||||
void **abstract)
|
||||
{
|
||||
z_stream *strm = *abstract;
|
||||
int out_maxlen = *dest_len;
|
||||
int status;
|
||||
|
||||
strm->next_in = (unsigned char *) src;
|
||||
strm->avail_in = src_len;
|
||||
strm->next_out = dest;
|
||||
strm->avail_out = out_maxlen;
|
||||
|
||||
status = deflate(strm, Z_PARTIAL_FLUSH);
|
||||
|
||||
if (status != Z_OK) {
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||
"unhandled zlib compression error %d", status);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ZLIB,
|
||||
"compression failure");
|
||||
}
|
||||
|
||||
*dest_len = out_maxlen - strm->avail_out;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_comp_method_zlib_decomp
|
||||
*
|
||||
* Decompresses source to destination. Allocates the output memory.
|
||||
*/
|
||||
static int
|
||||
comp_method_zlib_decomp(LIBSSH2_SESSION * session,
|
||||
unsigned char **dest,
|
||||
size_t *dest_len,
|
||||
size_t payload_limit,
|
||||
const unsigned char *src,
|
||||
size_t src_len, void **abstract)
|
||||
{
|
||||
z_stream *strm = *abstract;
|
||||
/* A short-term alloc of a full data chunk is better than a series of
|
||||
reallocs */
|
||||
char *out;
|
||||
int out_maxlen = 8 * src_len;
|
||||
int limiter = 0;
|
||||
|
||||
/* If strm is null, then we have not yet been initialized. */
|
||||
if (strm == NULL)
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_COMPRESS,
|
||||
"decompression unitilized");;
|
||||
|
||||
/* In practice they never come smaller than this */
|
||||
if (out_maxlen < 25)
|
||||
out_maxlen = 25;
|
||||
|
||||
if (out_maxlen > (int) payload_limit)
|
||||
out_maxlen = payload_limit;
|
||||
|
||||
strm->next_in = (unsigned char *) src;
|
||||
strm->avail_in = src_len;
|
||||
strm->next_out = (unsigned char *) LIBSSH2_ALLOC(session, out_maxlen);
|
||||
out = (char *) strm->next_out;
|
||||
strm->avail_out = out_maxlen;
|
||||
if (!strm->next_out)
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate decompression buffer");
|
||||
while (strm->avail_in) {
|
||||
int status;
|
||||
|
||||
status = inflate(strm, Z_PARTIAL_FLUSH);
|
||||
|
||||
if (status != Z_OK) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||
"unhandled zlib error %d", status);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ZLIB,
|
||||
"decompression failure");
|
||||
}
|
||||
if (strm->avail_in) {
|
||||
size_t out_ofs = out_maxlen - strm->avail_out;
|
||||
char *newout;
|
||||
|
||||
out_maxlen += 8 * strm->avail_in;
|
||||
|
||||
if ((out_maxlen > (int) payload_limit) && limiter++) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ZLIB,
|
||||
"Excessive growth in decompression phase");
|
||||
}
|
||||
|
||||
newout = LIBSSH2_REALLOC(session, out, out_maxlen);
|
||||
if (!newout) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to expand decompression buffer");
|
||||
}
|
||||
out = newout;
|
||||
strm->next_out = (unsigned char *) out + out_ofs;
|
||||
strm->avail_out += 8 * strm->avail_in;
|
||||
} else
|
||||
while (!strm->avail_out) {
|
||||
/* Done with input, might be a byte or two in internal buffer
|
||||
* during compress. Or potentially many bytes if it's a
|
||||
* decompress
|
||||
*/
|
||||
int grow_size = 2048;
|
||||
char *newout;
|
||||
|
||||
if (out_maxlen >= (int) payload_limit) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ZLIB,
|
||||
"Excessive growth in decompression "
|
||||
"phase");
|
||||
}
|
||||
|
||||
if (grow_size > (int) (payload_limit - out_maxlen)) {
|
||||
grow_size = payload_limit - out_maxlen;
|
||||
}
|
||||
|
||||
out_maxlen += grow_size;
|
||||
strm->avail_out = grow_size;
|
||||
|
||||
newout = LIBSSH2_REALLOC(session, out, out_maxlen);
|
||||
if (!newout) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to expand final "
|
||||
"decompress buffer");
|
||||
}
|
||||
out = newout;
|
||||
strm->next_out = (unsigned char *) out + out_maxlen -
|
||||
grow_size;
|
||||
|
||||
status = inflate(strm, Z_PARTIAL_FLUSH);
|
||||
|
||||
if (status != Z_OK) {
|
||||
LIBSSH2_FREE(session, out);
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
|
||||
"unhandled zlib error %d", status);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ZLIB,
|
||||
"decompression failure");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*dest = (unsigned char *) out;
|
||||
*dest_len = out_maxlen - strm->avail_out;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* libssh2_comp_method_zlib_dtor
|
||||
* All done, no more compression for you
|
||||
*/
|
||||
static int
|
||||
comp_method_zlib_dtor(LIBSSH2_SESSION *session, int compr, void **abstract)
|
||||
{
|
||||
z_stream *strm = *abstract;
|
||||
|
||||
if (strm) {
|
||||
if (compr)
|
||||
deflateEnd(strm);
|
||||
else
|
||||
inflateEnd(strm);
|
||||
LIBSSH2_FREE(session, strm);
|
||||
}
|
||||
|
||||
*abstract = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const LIBSSH2_COMP_METHOD comp_method_zlib = {
|
||||
"zlib",
|
||||
1, /* yes, this compresses */
|
||||
comp_method_zlib_init,
|
||||
comp_method_zlib_comp,
|
||||
comp_method_zlib_decomp,
|
||||
comp_method_zlib_dtor,
|
||||
};
|
||||
#endif /* LIBSSH2_HAVE_ZLIB */
|
||||
|
||||
/* If compression is enabled by the API, then this array is used which then
|
||||
may allow compression if zlib is available at build time */
|
||||
static const LIBSSH2_COMP_METHOD *comp_methods[] = {
|
||||
#ifdef LIBSSH2_HAVE_ZLIB
|
||||
&comp_method_zlib,
|
||||
#endif /* LIBSSH2_HAVE_ZLIB */
|
||||
&comp_method_none,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* If compression is disabled by the API, then this array is used */
|
||||
static const LIBSSH2_COMP_METHOD *no_comp_methods[] = {
|
||||
&comp_method_none,
|
||||
NULL
|
||||
};
|
||||
|
||||
const LIBSSH2_COMP_METHOD **
|
||||
_libssh2_comp_methods(LIBSSH2_SESSION *session)
|
||||
{
|
||||
if(session->flag.compress)
|
||||
return comp_methods;
|
||||
else
|
||||
return no_comp_methods;
|
||||
}
|
||||
45
vendor/libssh2-1.4.2/src/comp.h
vendored
Normal file
45
vendor/libssh2-1.4.2/src/comp.h
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef __LIBSSH2_COMP_H
|
||||
#define __LIBSSH2_COMP_H
|
||||
|
||||
/* Copyright (C) 2009-2010 by Daniel Stenberg
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
const LIBSSH2_COMP_METHOD **_libssh2_comp_methods(LIBSSH2_SESSION *session);
|
||||
|
||||
#endif /* __LIBSSH2_COMP_H */
|
||||
334
vendor/libssh2-1.4.2/src/crypt.c
vendored
Normal file
334
vendor/libssh2-1.4.2/src/crypt.c
vendored
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
/* Copyright (c) 2009, 2010 Simon Josefsson <simon@josefsson.org>
|
||||
* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
#ifdef LIBSSH2_CRYPT_NONE
|
||||
|
||||
/* crypt_none_crypt
|
||||
* Minimalist cipher: VERY secure *wink*
|
||||
*/
|
||||
static int
|
||||
crypt_none_crypt(LIBSSH2_SESSION * session, unsigned char *buf,
|
||||
void **abstract)
|
||||
{
|
||||
/* Do nothing to the data! */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_none = {
|
||||
"none",
|
||||
8, /* blocksize (SSH2 defines minimum blocksize as 8) */
|
||||
0, /* iv_len */
|
||||
0, /* secret_len */
|
||||
0, /* flags */
|
||||
NULL,
|
||||
crypt_none_crypt,
|
||||
NULL
|
||||
};
|
||||
#endif /* LIBSSH2_CRYPT_NONE */
|
||||
|
||||
struct crypt_ctx
|
||||
{
|
||||
int encrypt;
|
||||
_libssh2_cipher_type(algo);
|
||||
_libssh2_cipher_ctx h;
|
||||
};
|
||||
|
||||
static int
|
||||
crypt_init(LIBSSH2_SESSION * session,
|
||||
const LIBSSH2_CRYPT_METHOD * method,
|
||||
unsigned char *iv, int *free_iv,
|
||||
unsigned char *secret, int *free_secret,
|
||||
int encrypt, void **abstract)
|
||||
{
|
||||
struct crypt_ctx *ctx = LIBSSH2_ALLOC(session,
|
||||
sizeof(struct crypt_ctx));
|
||||
if (!ctx)
|
||||
return LIBSSH2_ERROR_ALLOC;
|
||||
|
||||
ctx->encrypt = encrypt;
|
||||
ctx->algo = method->algo;
|
||||
if (_libssh2_cipher_init(&ctx->h, ctx->algo, iv, secret, encrypt)) {
|
||||
LIBSSH2_FREE(session, ctx);
|
||||
return -1;
|
||||
}
|
||||
*abstract = ctx;
|
||||
*free_iv = 1;
|
||||
*free_secret = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
crypt_encrypt(LIBSSH2_SESSION * session, unsigned char *block,
|
||||
void **abstract)
|
||||
{
|
||||
struct crypt_ctx *cctx = *(struct crypt_ctx **) abstract;
|
||||
(void) session;
|
||||
return _libssh2_cipher_crypt(&cctx->h, cctx->algo, cctx->encrypt, block);
|
||||
}
|
||||
|
||||
static int
|
||||
crypt_dtor(LIBSSH2_SESSION * session, void **abstract)
|
||||
{
|
||||
struct crypt_ctx **cctx = (struct crypt_ctx **) abstract;
|
||||
if (cctx && *cctx) {
|
||||
_libssh2_cipher_dtor(&(*cctx)->h);
|
||||
LIBSSH2_FREE(session, *cctx);
|
||||
*abstract = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LIBSSH2_AES_CTR
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes128_ctr = {
|
||||
"aes128-ctr",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
16, /* secret length -- 16*8 == 128bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes128ctr
|
||||
};
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes192_ctr = {
|
||||
"aes192-ctr",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
24, /* secret length -- 24*8 == 192bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes192ctr
|
||||
};
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes256_ctr = {
|
||||
"aes256-ctr",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
32, /* secret length -- 32*8 == 256bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes256ctr
|
||||
};
|
||||
#endif
|
||||
|
||||
#if LIBSSH2_AES
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes128_cbc = {
|
||||
"aes128-cbc",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
16, /* secret length -- 16*8 == 128bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes128
|
||||
};
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes192_cbc = {
|
||||
"aes192-cbc",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
24, /* secret length -- 24*8 == 192bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes192
|
||||
};
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes256_cbc = {
|
||||
"aes256-cbc",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
32, /* secret length -- 32*8 == 256bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes256
|
||||
};
|
||||
|
||||
/* rijndael-cbc@lysator.liu.se == aes256-cbc */
|
||||
static const LIBSSH2_CRYPT_METHOD
|
||||
libssh2_crypt_method_rijndael_cbc_lysator_liu_se = {
|
||||
"rijndael-cbc@lysator.liu.se",
|
||||
16, /* blocksize */
|
||||
16, /* initial value length */
|
||||
32, /* secret length -- 32*8 == 256bit */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_aes256
|
||||
};
|
||||
#endif /* LIBSSH2_AES */
|
||||
|
||||
#if LIBSSH2_BLOWFISH
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_blowfish_cbc = {
|
||||
"blowfish-cbc",
|
||||
8, /* blocksize */
|
||||
8, /* initial value length */
|
||||
16, /* secret length */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_blowfish
|
||||
};
|
||||
#endif /* LIBSSH2_BLOWFISH */
|
||||
|
||||
#if LIBSSH2_RC4
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_arcfour = {
|
||||
"arcfour",
|
||||
8, /* blocksize */
|
||||
8, /* initial value length */
|
||||
16, /* secret length */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_arcfour
|
||||
};
|
||||
|
||||
static int
|
||||
crypt_init_arcfour128(LIBSSH2_SESSION * session,
|
||||
const LIBSSH2_CRYPT_METHOD * method,
|
||||
unsigned char *iv, int *free_iv,
|
||||
unsigned char *secret, int *free_secret,
|
||||
int encrypt, void **abstract)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = crypt_init (session, method, iv, free_iv, secret, free_secret,
|
||||
encrypt, abstract);
|
||||
if (rc == 0) {
|
||||
struct crypt_ctx *cctx = *(struct crypt_ctx **) abstract;
|
||||
unsigned char block[8];
|
||||
size_t discard = 1536;
|
||||
for (; discard; discard -= 8)
|
||||
_libssh2_cipher_crypt(&cctx->h, cctx->algo, cctx->encrypt, block);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_arcfour128 = {
|
||||
"arcfour128",
|
||||
8, /* blocksize */
|
||||
8, /* initial value length */
|
||||
16, /* secret length */
|
||||
0, /* flags */
|
||||
&crypt_init_arcfour128,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_arcfour
|
||||
};
|
||||
#endif /* LIBSSH2_RC4 */
|
||||
|
||||
#if LIBSSH2_CAST
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_cast128_cbc = {
|
||||
"cast128-cbc",
|
||||
8, /* blocksize */
|
||||
8, /* initial value length */
|
||||
16, /* secret length */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_cast5
|
||||
};
|
||||
#endif /* LIBSSH2_CAST */
|
||||
|
||||
#if LIBSSH2_3DES
|
||||
static const LIBSSH2_CRYPT_METHOD libssh2_crypt_method_3des_cbc = {
|
||||
"3des-cbc",
|
||||
8, /* blocksize */
|
||||
8, /* initial value length */
|
||||
24, /* secret length */
|
||||
0, /* flags */
|
||||
&crypt_init,
|
||||
&crypt_encrypt,
|
||||
&crypt_dtor,
|
||||
_libssh2_cipher_3des
|
||||
};
|
||||
#endif
|
||||
|
||||
static const LIBSSH2_CRYPT_METHOD *_libssh2_crypt_methods[] = {
|
||||
#if LIBSSH2_AES_CTR
|
||||
&libssh2_crypt_method_aes128_ctr,
|
||||
&libssh2_crypt_method_aes192_ctr,
|
||||
&libssh2_crypt_method_aes256_ctr,
|
||||
#endif /* LIBSSH2_AES */
|
||||
#if LIBSSH2_AES
|
||||
&libssh2_crypt_method_aes256_cbc,
|
||||
&libssh2_crypt_method_rijndael_cbc_lysator_liu_se, /* == aes256-cbc */
|
||||
&libssh2_crypt_method_aes192_cbc,
|
||||
&libssh2_crypt_method_aes128_cbc,
|
||||
#endif /* LIBSSH2_AES */
|
||||
#if LIBSSH2_BLOWFISH
|
||||
&libssh2_crypt_method_blowfish_cbc,
|
||||
#endif /* LIBSSH2_BLOWFISH */
|
||||
#if LIBSSH2_RC4
|
||||
&libssh2_crypt_method_arcfour128,
|
||||
&libssh2_crypt_method_arcfour,
|
||||
#endif /* LIBSSH2_RC4 */
|
||||
#if LIBSSH2_CAST
|
||||
&libssh2_crypt_method_cast128_cbc,
|
||||
#endif /* LIBSSH2_CAST */
|
||||
#if LIBSSH2_3DES
|
||||
&libssh2_crypt_method_3des_cbc,
|
||||
#endif /* LIBSSH2_DES */
|
||||
#ifdef LIBSSH2_CRYPT_NONE
|
||||
&libssh2_crypt_method_none,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Expose to kex.c */
|
||||
const LIBSSH2_CRYPT_METHOD **
|
||||
libssh2_crypt_methods(void)
|
||||
{
|
||||
return _libssh2_crypt_methods;
|
||||
}
|
||||
118
vendor/libssh2-1.4.2/src/crypto.h
vendored
Normal file
118
vendor/libssh2-1.4.2/src/crypto.h
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
/* Copyright (C) 2009, 2010 Simon Josefsson
|
||||
* Copyright (C) 2006, 2007 The Written Word, Inc. All rights reserved.
|
||||
* Copyright (C) 2010 Daniel Stenberg
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef LIBSSH2_CRYPTO_H
|
||||
#define LIBSSH2_CRYPTO_H
|
||||
|
||||
#ifdef LIBSSH2_LIBGCRYPT
|
||||
#include "libgcrypt.h"
|
||||
#else
|
||||
#include "openssl.h"
|
||||
#endif
|
||||
|
||||
int _libssh2_rsa_new(libssh2_rsa_ctx ** rsa,
|
||||
const unsigned char *edata,
|
||||
unsigned long elen,
|
||||
const unsigned char *ndata,
|
||||
unsigned long nlen,
|
||||
const unsigned char *ddata,
|
||||
unsigned long dlen,
|
||||
const unsigned char *pdata,
|
||||
unsigned long plen,
|
||||
const unsigned char *qdata,
|
||||
unsigned long qlen,
|
||||
const unsigned char *e1data,
|
||||
unsigned long e1len,
|
||||
const unsigned char *e2data,
|
||||
unsigned long e2len,
|
||||
const unsigned char *coeffdata, unsigned long coefflen);
|
||||
int _libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename,
|
||||
unsigned const char *passphrase);
|
||||
int _libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsa,
|
||||
const unsigned char *sig,
|
||||
unsigned long sig_len,
|
||||
const unsigned char *m, unsigned long m_len);
|
||||
int _libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
||||
libssh2_rsa_ctx * rsactx,
|
||||
const unsigned char *hash,
|
||||
size_t hash_len,
|
||||
unsigned char **signature,
|
||||
size_t *signature_len);
|
||||
|
||||
int _libssh2_dsa_new(libssh2_dsa_ctx ** dsa,
|
||||
const unsigned char *pdata,
|
||||
unsigned long plen,
|
||||
const unsigned char *qdata,
|
||||
unsigned long qlen,
|
||||
const unsigned char *gdata,
|
||||
unsigned long glen,
|
||||
const unsigned char *ydata,
|
||||
unsigned long ylen,
|
||||
const unsigned char *x, unsigned long x_len);
|
||||
int _libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename,
|
||||
unsigned const char *passphrase);
|
||||
int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *sig,
|
||||
const unsigned char *m, unsigned long m_len);
|
||||
int _libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *hash,
|
||||
unsigned long hash_len, unsigned char *sig);
|
||||
|
||||
int _libssh2_cipher_init(_libssh2_cipher_ctx * h,
|
||||
_libssh2_cipher_type(algo),
|
||||
unsigned char *iv,
|
||||
unsigned char *secret, int encrypt);
|
||||
|
||||
int _libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx,
|
||||
_libssh2_cipher_type(algo),
|
||||
int encrypt, unsigned char *block);
|
||||
|
||||
int _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
|
||||
unsigned char **method,
|
||||
size_t *method_len,
|
||||
unsigned char **pubkeydata,
|
||||
size_t *pubkeydata_len,
|
||||
const char *privatekey,
|
||||
const char *passphrase);
|
||||
|
||||
void _libssh2_init_aes_ctr(void);
|
||||
|
||||
#endif
|
||||
78
vendor/libssh2-1.4.2/src/global.c
vendored
Normal file
78
vendor/libssh2-1.4.2/src/global.c
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/* Copyright (c) 2010 Lars Nordin <Lars.Nordin@SDlabs.se>
|
||||
* Copyright (C) 2010 Simon Josefsson <simon@josefsson.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
static int _libssh2_initialized = 0;
|
||||
static int _libssh2_init_flags = 0;
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_init(int flags)
|
||||
{
|
||||
if (_libssh2_initialized == 0 && !(flags & LIBSSH2_INIT_NO_CRYPTO)) {
|
||||
libssh2_crypto_init();
|
||||
_libssh2_init_aes_ctr();
|
||||
}
|
||||
|
||||
_libssh2_initialized++;
|
||||
_libssh2_init_flags |= flags;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LIBSSH2_API void
|
||||
libssh2_exit(void)
|
||||
{
|
||||
if (_libssh2_initialized == 0)
|
||||
return;
|
||||
|
||||
_libssh2_initialized--;
|
||||
|
||||
if (!(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) {
|
||||
libssh2_crypto_exit();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
_libssh2_init_if_needed(void)
|
||||
{
|
||||
if (_libssh2_initialized == 0)
|
||||
(void)libssh2_init (0);
|
||||
}
|
||||
485
vendor/libssh2-1.4.2/src/hostkey.c
vendored
Normal file
485
vendor/libssh2-1.4.2/src/hostkey.c
vendored
Normal file
|
|
@ -0,0 +1,485 @@
|
|||
/* Copyright (c) 2004-2006, Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2009 by Daniel Stenberg
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "misc.h"
|
||||
|
||||
/* Needed for struct iovec on some platforms */
|
||||
#ifdef HAVE_SYS_UIO_H
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#if LIBSSH2_RSA
|
||||
/* ***********
|
||||
* ssh-rsa *
|
||||
*********** */
|
||||
|
||||
static int hostkey_method_ssh_rsa_dtor(LIBSSH2_SESSION * session,
|
||||
void **abstract);
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_rsa_init
|
||||
*
|
||||
* Initialize the server hostkey working area with e/n pair
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_rsa_init(LIBSSH2_SESSION * session,
|
||||
const unsigned char *hostkey_data,
|
||||
size_t hostkey_data_len,
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_rsa_ctx *rsactx;
|
||||
const unsigned char *s, *e, *n;
|
||||
unsigned long len, e_len, n_len;
|
||||
|
||||
(void) hostkey_data_len;
|
||||
|
||||
if (*abstract) {
|
||||
hostkey_method_ssh_rsa_dtor(session, abstract);
|
||||
*abstract = NULL;
|
||||
}
|
||||
|
||||
s = hostkey_data;
|
||||
len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
|
||||
if (len != 7 || strncmp((char *) s, "ssh-rsa", 7) != 0) {
|
||||
return -1;
|
||||
}
|
||||
s += 7;
|
||||
|
||||
e_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
|
||||
e = s;
|
||||
s += e_len;
|
||||
n_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
n = s;
|
||||
|
||||
if (_libssh2_rsa_new(&rsactx, e, e_len, n, n_len, NULL, 0,
|
||||
NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0))
|
||||
return -1;
|
||||
|
||||
*abstract = rsactx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_rsa_initPEM
|
||||
*
|
||||
* Load a Private Key from a PEM file
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_rsa_initPEM(LIBSSH2_SESSION * session,
|
||||
const char *privkeyfile,
|
||||
unsigned const char *passphrase,
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_rsa_ctx *rsactx;
|
||||
int ret;
|
||||
|
||||
if (*abstract) {
|
||||
hostkey_method_ssh_rsa_dtor(session, abstract);
|
||||
*abstract = NULL;
|
||||
}
|
||||
|
||||
ret = _libssh2_rsa_new_private(&rsactx, session, privkeyfile, passphrase);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*abstract = rsactx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_rsa_sign
|
||||
*
|
||||
* Verify signature created by remote
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_rsa_sig_verify(LIBSSH2_SESSION * session,
|
||||
const unsigned char *sig,
|
||||
size_t sig_len,
|
||||
const unsigned char *m,
|
||||
size_t m_len, void **abstract)
|
||||
{
|
||||
libssh2_rsa_ctx *rsactx = (libssh2_rsa_ctx *) (*abstract);
|
||||
(void) session;
|
||||
|
||||
/* Skip past keyname_len(4) + keyname(7){"ssh-rsa"} + signature_len(4) */
|
||||
sig += 15;
|
||||
sig_len -= 15;
|
||||
return _libssh2_rsa_sha1_verify(rsactx, sig, sig_len, m, m_len);
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_rsa_signv
|
||||
*
|
||||
* Construct a signature from an array of vectors
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_rsa_signv(LIBSSH2_SESSION * session,
|
||||
unsigned char **signature,
|
||||
size_t *signature_len,
|
||||
int veccount,
|
||||
const struct iovec datavec[],
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_rsa_ctx *rsactx = (libssh2_rsa_ctx *) (*abstract);
|
||||
int ret;
|
||||
int i;
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
libssh2_sha1_ctx ctx;
|
||||
|
||||
libssh2_sha1_init(&ctx);
|
||||
for(i = 0; i < veccount; i++) {
|
||||
libssh2_sha1_update(ctx, datavec[i].iov_base, datavec[i].iov_len);
|
||||
}
|
||||
libssh2_sha1_final(ctx, hash);
|
||||
|
||||
ret = _libssh2_rsa_sha1_sign(session, rsactx, hash, SHA_DIGEST_LENGTH,
|
||||
signature, signature_len);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_rsa_dtor
|
||||
*
|
||||
* Shutdown the hostkey
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_rsa_dtor(LIBSSH2_SESSION * session, void **abstract)
|
||||
{
|
||||
libssh2_rsa_ctx *rsactx = (libssh2_rsa_ctx *) (*abstract);
|
||||
(void) session;
|
||||
|
||||
_libssh2_rsa_free(rsactx);
|
||||
|
||||
*abstract = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const LIBSSH2_HOSTKEY_METHOD hostkey_method_ssh_rsa = {
|
||||
"ssh-rsa",
|
||||
MD5_DIGEST_LENGTH,
|
||||
hostkey_method_ssh_rsa_init,
|
||||
hostkey_method_ssh_rsa_initPEM,
|
||||
hostkey_method_ssh_rsa_sig_verify,
|
||||
hostkey_method_ssh_rsa_signv,
|
||||
NULL, /* encrypt */
|
||||
hostkey_method_ssh_rsa_dtor,
|
||||
};
|
||||
#endif /* LIBSSH2_RSA */
|
||||
|
||||
#if LIBSSH2_DSA
|
||||
/* ***********
|
||||
* ssh-dss *
|
||||
*********** */
|
||||
|
||||
static int hostkey_method_ssh_dss_dtor(LIBSSH2_SESSION * session,
|
||||
void **abstract);
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_dss_init
|
||||
*
|
||||
* Initialize the server hostkey working area with p/q/g/y set
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_dss_init(LIBSSH2_SESSION * session,
|
||||
const unsigned char *hostkey_data,
|
||||
size_t hostkey_data_len,
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_dsa_ctx *dsactx;
|
||||
const unsigned char *p, *q, *g, *y, *s;
|
||||
unsigned long p_len, q_len, g_len, y_len, len;
|
||||
(void) hostkey_data_len;
|
||||
|
||||
if (*abstract) {
|
||||
hostkey_method_ssh_dss_dtor(session, abstract);
|
||||
*abstract = NULL;
|
||||
}
|
||||
|
||||
s = hostkey_data;
|
||||
len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
if (len != 7 || strncmp((char *) s, "ssh-dss", 7) != 0) {
|
||||
return -1;
|
||||
}
|
||||
s += 7;
|
||||
|
||||
p_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
p = s;
|
||||
s += p_len;
|
||||
q_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
q = s;
|
||||
s += q_len;
|
||||
g_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
g = s;
|
||||
s += g_len;
|
||||
y_len = _libssh2_ntohu32(s);
|
||||
s += 4;
|
||||
y = s;
|
||||
/* s += y_len; */
|
||||
|
||||
_libssh2_dsa_new(&dsactx, p, p_len, q, q_len, g, g_len, y, y_len, NULL, 0);
|
||||
|
||||
*abstract = dsactx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_dss_initPEM
|
||||
*
|
||||
* Load a Private Key from a PEM file
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_dss_initPEM(LIBSSH2_SESSION * session,
|
||||
const char *privkeyfile,
|
||||
unsigned const char *passphrase,
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_dsa_ctx *dsactx;
|
||||
int ret;
|
||||
|
||||
if (*abstract) {
|
||||
hostkey_method_ssh_dss_dtor(session, abstract);
|
||||
*abstract = NULL;
|
||||
}
|
||||
|
||||
ret = _libssh2_dsa_new_private(&dsactx, session, privkeyfile, passphrase);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*abstract = dsactx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_hostkey_method_ssh_dss_sign
|
||||
*
|
||||
* Verify signature created by remote
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_dss_sig_verify(LIBSSH2_SESSION * session,
|
||||
const unsigned char *sig,
|
||||
size_t sig_len,
|
||||
const unsigned char *m,
|
||||
size_t m_len, void **abstract)
|
||||
{
|
||||
libssh2_dsa_ctx *dsactx = (libssh2_dsa_ctx *) (*abstract);
|
||||
|
||||
/* Skip past keyname_len(4) + keyname(7){"ssh-dss"} + signature_len(4) */
|
||||
sig += 15;
|
||||
sig_len -= 15;
|
||||
if (sig_len != 40) {
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_PROTO,
|
||||
"Invalid DSS signature length");
|
||||
}
|
||||
return _libssh2_dsa_sha1_verify(dsactx, sig, m, m_len);
|
||||
}
|
||||
|
||||
/*
|
||||
* hostkey_method_ssh_dss_signv
|
||||
*
|
||||
* Construct a signature from an array of vectors
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_dss_signv(LIBSSH2_SESSION * session,
|
||||
unsigned char **signature,
|
||||
size_t *signature_len,
|
||||
int veccount,
|
||||
const struct iovec datavec[],
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_dsa_ctx *dsactx = (libssh2_dsa_ctx *) (*abstract);
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
libssh2_sha1_ctx ctx;
|
||||
int i;
|
||||
|
||||
*signature = LIBSSH2_ALLOC(session, 2 * SHA_DIGEST_LENGTH);
|
||||
if (!*signature) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*signature_len = 2 * SHA_DIGEST_LENGTH;
|
||||
memset(*signature, 0, 2 * SHA_DIGEST_LENGTH);
|
||||
|
||||
libssh2_sha1_init(&ctx);
|
||||
for(i = 0; i < veccount; i++) {
|
||||
libssh2_sha1_update(ctx, datavec[i].iov_base, datavec[i].iov_len);
|
||||
}
|
||||
libssh2_sha1_final(ctx, hash);
|
||||
|
||||
if (_libssh2_dsa_sha1_sign(dsactx, hash, SHA_DIGEST_LENGTH, *signature)) {
|
||||
LIBSSH2_FREE(session, *signature);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_hostkey_method_ssh_dss_dtor
|
||||
*
|
||||
* Shutdown the hostkey method
|
||||
*/
|
||||
static int
|
||||
hostkey_method_ssh_dss_dtor(LIBSSH2_SESSION * session, void **abstract)
|
||||
{
|
||||
libssh2_dsa_ctx *dsactx = (libssh2_dsa_ctx *) (*abstract);
|
||||
(void) session;
|
||||
|
||||
_libssh2_dsa_free(dsactx);
|
||||
|
||||
*abstract = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const LIBSSH2_HOSTKEY_METHOD hostkey_method_ssh_dss = {
|
||||
"ssh-dss",
|
||||
MD5_DIGEST_LENGTH,
|
||||
hostkey_method_ssh_dss_init,
|
||||
hostkey_method_ssh_dss_initPEM,
|
||||
hostkey_method_ssh_dss_sig_verify,
|
||||
hostkey_method_ssh_dss_signv,
|
||||
NULL, /* encrypt */
|
||||
hostkey_method_ssh_dss_dtor,
|
||||
};
|
||||
#endif /* LIBSSH2_DSA */
|
||||
|
||||
static const LIBSSH2_HOSTKEY_METHOD *hostkey_methods[] = {
|
||||
#if LIBSSH2_RSA
|
||||
&hostkey_method_ssh_rsa,
|
||||
#endif /* LIBSSH2_RSA */
|
||||
#if LIBSSH2_DSA
|
||||
&hostkey_method_ssh_dss,
|
||||
#endif /* LIBSSH2_DSA */
|
||||
NULL
|
||||
};
|
||||
|
||||
const LIBSSH2_HOSTKEY_METHOD **
|
||||
libssh2_hostkey_methods(void)
|
||||
{
|
||||
return hostkey_methods;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_hostkey_hash
|
||||
*
|
||||
* Returns hash signature
|
||||
* Returned buffer should NOT be freed
|
||||
* Length of buffer is determined by hash type
|
||||
* i.e. MD5 == 16, SHA1 == 20
|
||||
*/
|
||||
LIBSSH2_API const char *
|
||||
libssh2_hostkey_hash(LIBSSH2_SESSION * session, int hash_type)
|
||||
{
|
||||
switch (hash_type) {
|
||||
#if LIBSSH2_MD5
|
||||
case LIBSSH2_HOSTKEY_HASH_MD5:
|
||||
return (char *) session->server_hostkey_md5;
|
||||
break;
|
||||
#endif /* LIBSSH2_MD5 */
|
||||
case LIBSSH2_HOSTKEY_HASH_SHA1:
|
||||
return (char *) session->server_hostkey_sha1;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int hostkey_type(const unsigned char *hostkey, size_t len)
|
||||
{
|
||||
const unsigned char rsa[] = {
|
||||
0, 0, 0, 0x07, 's', 's', 'h', '-', 'r', 's', 'a'
|
||||
};
|
||||
const unsigned char dss[] = {
|
||||
0, 0, 0, 0x07, 's', 's', 'h', '-', 'd', 's', 's'
|
||||
};
|
||||
|
||||
if (len < 11)
|
||||
return LIBSSH2_HOSTKEY_TYPE_UNKNOWN;
|
||||
|
||||
if (!memcmp(rsa, hostkey, 11))
|
||||
return LIBSSH2_HOSTKEY_TYPE_RSA;
|
||||
|
||||
if (!memcmp(dss, hostkey, 11))
|
||||
return LIBSSH2_HOSTKEY_TYPE_DSS;
|
||||
|
||||
return LIBSSH2_HOSTKEY_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_session_hostkey()
|
||||
*
|
||||
* Returns the server key and length.
|
||||
*
|
||||
*/
|
||||
LIBSSH2_API const char *
|
||||
libssh2_session_hostkey(LIBSSH2_SESSION *session, size_t *len, int *type)
|
||||
{
|
||||
if(session->server_hostkey_len) {
|
||||
if(len)
|
||||
*len = session->server_hostkey_len;
|
||||
if (type)
|
||||
*type = hostkey_type(session->server_hostkey,
|
||||
session->server_hostkey_len);
|
||||
return (char *) session->server_hostkey;
|
||||
}
|
||||
if(len)
|
||||
*len = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
98
vendor/libssh2-1.4.2/src/keepalive.c
vendored
Normal file
98
vendor/libssh2-1.4.2/src/keepalive.c
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
/* Copyright (C) 2010 Simon Josefsson
|
||||
* Author: Simon Josefsson
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "transport.h" /* _libssh2_transport_write */
|
||||
|
||||
/* Keep-alive stuff. */
|
||||
|
||||
LIBSSH2_API void
|
||||
libssh2_keepalive_config (LIBSSH2_SESSION *session,
|
||||
int want_reply,
|
||||
unsigned interval)
|
||||
{
|
||||
if (interval == 1)
|
||||
session->keepalive_interval = 2;
|
||||
else
|
||||
session->keepalive_interval = interval;
|
||||
session->keepalive_want_reply = want_reply ? 1 : 0;
|
||||
}
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_keepalive_send (LIBSSH2_SESSION *session,
|
||||
int *seconds_to_next)
|
||||
{
|
||||
time_t now;
|
||||
|
||||
if (!session->keepalive_interval) {
|
||||
if (seconds_to_next)
|
||||
*seconds_to_next = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
now = time (NULL);
|
||||
|
||||
if (session->keepalive_last_sent + session->keepalive_interval <= now) {
|
||||
/* Format is
|
||||
"SSH_MSG_GLOBAL_REQUEST || 4-byte len || str || want-reply". */
|
||||
unsigned char keepalive_data[]
|
||||
= "\x50\x00\x00\x00\x15keepalive@libssh2.orgW";
|
||||
size_t len = sizeof (keepalive_data) - 1;
|
||||
int rc;
|
||||
|
||||
keepalive_data[len - 1] = session->keepalive_want_reply;
|
||||
|
||||
rc = _libssh2_transport_send(session, keepalive_data, len, NULL, 0);
|
||||
/* Silently ignore PACKET_EAGAIN here: if the write buffer is
|
||||
already full, sending another keepalive is not useful. */
|
||||
if (rc && rc != LIBSSH2_ERROR_EAGAIN) {
|
||||
_libssh2_error(session, LIBSSH2_ERROR_SOCKET_SEND,
|
||||
"Unable to send keepalive message");
|
||||
return rc;
|
||||
}
|
||||
|
||||
session->keepalive_last_sent = now;
|
||||
if (seconds_to_next)
|
||||
*seconds_to_next = session->keepalive_interval;
|
||||
} else if (seconds_to_next) {
|
||||
*seconds_to_next = (int) session->keepalive_last_sent
|
||||
+ session->keepalive_interval - now;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
2008
vendor/libssh2-1.4.2/src/kex.c
vendored
Normal file
2008
vendor/libssh2-1.4.2/src/kex.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
1146
vendor/libssh2-1.4.2/src/knownhost.c
vendored
Normal file
1146
vendor/libssh2-1.4.2/src/knownhost.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
593
vendor/libssh2-1.4.2/src/libgcrypt.c
vendored
Normal file
593
vendor/libssh2-1.4.2/src/libgcrypt.c
vendored
Normal file
|
|
@ -0,0 +1,593 @@
|
|||
/* Copyright (C) 2008, 2009, Simon Josefsson
|
||||
* Copyright (C) 2006, 2007, The Written Word, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
#ifdef LIBSSH2_LIBGCRYPT /* compile only if we build with libgcrypt */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
_libssh2_rsa_new(libssh2_rsa_ctx ** rsa,
|
||||
const unsigned char *edata,
|
||||
unsigned long elen,
|
||||
const unsigned char *ndata,
|
||||
unsigned long nlen,
|
||||
const unsigned char *ddata,
|
||||
unsigned long dlen,
|
||||
const unsigned char *pdata,
|
||||
unsigned long plen,
|
||||
const unsigned char *qdata,
|
||||
unsigned long qlen,
|
||||
const unsigned char *e1data,
|
||||
unsigned long e1len,
|
||||
const unsigned char *e2data,
|
||||
unsigned long e2len,
|
||||
const unsigned char *coeffdata, unsigned long coefflen)
|
||||
{
|
||||
int rc;
|
||||
(void) e1data;
|
||||
(void) e1len;
|
||||
(void) e2data;
|
||||
(void) e2len;
|
||||
|
||||
if (ddata) {
|
||||
rc = gcry_sexp_build
|
||||
(rsa, NULL,
|
||||
"(private-key(rsa(n%b)(e%b)(d%b)(q%b)(p%b)(u%b)))",
|
||||
nlen, ndata, elen, edata, dlen, ddata, plen, pdata,
|
||||
qlen, qdata, coefflen, coeffdata);
|
||||
} else {
|
||||
rc = gcry_sexp_build(rsa, NULL, "(public-key(rsa(n%b)(e%b)))",
|
||||
nlen, ndata, elen, edata);
|
||||
}
|
||||
if (rc) {
|
||||
*rsa = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsa,
|
||||
const unsigned char *sig,
|
||||
unsigned long sig_len,
|
||||
const unsigned char *m, unsigned long m_len)
|
||||
{
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
gcry_sexp_t s_sig, s_hash;
|
||||
int rc = -1;
|
||||
|
||||
libssh2_sha1(m, m_len, hash);
|
||||
|
||||
rc = gcry_sexp_build(&s_hash, NULL,
|
||||
"(data (flags pkcs1) (hash sha1 %b))",
|
||||
SHA_DIGEST_LENGTH, hash);
|
||||
if (rc != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = gcry_sexp_build(&s_sig, NULL, "(sig-val(rsa(s %b)))", sig_len, sig);
|
||||
if (rc != 0) {
|
||||
gcry_sexp_release(s_hash);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = gcry_pk_verify(s_sig, s_hash, rsa);
|
||||
gcry_sexp_release(s_sig);
|
||||
gcry_sexp_release(s_hash);
|
||||
|
||||
return (rc == 0) ? 0 : -1;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_dsa_new(libssh2_dsa_ctx ** dsactx,
|
||||
const unsigned char *p,
|
||||
unsigned long p_len,
|
||||
const unsigned char *q,
|
||||
unsigned long q_len,
|
||||
const unsigned char *g,
|
||||
unsigned long g_len,
|
||||
const unsigned char *y,
|
||||
unsigned long y_len,
|
||||
const unsigned char *x, unsigned long x_len)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (x_len) {
|
||||
rc = gcry_sexp_build
|
||||
(dsactx, NULL,
|
||||
"(private-key(dsa(p%b)(q%b)(g%b)(y%b)(x%b)))",
|
||||
p_len, p, q_len, q, g_len, g, y_len, y, x_len, x);
|
||||
} else {
|
||||
rc = gcry_sexp_build(dsactx, NULL,
|
||||
"(public-key(dsa(p%b)(q%b)(g%b)(y%b)))",
|
||||
p_len, p, q_len, q, g_len, g, y_len, y);
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
*dsactx = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename, unsigned const char *passphrase)
|
||||
{
|
||||
FILE *fp;
|
||||
unsigned char *data, *save_data;
|
||||
unsigned int datalen;
|
||||
int ret;
|
||||
unsigned char *n, *e, *d, *p, *q, *e1, *e2, *coeff;
|
||||
unsigned int nlen, elen, dlen, plen, qlen, e1len, e2len, coefflen;
|
||||
|
||||
(void) passphrase;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (!fp) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_parse(session,
|
||||
"-----BEGIN RSA PRIVATE KEY-----",
|
||||
"-----END RSA PRIVATE KEY-----",
|
||||
fp, &data, &datalen);
|
||||
fclose(fp);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
save_data = data;
|
||||
|
||||
if (_libssh2_pem_decode_sequence(&data, &datalen)) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
/* First read Version field (should be 0). */
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &n, &nlen);
|
||||
if (ret != 0 || (nlen != 1 && *n != '\0')) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &n, &nlen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &e, &elen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &d, &dlen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &p, &plen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &q, &qlen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &e1, &e1len);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &e2, &e2len);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &coeff, &coefflen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (_libssh2_rsa_new(rsa, e, elen, n, nlen, d, dlen, p, plen,
|
||||
q, qlen, e1, e1len, e2, e2len, coeff, coefflen)) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
fail:
|
||||
LIBSSH2_FREE(session, save_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename, unsigned const char *passphrase)
|
||||
{
|
||||
FILE *fp;
|
||||
unsigned char *data, *save_data;
|
||||
unsigned int datalen;
|
||||
int ret;
|
||||
unsigned char *p, *q, *g, *y, *x;
|
||||
unsigned int plen, qlen, glen, ylen, xlen;
|
||||
|
||||
(void) passphrase;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (!fp) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_parse(session,
|
||||
"-----BEGIN DSA PRIVATE KEY-----",
|
||||
"-----END DSA PRIVATE KEY-----",
|
||||
fp, &data, &datalen);
|
||||
fclose(fp);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
save_data = data;
|
||||
|
||||
if (_libssh2_pem_decode_sequence(&data, &datalen)) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* First read Version field (should be 0). */
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &p, &plen);
|
||||
if (ret != 0 || (plen != 1 && *p != '\0')) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &p, &plen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &q, &qlen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &g, &glen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &y, &ylen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = _libssh2_pem_decode_integer(&data, &datalen, &x, &xlen);
|
||||
if (ret != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (datalen != 0) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (_libssh2_dsa_new(dsa, p, plen, q, qlen, g, glen, y, ylen, x, xlen)) {
|
||||
ret = -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
fail:
|
||||
LIBSSH2_FREE(session, save_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
||||
libssh2_dsa_ctx * rsactx,
|
||||
const unsigned char *hash,
|
||||
size_t hash_len,
|
||||
unsigned char **signature, size_t *signature_len)
|
||||
{
|
||||
gcry_sexp_t sig_sexp;
|
||||
gcry_sexp_t data;
|
||||
int rc;
|
||||
const char *tmp;
|
||||
size_t size;
|
||||
|
||||
if (hash_len != SHA_DIGEST_LENGTH) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (gcry_sexp_build(&data, NULL,
|
||||
"(data (flags pkcs1) (hash sha1 %b))",
|
||||
hash_len, hash)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = gcry_pk_sign(&sig_sexp, data, rsactx);
|
||||
|
||||
gcry_sexp_release(data);
|
||||
|
||||
if (rc != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
data = gcry_sexp_find_token(sig_sexp, "s", 0);
|
||||
if (!data) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
tmp = gcry_sexp_nth_data(data, 1, &size);
|
||||
if (!tmp) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tmp[0] == '\0') {
|
||||
tmp++;
|
||||
size--;
|
||||
}
|
||||
|
||||
*signature = LIBSSH2_ALLOC(session, size);
|
||||
memcpy(*signature, tmp, size);
|
||||
*signature_len = size;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *hash,
|
||||
unsigned long hash_len, unsigned char *sig)
|
||||
{
|
||||
unsigned char zhash[SHA_DIGEST_LENGTH + 1];
|
||||
gcry_sexp_t sig_sexp;
|
||||
gcry_sexp_t data;
|
||||
int ret;
|
||||
const char *tmp;
|
||||
size_t size;
|
||||
|
||||
if (hash_len != SHA_DIGEST_LENGTH) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(zhash + 1, hash, hash_len);
|
||||
zhash[0] = 0;
|
||||
|
||||
if (gcry_sexp_build(&data, NULL, "(data (value %b))", hash_len + 1, zhash)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = gcry_pk_sign(&sig_sexp, data, dsactx);
|
||||
|
||||
gcry_sexp_release(data);
|
||||
|
||||
if (ret != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(sig, 0, 40);
|
||||
|
||||
/* Extract R. */
|
||||
|
||||
data = gcry_sexp_find_token(sig_sexp, "r", 0);
|
||||
if (!data)
|
||||
goto err;
|
||||
|
||||
tmp = gcry_sexp_nth_data(data, 1, &size);
|
||||
if (!tmp)
|
||||
goto err;
|
||||
|
||||
if (tmp[0] == '\0') {
|
||||
tmp++;
|
||||
size--;
|
||||
}
|
||||
|
||||
if (size < 1 || size > 20)
|
||||
goto err;
|
||||
|
||||
memcpy(sig + (20 - size), tmp, size);
|
||||
|
||||
gcry_sexp_release(data);
|
||||
|
||||
/* Extract S. */
|
||||
|
||||
data = gcry_sexp_find_token(sig_sexp, "s", 0);
|
||||
if (!data)
|
||||
goto err;
|
||||
|
||||
tmp = gcry_sexp_nth_data(data, 1, &size);
|
||||
if (!tmp)
|
||||
goto err;
|
||||
|
||||
if (tmp[0] == '\0') {
|
||||
tmp++;
|
||||
size--;
|
||||
}
|
||||
|
||||
if (size < 1 || size > 20)
|
||||
goto err;
|
||||
|
||||
memcpy(sig + 20 + (20 - size), tmp, size);
|
||||
goto out;
|
||||
|
||||
err:
|
||||
ret = -1;
|
||||
|
||||
out:
|
||||
if (sig_sexp) {
|
||||
gcry_sexp_release(sig_sexp);
|
||||
}
|
||||
if (data) {
|
||||
gcry_sexp_release(data);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_dsa_sha1_verify(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *sig,
|
||||
const unsigned char *m, unsigned long m_len)
|
||||
{
|
||||
unsigned char hash[SHA_DIGEST_LENGTH + 1];
|
||||
gcry_sexp_t s_sig, s_hash;
|
||||
int rc = -1;
|
||||
|
||||
libssh2_sha1(m, m_len, hash + 1);
|
||||
hash[0] = 0;
|
||||
|
||||
if (gcry_sexp_build(&s_hash, NULL, "(data(flags raw)(value %b))",
|
||||
SHA_DIGEST_LENGTH + 1, hash)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (gcry_sexp_build(&s_sig, NULL, "(sig-val(dsa(r %b)(s %b)))",
|
||||
20, sig, 20, sig + 20)) {
|
||||
gcry_sexp_release(s_hash);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = gcry_pk_verify(s_sig, s_hash, dsactx);
|
||||
gcry_sexp_release(s_sig);
|
||||
gcry_sexp_release(s_hash);
|
||||
|
||||
return (rc == 0) ? 0 : -1;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_cipher_init(_libssh2_cipher_ctx * h,
|
||||
_libssh2_cipher_type(algo),
|
||||
unsigned char *iv, unsigned char *secret, int encrypt)
|
||||
{
|
||||
int ret;
|
||||
int cipher = _libssh2_gcry_cipher (algo);
|
||||
int mode = _libssh2_gcry_mode (algo);
|
||||
int keylen = gcry_cipher_get_algo_keylen(cipher);
|
||||
|
||||
(void) encrypt;
|
||||
|
||||
ret = gcry_cipher_open(h, cipher, mode, 0);
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = gcry_cipher_setkey(*h, secret, keylen);
|
||||
if (ret) {
|
||||
gcry_cipher_close(*h);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mode != GCRY_CIPHER_MODE_STREAM) {
|
||||
int blklen = gcry_cipher_get_algo_blklen(cipher);
|
||||
if (mode == GCRY_CIPHER_MODE_CTR)
|
||||
ret = gcry_cipher_setctr(*h, iv, blklen);
|
||||
else
|
||||
ret = gcry_cipher_setiv(*h, iv, blklen);
|
||||
if (ret) {
|
||||
gcry_cipher_close(*h);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx,
|
||||
_libssh2_cipher_type(algo),
|
||||
int encrypt, unsigned char *block)
|
||||
{
|
||||
int cipher = _libssh2_gcry_cipher (algo);
|
||||
size_t blklen = gcry_cipher_get_algo_blklen(cipher);
|
||||
int ret;
|
||||
|
||||
if (blklen == 1) {
|
||||
/* Hack for arcfour. */
|
||||
blklen = 8;
|
||||
}
|
||||
|
||||
if (encrypt) {
|
||||
ret = gcry_cipher_encrypt(*ctx, block, blklen, block, blklen);
|
||||
} else {
|
||||
ret = gcry_cipher_decrypt(*ctx, block, blklen, block, blklen);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
|
||||
unsigned char **method,
|
||||
size_t *method_len,
|
||||
unsigned char **pubkeydata,
|
||||
size_t *pubkeydata_len,
|
||||
const char *privatekey,
|
||||
const char *passphrase)
|
||||
{
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_FILE,
|
||||
"Unable to extract public key from private key file: "
|
||||
"Method unimplemented in libgcrypt backend");
|
||||
}
|
||||
|
||||
void _libssh2_init_aes_ctr(void)
|
||||
{
|
||||
/* no implementation */
|
||||
}
|
||||
#endif /* LIBSSH2_LIBGCRYPT */
|
||||
150
vendor/libssh2-1.4.2/src/libgcrypt.h
vendored
Normal file
150
vendor/libssh2-1.4.2/src/libgcrypt.h
vendored
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
* Copyright (C) 2008, 2009, 2010 Simon Josefsson
|
||||
* Copyright (C) 2006, 2007, The Written Word, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <gcrypt.h>
|
||||
|
||||
#define LIBSSH2_MD5 1
|
||||
|
||||
#define LIBSSH2_HMAC_RIPEMD 1
|
||||
|
||||
#define LIBSSH2_AES 1
|
||||
#define LIBSSH2_AES_CTR 1
|
||||
#define LIBSSH2_BLOWFISH 1
|
||||
#define LIBSSH2_RC4 1
|
||||
#define LIBSSH2_CAST 1
|
||||
#define LIBSSH2_3DES 1
|
||||
|
||||
#define LIBSSH2_RSA 1
|
||||
#define LIBSSH2_DSA 1
|
||||
|
||||
#define MD5_DIGEST_LENGTH 16
|
||||
#define SHA_DIGEST_LENGTH 20
|
||||
|
||||
#define _libssh2_random(buf, len) \
|
||||
(gcry_randomize ((buf), (len), GCRY_STRONG_RANDOM), 1)
|
||||
|
||||
#define libssh2_sha1_ctx gcry_md_hd_t
|
||||
#define libssh2_sha1_init(ctx) gcry_md_open (ctx, GCRY_MD_SHA1, 0);
|
||||
#define libssh2_sha1_update(ctx, data, len) gcry_md_write (ctx, data, len)
|
||||
#define libssh2_sha1_final(ctx, out) \
|
||||
memcpy (out, gcry_md_read (ctx, 0), SHA_DIGEST_LENGTH), gcry_md_close (ctx)
|
||||
#define libssh2_sha1(message, len, out) \
|
||||
gcry_md_hash_buffer (GCRY_MD_SHA1, out, message, len)
|
||||
|
||||
#define libssh2_md5_ctx gcry_md_hd_t
|
||||
#define libssh2_md5_init(ctx) gcry_md_open (ctx, GCRY_MD_MD5, 0);
|
||||
#define libssh2_md5_update(ctx, data, len) gcry_md_write (ctx, data, len)
|
||||
#define libssh2_md5_final(ctx, out) \
|
||||
memcpy (out, gcry_md_read (ctx, 0), MD5_DIGEST_LENGTH), gcry_md_close (ctx)
|
||||
#define libssh2_md5(message, len, out) \
|
||||
gcry_md_hash_buffer (GCRY_MD_MD5, out, message, len)
|
||||
|
||||
#define libssh2_hmac_ctx gcry_md_hd_t
|
||||
#define libssh2_hmac_sha1_init(ctx, key, keylen) \
|
||||
gcry_md_open (ctx, GCRY_MD_SHA1, GCRY_MD_FLAG_HMAC), \
|
||||
gcry_md_setkey (*ctx, key, keylen)
|
||||
#define libssh2_hmac_md5_init(ctx, key, keylen) \
|
||||
gcry_md_open (ctx, GCRY_MD_MD5, GCRY_MD_FLAG_HMAC), \
|
||||
gcry_md_setkey (*ctx, key, keylen)
|
||||
#define libssh2_hmac_ripemd160_init(ctx, key, keylen) \
|
||||
gcry_md_open (ctx, GCRY_MD_RMD160, GCRY_MD_FLAG_HMAC), \
|
||||
gcry_md_setkey (*ctx, key, keylen)
|
||||
#define libssh2_hmac_update(ctx, data, datalen) \
|
||||
gcry_md_write (ctx, data, datalen)
|
||||
#define libssh2_hmac_final(ctx, data) \
|
||||
memcpy (data, gcry_md_read (ctx, 0), \
|
||||
gcry_md_get_algo_dlen (gcry_md_get_algo (ctx)))
|
||||
#define libssh2_hmac_cleanup(ctx) gcry_md_close (*ctx);
|
||||
|
||||
#define libssh2_crypto_init() gcry_control (GCRYCTL_DISABLE_SECMEM)
|
||||
#define libssh2_crypto_exit()
|
||||
|
||||
#define libssh2_rsa_ctx struct gcry_sexp
|
||||
|
||||
#define _libssh2_rsa_free(rsactx) gcry_sexp_release (rsactx)
|
||||
|
||||
#define libssh2_dsa_ctx struct gcry_sexp
|
||||
|
||||
#define _libssh2_dsa_free(dsactx) gcry_sexp_release (dsactx)
|
||||
|
||||
#define _libssh2_cipher_type(name) int name
|
||||
#define _libssh2_cipher_ctx gcry_cipher_hd_t
|
||||
|
||||
#define _libssh2_gcry_ciphermode(c,m) ((c << 8) | m)
|
||||
#define _libssh2_gcry_cipher(c) (c >> 8)
|
||||
#define _libssh2_gcry_mode(m) (m & 0xFF)
|
||||
|
||||
#define _libssh2_cipher_aes256ctr \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CTR)
|
||||
#define _libssh2_cipher_aes192ctr \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CTR)
|
||||
#define _libssh2_cipher_aes128ctr \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR)
|
||||
#define _libssh2_cipher_aes256 \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC)
|
||||
#define _libssh2_cipher_aes192 \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CBC)
|
||||
#define _libssh2_cipher_aes128 \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC)
|
||||
#define _libssh2_cipher_blowfish \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_CBC)
|
||||
#define _libssh2_cipher_arcfour \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM)
|
||||
#define _libssh2_cipher_cast5 \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CBC)
|
||||
#define _libssh2_cipher_3des \
|
||||
_libssh2_gcry_ciphermode(GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CBC)
|
||||
|
||||
|
||||
#define _libssh2_cipher_dtor(ctx) gcry_cipher_close(*(ctx))
|
||||
|
||||
#define _libssh2_bn struct gcry_mpi
|
||||
#define _libssh2_bn_ctx int
|
||||
#define _libssh2_bn_ctx_new() 0
|
||||
#define _libssh2_bn_ctx_free(bnctx) ((void)0)
|
||||
#define _libssh2_bn_init() gcry_mpi_new(0)
|
||||
#define _libssh2_bn_rand(bn, bits, top, bottom) gcry_mpi_randomize (bn, bits, GCRY_WEAK_RANDOM)
|
||||
#define _libssh2_bn_mod_exp(r, a, p, m, ctx) gcry_mpi_powm (r, a, p, m)
|
||||
#define _libssh2_bn_set_word(bn, val) gcry_mpi_set_ui(bn, val)
|
||||
#define _libssh2_bn_from_bin(bn, len, val) gcry_mpi_scan(&((bn)), GCRYMPI_FMT_USG, val, len, NULL)
|
||||
#define _libssh2_bn_to_bin(bn, val) gcry_mpi_print (GCRYMPI_FMT_USG, val, _libssh2_bn_bytes(bn), NULL, bn)
|
||||
#define _libssh2_bn_bytes(bn) (gcry_mpi_get_nbits (bn) / 8 + ((gcry_mpi_get_nbits (bn) % 8 == 0) ? 0 : 1))
|
||||
#define _libssh2_bn_bits(bn) gcry_mpi_get_nbits (bn)
|
||||
#define _libssh2_bn_free(bn) gcry_mpi_release(bn)
|
||||
|
||||
5
vendor/libssh2-1.4.2/src/libssh2_config.h
vendored
Normal file
5
vendor/libssh2-1.4.2/src/libssh2_config.h
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifdef WIN32
|
||||
#include "libssh2_config_win.h"
|
||||
#else
|
||||
#include "libssh2_config_osx.h"
|
||||
#endif
|
||||
224
vendor/libssh2-1.4.2/src/libssh2_config_osx.h
vendored
Normal file
224
vendor/libssh2-1.4.2/src/libssh2_config_osx.h
vendored
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
/* src/libssh2_config.h. Generated from libssh2_config.h.in by configure. */
|
||||
/* src/libssh2_config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
/* #undef HAVE_DISABLED_NONBLOCKING */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the `EVP_aes_128_ctr' function. */
|
||||
/* #undef HAVE_EVP_AES_128_CTR */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* #undef HAVE_FIONBIO */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET */
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
/* #undef HAVE_IOCTLSOCKET_CASE */
|
||||
|
||||
/* Define if you have the gcrypt library. */
|
||||
/* #undef HAVE_LIBGCRYPT */
|
||||
|
||||
/* Define if you have the ssl library. */
|
||||
#define HAVE_LIBSSL 1
|
||||
|
||||
/* Define if you have the z library. */
|
||||
#define HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#define HAVE_O_NONBLOCK 1
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
/* #undef HAVE_POLL */
|
||||
|
||||
/* Define to 1 if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
/* #undef HAVE_SO_NONBLOCK */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
#define HAVE_SYS_UN_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the <winsock2.h> header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* to make a symbol visible */
|
||||
/* #undef LIBSSH2_API */
|
||||
|
||||
/* Enable "none" cipher -- NOT RECOMMENDED */
|
||||
/* #undef LIBSSH2_CRYPT_NONE */
|
||||
|
||||
/* Enable newer diffie-hellman-group-exchange-sha1 syntax */
|
||||
#define LIBSSH2_DH_GEX_NEW 1
|
||||
|
||||
/* Compile in zlib support */
|
||||
#define LIBSSH2_HAVE_ZLIB 1
|
||||
|
||||
/* Use libgcrypt */
|
||||
/* #undef LIBSSH2_LIBGCRYPT */
|
||||
|
||||
/* Enable "none" MAC -- NOT RECOMMENDED */
|
||||
/* #undef LIBSSH2_MAC_NONE */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
|
||||
/* #undef NEED_REENTRANT */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libssh2"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "libssh2-devel@cool.haxx.se"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libssh2"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libssh2 -"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libssh2"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "-"
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "-"
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
41
vendor/libssh2-1.4.2/src/libssh2_config_win.h
vendored
Normal file
41
vendor/libssh2-1.4.2/src/libssh2_config_win.h
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef LIBSSH2_CONFIG_H
|
||||
#define LIBSSH2_CONFIG_H
|
||||
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#endif /* _CRT_SECURE_NO_DEPRECATE */
|
||||
#include <winsock2.h>
|
||||
#include <mswsock.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_UNISTD_H
|
||||
#define HAVE_INTTYPES_H
|
||||
#define HAVE_SYS_TIME_H
|
||||
#endif
|
||||
|
||||
#define HAVE_WINSOCK2_H
|
||||
#define HAVE_IOCTLSOCKET
|
||||
#define HAVE_SELECT
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#if _MSC_VER < 1500
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strdup _strdup
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#else
|
||||
#define strncasecmp strnicmp
|
||||
#define strcasecmp stricmp
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Enable newer diffie-hellman-group-exchange-sha1 syntax */
|
||||
#define LIBSSH2_DH_GEX_NEW 1
|
||||
|
||||
#endif /* LIBSSH2_CONFIG_H */
|
||||
|
||||
1038
vendor/libssh2-1.4.2/src/libssh2_priv.h
vendored
Normal file
1038
vendor/libssh2-1.4.2/src/libssh2_priv.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
314
vendor/libssh2-1.4.2/src/mac.c
vendored
Normal file
314
vendor/libssh2-1.4.2/src/mac.c
vendored
Normal file
|
|
@ -0,0 +1,314 @@
|
|||
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "mac.h"
|
||||
|
||||
#ifdef LIBSSH2_MAC_NONE
|
||||
/* mac_none_MAC
|
||||
* Minimalist MAC: No MAC
|
||||
*/
|
||||
static int
|
||||
mac_none_MAC(LIBSSH2_SESSION * session, unsigned char *buf,
|
||||
uint32_t seqno, const unsigned char *packet,
|
||||
uint32_t packet_len, const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static LIBSSH2_MAC_METHOD mac_method_none = {
|
||||
"none",
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
mac_none_MAC,
|
||||
NULL
|
||||
};
|
||||
#endif /* LIBSSH2_MAC_NONE */
|
||||
|
||||
/* mac_method_common_init
|
||||
* Initialize simple mac methods
|
||||
*/
|
||||
static int
|
||||
mac_method_common_init(LIBSSH2_SESSION * session, unsigned char *key,
|
||||
int *free_key, void **abstract)
|
||||
{
|
||||
*abstract = key;
|
||||
*free_key = 0;
|
||||
(void) session;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* mac_method_common_dtor
|
||||
* Cleanup simple mac methods
|
||||
*/
|
||||
static int
|
||||
mac_method_common_dtor(LIBSSH2_SESSION * session, void **abstract)
|
||||
{
|
||||
if (*abstract) {
|
||||
LIBSSH2_FREE(session, *abstract);
|
||||
}
|
||||
*abstract = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* mac_method_hmac_sha1_hash
|
||||
* Calculate hash using full sha1 value
|
||||
*/
|
||||
static int
|
||||
mac_method_hmac_sha1_hash(LIBSSH2_SESSION * session,
|
||||
unsigned char *buf, uint32_t seqno,
|
||||
const unsigned char *packet,
|
||||
uint32_t packet_len,
|
||||
const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract)
|
||||
{
|
||||
libssh2_hmac_ctx ctx;
|
||||
unsigned char seqno_buf[4];
|
||||
(void) session;
|
||||
|
||||
_libssh2_htonu32(seqno_buf, seqno);
|
||||
|
||||
libssh2_hmac_sha1_init(&ctx, *abstract, 20);
|
||||
libssh2_hmac_update(ctx, seqno_buf, 4);
|
||||
libssh2_hmac_update(ctx, packet, packet_len);
|
||||
if (addtl && addtl_len) {
|
||||
libssh2_hmac_update(ctx, addtl, addtl_len);
|
||||
}
|
||||
libssh2_hmac_final(ctx, buf);
|
||||
libssh2_hmac_cleanup(&ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_sha1 = {
|
||||
"hmac-sha1",
|
||||
20,
|
||||
20,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_sha1_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
|
||||
/* mac_method_hmac_sha1_96_hash
|
||||
* Calculate hash using first 96 bits of sha1 value
|
||||
*/
|
||||
static int
|
||||
mac_method_hmac_sha1_96_hash(LIBSSH2_SESSION * session,
|
||||
unsigned char *buf, uint32_t seqno,
|
||||
const unsigned char *packet,
|
||||
uint32_t packet_len,
|
||||
const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract)
|
||||
{
|
||||
unsigned char temp[SHA_DIGEST_LENGTH];
|
||||
|
||||
mac_method_hmac_sha1_hash(session, temp, seqno, packet, packet_len,
|
||||
addtl, addtl_len, abstract);
|
||||
memcpy(buf, (char *) temp, 96 / 8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_sha1_96 = {
|
||||
"hmac-sha1-96",
|
||||
12,
|
||||
20,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_sha1_96_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
|
||||
#if LIBSSH2_MD5
|
||||
/* mac_method_hmac_md5_hash
|
||||
* Calculate hash using full md5 value
|
||||
*/
|
||||
static int
|
||||
mac_method_hmac_md5_hash(LIBSSH2_SESSION * session, unsigned char *buf,
|
||||
uint32_t seqno,
|
||||
const unsigned char *packet,
|
||||
uint32_t packet_len,
|
||||
const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract)
|
||||
{
|
||||
libssh2_hmac_ctx ctx;
|
||||
unsigned char seqno_buf[4];
|
||||
(void) session;
|
||||
|
||||
_libssh2_htonu32(seqno_buf, seqno);
|
||||
|
||||
libssh2_hmac_md5_init(&ctx, *abstract, 16);
|
||||
libssh2_hmac_update(ctx, seqno_buf, 4);
|
||||
libssh2_hmac_update(ctx, packet, packet_len);
|
||||
if (addtl && addtl_len) {
|
||||
libssh2_hmac_update(ctx, addtl, addtl_len);
|
||||
}
|
||||
libssh2_hmac_final(ctx, buf);
|
||||
libssh2_hmac_cleanup(&ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_md5 = {
|
||||
"hmac-md5",
|
||||
16,
|
||||
16,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_md5_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
|
||||
/* mac_method_hmac_md5_96_hash
|
||||
* Calculate hash using first 96 bits of md5 value
|
||||
*/
|
||||
static int
|
||||
mac_method_hmac_md5_96_hash(LIBSSH2_SESSION * session,
|
||||
unsigned char *buf, uint32_t seqno,
|
||||
const unsigned char *packet,
|
||||
uint32_t packet_len,
|
||||
const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract)
|
||||
{
|
||||
unsigned char temp[MD5_DIGEST_LENGTH];
|
||||
mac_method_hmac_md5_hash(session, temp, seqno, packet, packet_len,
|
||||
addtl, addtl_len, abstract);
|
||||
memcpy(buf, (char *) temp, 96 / 8);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_md5_96 = {
|
||||
"hmac-md5-96",
|
||||
12,
|
||||
16,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_md5_96_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
#endif /* LIBSSH2_MD5 */
|
||||
|
||||
#if LIBSSH2_HMAC_RIPEMD
|
||||
/* mac_method_hmac_ripemd160_hash
|
||||
* Calculate hash using ripemd160 value
|
||||
*/
|
||||
static int
|
||||
mac_method_hmac_ripemd160_hash(LIBSSH2_SESSION * session,
|
||||
unsigned char *buf, uint32_t seqno,
|
||||
const unsigned char *packet,
|
||||
uint32_t packet_len,
|
||||
const unsigned char *addtl,
|
||||
uint32_t addtl_len,
|
||||
void **abstract)
|
||||
{
|
||||
libssh2_hmac_ctx ctx;
|
||||
unsigned char seqno_buf[4];
|
||||
(void) session;
|
||||
|
||||
_libssh2_htonu32(seqno_buf, seqno);
|
||||
|
||||
libssh2_hmac_ripemd160_init(&ctx, *abstract, 20);
|
||||
libssh2_hmac_update(ctx, seqno_buf, 4);
|
||||
libssh2_hmac_update(ctx, packet, packet_len);
|
||||
if (addtl && addtl_len) {
|
||||
libssh2_hmac_update(ctx, addtl, addtl_len);
|
||||
}
|
||||
libssh2_hmac_final(ctx, buf);
|
||||
libssh2_hmac_cleanup(&ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_ripemd160 = {
|
||||
"hmac-ripemd160",
|
||||
20,
|
||||
20,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_ripemd160_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
|
||||
static const LIBSSH2_MAC_METHOD mac_method_hmac_ripemd160_openssh_com = {
|
||||
"hmac-ripemd160@openssh.com",
|
||||
20,
|
||||
20,
|
||||
mac_method_common_init,
|
||||
mac_method_hmac_ripemd160_hash,
|
||||
mac_method_common_dtor,
|
||||
};
|
||||
#endif /* LIBSSH2_HMAC_RIPEMD */
|
||||
|
||||
static const LIBSSH2_MAC_METHOD *mac_methods[] = {
|
||||
&mac_method_hmac_sha1,
|
||||
&mac_method_hmac_sha1_96,
|
||||
#if LIBSSH2_MD5
|
||||
&mac_method_hmac_md5,
|
||||
&mac_method_hmac_md5_96,
|
||||
#endif
|
||||
#if LIBSSH2_HMAC_RIPEMD
|
||||
&mac_method_hmac_ripemd160,
|
||||
&mac_method_hmac_ripemd160_openssh_com,
|
||||
#endif /* LIBSSH2_HMAC_RIPEMD */
|
||||
#ifdef LIBSSH2_MAC_NONE
|
||||
&mac_method_none,
|
||||
#endif /* LIBSSH2_MAC_NONE */
|
||||
NULL
|
||||
};
|
||||
|
||||
const LIBSSH2_MAC_METHOD **
|
||||
_libssh2_mac_methods(void)
|
||||
{
|
||||
return mac_methods;
|
||||
}
|
||||
67
vendor/libssh2-1.4.2/src/mac.h
vendored
Normal file
67
vendor/libssh2-1.4.2/src/mac.h
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
#ifndef __LIBSSH2_MAC_H
|
||||
#define __LIBSSH2_MAC_H
|
||||
|
||||
/* Copyright (C) 2009-2010 by Daniel Stenberg
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
struct _LIBSSH2_MAC_METHOD
|
||||
{
|
||||
const char *name;
|
||||
|
||||
/* The length of a given MAC packet */
|
||||
int mac_len;
|
||||
|
||||
/* integrity key length */
|
||||
int key_len;
|
||||
|
||||
/* Message Authentication Code Hashing algo */
|
||||
int (*init) (LIBSSH2_SESSION * session, unsigned char *key, int *free_key,
|
||||
void **abstract);
|
||||
int (*hash) (LIBSSH2_SESSION * session, unsigned char *buf,
|
||||
uint32_t seqno, const unsigned char *packet,
|
||||
uint32_t packet_len, const unsigned char *addtl,
|
||||
uint32_t addtl_len, void **abstract);
|
||||
int (*dtor) (LIBSSH2_SESSION * session, void **abstract);
|
||||
};
|
||||
|
||||
typedef struct _LIBSSH2_MAC_METHOD LIBSSH2_MAC_METHOD;
|
||||
|
||||
const LIBSSH2_MAC_METHOD **_libssh2_mac_methods(void);
|
||||
|
||||
#endif /* __LIBSSH2_MAC_H */
|
||||
612
vendor/libssh2-1.4.2/src/misc.c
vendored
Normal file
612
vendor/libssh2-1.4.2/src/misc.c
vendored
Normal file
|
|
@ -0,0 +1,612 @@
|
|||
/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2009-2010 by Daniel Stenberg
|
||||
* Copyright (c) 2010 Simon Josefsson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "misc.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int _libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg)
|
||||
{
|
||||
session->err_msg = errmsg;
|
||||
session->err_code = errcode;
|
||||
#ifdef LIBSSH2DEBUG
|
||||
if((errcode == LIBSSH2_ERROR_EAGAIN) && !session->api_block_mode)
|
||||
/* if this is EAGAIN and we're in non-blocking mode, don't generate
|
||||
a debug output for this */
|
||||
return errcode;
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_ERROR, "%d - %s", session->err_code,
|
||||
session->err_msg);
|
||||
#endif
|
||||
|
||||
return errcode;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
static int wsa2errno(void)
|
||||
{
|
||||
switch (WSAGetLastError()) {
|
||||
case WSAEWOULDBLOCK:
|
||||
return EAGAIN;
|
||||
|
||||
case WSAENOTSOCK:
|
||||
return EBADF;
|
||||
|
||||
case WSAEINTR:
|
||||
return EINTR;
|
||||
|
||||
default:
|
||||
/* It is most important to ensure errno does not stay at EAGAIN
|
||||
* when a different error occurs so just set errno to a generic
|
||||
* error */
|
||||
return EIO;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* _libssh2_recv
|
||||
*
|
||||
* Replacement for the standard recv, return -errno on failure.
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_recv(libssh2_socket_t sock, void *buffer, size_t length, int flags, void **abstract)
|
||||
{
|
||||
ssize_t rc = recv(sock, buffer, length, flags);
|
||||
#ifdef WIN32
|
||||
if (rc < 0 )
|
||||
return -wsa2errno();
|
||||
#elif defined(__VMS)
|
||||
if (rc < 0 ){
|
||||
if ( errno == EWOULDBLOCK )
|
||||
return -EAGAIN;
|
||||
else
|
||||
return -errno;
|
||||
}
|
||||
#else
|
||||
if (rc < 0 ){
|
||||
/* Sometimes the first recv() function call sets errno to ENOENT on
|
||||
Solaris and HP-UX */
|
||||
if ( errno == ENOENT )
|
||||
return -EAGAIN;
|
||||
else
|
||||
return -errno;
|
||||
}
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* _libssh2_send
|
||||
*
|
||||
* Replacement for the standard send, return -errno on failure.
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_send(libssh2_socket_t sock, const void *buffer, size_t length,
|
||||
int flags, void **abstract)
|
||||
{
|
||||
ssize_t rc = send(sock, buffer, length, flags);
|
||||
#ifdef WIN32
|
||||
if (rc < 0 )
|
||||
return -wsa2errno();
|
||||
#elif defined(__VMS)
|
||||
if (rc < 0 ) {
|
||||
if ( errno == EWOULDBLOCK )
|
||||
return -EAGAIN;
|
||||
else
|
||||
return -errno;
|
||||
}
|
||||
#else
|
||||
if (rc < 0 )
|
||||
return -errno;
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* libssh2_ntohu32
|
||||
*/
|
||||
unsigned int
|
||||
_libssh2_ntohu32(const unsigned char *buf)
|
||||
{
|
||||
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
||||
}
|
||||
|
||||
|
||||
/* _libssh2_ntohu64
|
||||
*/
|
||||
libssh2_uint64_t
|
||||
_libssh2_ntohu64(const unsigned char *buf)
|
||||
{
|
||||
unsigned long msl, lsl;
|
||||
|
||||
msl = ((libssh2_uint64_t)buf[0] << 24) | ((libssh2_uint64_t)buf[1] << 16)
|
||||
| ((libssh2_uint64_t)buf[2] << 8) | (libssh2_uint64_t)buf[3];
|
||||
lsl = ((libssh2_uint64_t)buf[4] << 24) | ((libssh2_uint64_t)buf[5] << 16)
|
||||
| ((libssh2_uint64_t)buf[6] << 8) | (libssh2_uint64_t)buf[7];
|
||||
|
||||
return ((libssh2_uint64_t)msl <<32) | lsl;
|
||||
}
|
||||
|
||||
/* _libssh2_htonu32
|
||||
*/
|
||||
void
|
||||
_libssh2_htonu32(unsigned char *buf, uint32_t value)
|
||||
{
|
||||
buf[0] = (value >> 24) & 0xFF;
|
||||
buf[1] = (value >> 16) & 0xFF;
|
||||
buf[2] = (value >> 8) & 0xFF;
|
||||
buf[3] = value & 0xFF;
|
||||
}
|
||||
|
||||
/* _libssh2_store_u32
|
||||
*/
|
||||
void _libssh2_store_u32(unsigned char **buf, uint32_t value)
|
||||
{
|
||||
_libssh2_htonu32(*buf, value);
|
||||
*buf += sizeof(uint32_t);
|
||||
}
|
||||
|
||||
/* _libssh2_store_str
|
||||
*/
|
||||
void _libssh2_store_str(unsigned char **buf, const char *str, size_t len)
|
||||
{
|
||||
_libssh2_store_u32(buf, (uint32_t)len);
|
||||
if(len) {
|
||||
memcpy(*buf, str, len);
|
||||
*buf += len;
|
||||
}
|
||||
}
|
||||
|
||||
/* Base64 Conversion */
|
||||
|
||||
static const char base64_table[] =
|
||||
{
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
|
||||
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
|
||||
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '\0'
|
||||
};
|
||||
|
||||
static const char base64_pad = '=';
|
||||
|
||||
static const short base64_reverse_table[256] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
||||
};
|
||||
|
||||
/* libssh2_base64_decode
|
||||
*
|
||||
* Decode a base64 chunk and store it into a newly alloc'd buffer
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_base64_decode(LIBSSH2_SESSION *session, char **data,
|
||||
unsigned int *datalen, const char *src,
|
||||
unsigned int src_len)
|
||||
{
|
||||
unsigned char *s, *d;
|
||||
short v;
|
||||
int i = 0, len = 0;
|
||||
|
||||
*data = LIBSSH2_ALLOC(session, (3 * src_len / 4) + 1);
|
||||
d = (unsigned char *) *data;
|
||||
if (!d) {
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for base64 decoding");
|
||||
}
|
||||
|
||||
for(s = (unsigned char *) src; ((char *) s) < (src + src_len); s++) {
|
||||
if ((v = base64_reverse_table[*s]) < 0)
|
||||
continue;
|
||||
switch (i % 4) {
|
||||
case 0:
|
||||
d[len] = v << 2;
|
||||
break;
|
||||
case 1:
|
||||
d[len++] |= v >> 4;
|
||||
d[len] = v << 4;
|
||||
break;
|
||||
case 2:
|
||||
d[len++] |= v >> 2;
|
||||
d[len] = v << 6;
|
||||
break;
|
||||
case 3:
|
||||
d[len++] |= v;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ((i % 4) == 1) {
|
||||
/* Invalid -- We have a byte which belongs exclusively to a partial
|
||||
octet */
|
||||
LIBSSH2_FREE(session, *data);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_INVAL, "Invalid base64");
|
||||
}
|
||||
|
||||
*datalen = len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ---- Base64 Encoding/Decoding Table --- */
|
||||
static const char table64[]=
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
/*
|
||||
* _libssh2_base64_encode()
|
||||
*
|
||||
* Returns the length of the newly created base64 string. The third argument
|
||||
* is a pointer to an allocated area holding the base64 data. If something
|
||||
* went wrong, 0 is returned.
|
||||
*
|
||||
*/
|
||||
size_t _libssh2_base64_encode(LIBSSH2_SESSION *session,
|
||||
const char *inp, size_t insize, char **outptr)
|
||||
{
|
||||
unsigned char ibuf[3];
|
||||
unsigned char obuf[4];
|
||||
int i;
|
||||
int inputparts;
|
||||
char *output;
|
||||
char *base64data;
|
||||
const char *indata = inp;
|
||||
|
||||
*outptr = NULL; /* set to NULL in case of failure before we reach the end */
|
||||
|
||||
if(0 == insize)
|
||||
insize = strlen(indata);
|
||||
|
||||
base64data = output = LIBSSH2_ALLOC(session, insize*4/3+4);
|
||||
if(NULL == output)
|
||||
return 0;
|
||||
|
||||
while(insize > 0) {
|
||||
for (i = inputparts = 0; i < 3; i++) {
|
||||
if(insize > 0) {
|
||||
inputparts++;
|
||||
ibuf[i] = *indata;
|
||||
indata++;
|
||||
insize--;
|
||||
}
|
||||
else
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
|
||||
obuf[0] = (unsigned char) ((ibuf[0] & 0xFC) >> 2);
|
||||
obuf[1] = (unsigned char) (((ibuf[0] & 0x03) << 4) | \
|
||||
((ibuf[1] & 0xF0) >> 4));
|
||||
obuf[2] = (unsigned char) (((ibuf[1] & 0x0F) << 2) | \
|
||||
((ibuf[2] & 0xC0) >> 6));
|
||||
obuf[3] = (unsigned char) (ibuf[2] & 0x3F);
|
||||
|
||||
switch(inputparts) {
|
||||
case 1: /* only one byte read */
|
||||
snprintf(output, 5, "%c%c==",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]]);
|
||||
break;
|
||||
case 2: /* two bytes read */
|
||||
snprintf(output, 5, "%c%c%c=",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]],
|
||||
table64[obuf[2]]);
|
||||
break;
|
||||
default:
|
||||
snprintf(output, 5, "%c%c%c%c",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]],
|
||||
table64[obuf[2]],
|
||||
table64[obuf[3]] );
|
||||
break;
|
||||
}
|
||||
output += 4;
|
||||
}
|
||||
*output=0;
|
||||
*outptr = base64data; /* make it return the actual data memory */
|
||||
|
||||
return strlen(base64data); /* return the length of the new data */
|
||||
}
|
||||
/* ---- End of Base64 Encoding ---- */
|
||||
|
||||
LIBSSH2_API void
|
||||
libssh2_free(LIBSSH2_SESSION *session, void *ptr)
|
||||
{
|
||||
LIBSSH2_FREE(session, ptr);
|
||||
}
|
||||
|
||||
#ifdef LIBSSH2DEBUG
|
||||
LIBSSH2_API int
|
||||
libssh2_trace(LIBSSH2_SESSION * session, int bitmask)
|
||||
{
|
||||
session->showmask = bitmask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context,
|
||||
libssh2_trace_handler_func callback)
|
||||
{
|
||||
session->tracehandler = callback;
|
||||
session->tracehandler_context = handler_context;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
_libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...)
|
||||
{
|
||||
char buffer[1536];
|
||||
int len, msglen, buflen = sizeof(buffer);
|
||||
va_list vargs;
|
||||
struct timeval now;
|
||||
static int firstsec;
|
||||
static const char *const contexts[] = {
|
||||
"Unknown",
|
||||
"Transport",
|
||||
"Key Ex",
|
||||
"Userauth",
|
||||
"Conn",
|
||||
"SCP",
|
||||
"SFTP",
|
||||
"Failure Event",
|
||||
"Publickey",
|
||||
"Socket",
|
||||
};
|
||||
const char* contexttext = contexts[0];
|
||||
unsigned int contextindex;
|
||||
|
||||
if (!(session->showmask & context)) {
|
||||
/* no such output asked for */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Find the first matching context string for this message */
|
||||
for (contextindex = 0; contextindex < ARRAY_SIZE(contexts);
|
||||
contextindex++) {
|
||||
if ((context & (1 << contextindex)) != 0) {
|
||||
contexttext = contexts[contextindex];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_libssh2_gettimeofday(&now, NULL);
|
||||
if(!firstsec) {
|
||||
firstsec = now.tv_sec;
|
||||
}
|
||||
now.tv_sec -= firstsec;
|
||||
|
||||
len = snprintf(buffer, buflen, "[libssh2] %d.%06d %s: ",
|
||||
(int)now.tv_sec, (int)now.tv_usec, contexttext);
|
||||
|
||||
if (len >= buflen)
|
||||
msglen = buflen - 1;
|
||||
else {
|
||||
buflen -= len;
|
||||
msglen = len;
|
||||
va_start(vargs, format);
|
||||
len = vsnprintf(buffer + msglen, buflen, format, vargs);
|
||||
va_end(vargs);
|
||||
msglen += len < buflen ? len : buflen - 1;
|
||||
}
|
||||
|
||||
if (session->tracehandler)
|
||||
(session->tracehandler)(session, session->tracehandler_context, buffer,
|
||||
msglen);
|
||||
else
|
||||
fprintf(stderr, "%s\n", buffer);
|
||||
}
|
||||
|
||||
#else
|
||||
LIBSSH2_API int
|
||||
libssh2_trace(LIBSSH2_SESSION * session, int bitmask)
|
||||
{
|
||||
(void) session;
|
||||
(void) bitmask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context,
|
||||
libssh2_trace_handler_func callback)
|
||||
{
|
||||
(void) session;
|
||||
(void) handler_context;
|
||||
(void) callback;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* init the list head */
|
||||
void _libssh2_list_init(struct list_head *head)
|
||||
{
|
||||
head->first = head->last = NULL;
|
||||
}
|
||||
|
||||
/* add a node to the list */
|
||||
void _libssh2_list_add(struct list_head *head,
|
||||
struct list_node *entry)
|
||||
{
|
||||
/* store a pointer to the head */
|
||||
entry->head = head;
|
||||
|
||||
/* we add this entry at the "top" so it has no next */
|
||||
entry->next = NULL;
|
||||
|
||||
/* make our prev point to what the head thinks is last */
|
||||
entry->prev = head->last;
|
||||
|
||||
/* and make head's last be us now */
|
||||
head->last = entry;
|
||||
|
||||
/* make sure our 'prev' node points to us next */
|
||||
if(entry->prev)
|
||||
entry->prev->next = entry;
|
||||
else
|
||||
head->first = entry;
|
||||
}
|
||||
|
||||
/* return the "first" node in the list this head points to */
|
||||
void *_libssh2_list_first(struct list_head *head)
|
||||
{
|
||||
return head->first;
|
||||
}
|
||||
|
||||
/* return the next node in the list */
|
||||
void *_libssh2_list_next(struct list_node *node)
|
||||
{
|
||||
return node->next;
|
||||
}
|
||||
|
||||
/* return the prev node in the list */
|
||||
void *_libssh2_list_prev(struct list_node *node)
|
||||
{
|
||||
return node->prev;
|
||||
}
|
||||
|
||||
/* remove this node from the list */
|
||||
void _libssh2_list_remove(struct list_node *entry)
|
||||
{
|
||||
if(entry->prev)
|
||||
entry->prev->next = entry->next;
|
||||
else
|
||||
entry->head->first = entry->next;
|
||||
|
||||
if(entry->next)
|
||||
entry->next->prev = entry->prev;
|
||||
else
|
||||
entry->head->last = entry->prev;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* insert a node before the given 'after' entry */
|
||||
void _libssh2_list_insert(struct list_node *after, /* insert before this */
|
||||
struct list_node *entry)
|
||||
{
|
||||
/* 'after' is next to 'entry' */
|
||||
bentry->next = after;
|
||||
|
||||
/* entry's prev is then made to be the prev after current has */
|
||||
entry->prev = after->prev;
|
||||
|
||||
/* the node that is now before 'entry' was previously before 'after'
|
||||
and must be made to point to 'entry' correctly */
|
||||
if(entry->prev)
|
||||
entry->prev->next = entry;
|
||||
else
|
||||
/* there was no node before this, so we make sure we point the head
|
||||
pointer to this node */
|
||||
after->head->first = entry;
|
||||
|
||||
/* after's prev entry points back to entry */
|
||||
after->prev = entry;
|
||||
|
||||
/* after's next entry is still the same as before */
|
||||
|
||||
/* entry's head is the same as after's */
|
||||
entry->head = after->head;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* this define is defined in misc.h for the correct platforms */
|
||||
#ifdef LIBSSH2_GETTIMEOFDAY_WIN32
|
||||
/*
|
||||
* gettimeofday
|
||||
* Implementation according to:
|
||||
* The Open Group Base Specifications Issue 6
|
||||
* IEEE Std 1003.1, 2004 Edition
|
||||
*/
|
||||
|
||||
/*
|
||||
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||
*
|
||||
* This source code is offered for use in the public domain. You may
|
||||
* use, modify or distribute it freely.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful but
|
||||
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||
* DISCLAIMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Contributed by:
|
||||
* Danny Smith <dannysmith@users.sourceforge.net>
|
||||
*/
|
||||
|
||||
/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
|
||||
#define _W32_FT_OFFSET (116444736000000000)
|
||||
|
||||
int __cdecl _libssh2_gettimeofday(struct timeval *tp, void *tzp)
|
||||
{
|
||||
union {
|
||||
unsigned __int64 ns100; /*time since 1 Jan 1601 in 100ns units */
|
||||
FILETIME ft;
|
||||
} _now;
|
||||
|
||||
if(tp)
|
||||
{
|
||||
GetSystemTimeAsFileTime (&_now.ft);
|
||||
tp->tv_usec=(long)((_now.ns100 / 10) % 1000000 );
|
||||
tp->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000);
|
||||
}
|
||||
/* Always return 0 as per Open Group Base Specifications Issue 6.
|
||||
Do not set errno on error. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
94
vendor/libssh2-1.4.2/src/misc.h
vendored
Normal file
94
vendor/libssh2-1.4.2/src/misc.h
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
#ifndef __LIBSSH2_MISC_H
|
||||
#define __LIBSSH2_MISC_H
|
||||
/* Copyright (c) 2009-2011 by Daniel Stenberg
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
struct list_head {
|
||||
struct list_node *last;
|
||||
struct list_node *first;
|
||||
};
|
||||
|
||||
struct list_node {
|
||||
struct list_node *next;
|
||||
struct list_node *prev;
|
||||
struct list_head *head;
|
||||
};
|
||||
|
||||
int _libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg);
|
||||
|
||||
void _libssh2_list_init(struct list_head *head);
|
||||
|
||||
/* add a node last in the list */
|
||||
void _libssh2_list_add(struct list_head *head,
|
||||
struct list_node *entry);
|
||||
|
||||
/* return the "first" node in the list this head points to */
|
||||
void *_libssh2_list_first(struct list_head *head);
|
||||
|
||||
/* return the next node in the list */
|
||||
void *_libssh2_list_next(struct list_node *node);
|
||||
|
||||
/* return the prev node in the list */
|
||||
void *_libssh2_list_prev(struct list_node *node);
|
||||
|
||||
/* remove this node from the list */
|
||||
void _libssh2_list_remove(struct list_node *entry);
|
||||
|
||||
size_t _libssh2_base64_encode(struct _LIBSSH2_SESSION *session,
|
||||
const char *inp, size_t insize, char **outptr);
|
||||
|
||||
unsigned int _libssh2_ntohu32(const unsigned char *buf);
|
||||
libssh2_uint64_t _libssh2_ntohu64(const unsigned char *buf);
|
||||
void _libssh2_htonu32(unsigned char *buf, uint32_t val);
|
||||
void _libssh2_store_u32(unsigned char **buf, uint32_t value);
|
||||
void _libssh2_store_str(unsigned char **buf, const char *str, size_t len);
|
||||
|
||||
#if defined(LIBSSH2_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
||||
/* provide a private one */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
int __cdecl _libssh2_gettimeofday(struct timeval *tp, void *tzp);
|
||||
#define HAVE_LIBSSH2_GETTIMEOFDAY
|
||||
#define LIBSSH2_GETTIMEOFDAY_WIN32 /* enable the win32 implementation */
|
||||
#else
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#define _libssh2_gettimeofday(x,y) gettimeofday(x,y)
|
||||
#define HAVE_LIBSSH2_GETTIMEOFDAY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _LIBSSH2_MISC_H */
|
||||
804
vendor/libssh2-1.4.2/src/openssl.c
vendored
Normal file
804
vendor/libssh2-1.4.2/src/openssl.c
vendored
Normal file
|
|
@ -0,0 +1,804 @@
|
|||
/* Copyright (C) 2009, 2010 Simon Josefsson
|
||||
* Copyright (C) 2006, 2007 The Written Word, Inc. All rights reserved.
|
||||
* Copyright (c) 2004-2006, Sara Golemon <sarag@libssh2.org>
|
||||
*
|
||||
* Author: Simon Josefsson
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
#ifndef LIBSSH2_LIBGCRYPT /* compile only if we build with OpenSSL */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef EVP_MAX_BLOCK_LENGTH
|
||||
#define EVP_MAX_BLOCK_LENGTH 32
|
||||
#endif
|
||||
|
||||
int
|
||||
_libssh2_rsa_new(libssh2_rsa_ctx ** rsa,
|
||||
const unsigned char *edata,
|
||||
unsigned long elen,
|
||||
const unsigned char *ndata,
|
||||
unsigned long nlen,
|
||||
const unsigned char *ddata,
|
||||
unsigned long dlen,
|
||||
const unsigned char *pdata,
|
||||
unsigned long plen,
|
||||
const unsigned char *qdata,
|
||||
unsigned long qlen,
|
||||
const unsigned char *e1data,
|
||||
unsigned long e1len,
|
||||
const unsigned char *e2data,
|
||||
unsigned long e2len,
|
||||
const unsigned char *coeffdata, unsigned long coefflen)
|
||||
{
|
||||
*rsa = RSA_new();
|
||||
|
||||
(*rsa)->e = BN_new();
|
||||
BN_bin2bn(edata, elen, (*rsa)->e);
|
||||
|
||||
(*rsa)->n = BN_new();
|
||||
BN_bin2bn(ndata, nlen, (*rsa)->n);
|
||||
|
||||
if (ddata) {
|
||||
(*rsa)->d = BN_new();
|
||||
BN_bin2bn(ddata, dlen, (*rsa)->d);
|
||||
|
||||
(*rsa)->p = BN_new();
|
||||
BN_bin2bn(pdata, plen, (*rsa)->p);
|
||||
|
||||
(*rsa)->q = BN_new();
|
||||
BN_bin2bn(qdata, qlen, (*rsa)->q);
|
||||
|
||||
(*rsa)->dmp1 = BN_new();
|
||||
BN_bin2bn(e1data, e1len, (*rsa)->dmp1);
|
||||
|
||||
(*rsa)->dmq1 = BN_new();
|
||||
BN_bin2bn(e2data, e2len, (*rsa)->dmq1);
|
||||
|
||||
(*rsa)->iqmp = BN_new();
|
||||
BN_bin2bn(coeffdata, coefflen, (*rsa)->iqmp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsactx,
|
||||
const unsigned char *sig,
|
||||
unsigned long sig_len,
|
||||
const unsigned char *m, unsigned long m_len)
|
||||
{
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
int ret;
|
||||
|
||||
libssh2_sha1(m, m_len, hash);
|
||||
ret = RSA_verify(NID_sha1, hash, SHA_DIGEST_LENGTH,
|
||||
(unsigned char *) sig, sig_len, rsactx);
|
||||
return (ret == 1) ? 0 : -1;
|
||||
}
|
||||
|
||||
#if LIBSSH2_DSA
|
||||
int
|
||||
_libssh2_dsa_new(libssh2_dsa_ctx ** dsactx,
|
||||
const unsigned char *p,
|
||||
unsigned long p_len,
|
||||
const unsigned char *q,
|
||||
unsigned long q_len,
|
||||
const unsigned char *g,
|
||||
unsigned long g_len,
|
||||
const unsigned char *y,
|
||||
unsigned long y_len,
|
||||
const unsigned char *x, unsigned long x_len)
|
||||
{
|
||||
*dsactx = DSA_new();
|
||||
|
||||
(*dsactx)->p = BN_new();
|
||||
BN_bin2bn(p, p_len, (*dsactx)->p);
|
||||
|
||||
(*dsactx)->q = BN_new();
|
||||
BN_bin2bn(q, q_len, (*dsactx)->q);
|
||||
|
||||
(*dsactx)->g = BN_new();
|
||||
BN_bin2bn(g, g_len, (*dsactx)->g);
|
||||
|
||||
(*dsactx)->pub_key = BN_new();
|
||||
BN_bin2bn(y, y_len, (*dsactx)->pub_key);
|
||||
|
||||
if (x_len) {
|
||||
(*dsactx)->priv_key = BN_new();
|
||||
BN_bin2bn(x, x_len, (*dsactx)->priv_key);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_dsa_sha1_verify(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *sig,
|
||||
const unsigned char *m, unsigned long m_len)
|
||||
{
|
||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||
DSA_SIG dsasig;
|
||||
int ret;
|
||||
|
||||
dsasig.r = BN_new();
|
||||
BN_bin2bn(sig, 20, dsasig.r);
|
||||
dsasig.s = BN_new();
|
||||
BN_bin2bn(sig + 20, 20, dsasig.s);
|
||||
|
||||
libssh2_sha1(m, m_len, hash);
|
||||
ret = DSA_do_verify(hash, SHA_DIGEST_LENGTH, &dsasig, dsactx);
|
||||
BN_clear_free(dsasig.s);
|
||||
BN_clear_free(dsasig.r);
|
||||
|
||||
return (ret == 1) ? 0 : -1;
|
||||
}
|
||||
#endif /* LIBSSH_DSA */
|
||||
|
||||
int
|
||||
_libssh2_cipher_init(_libssh2_cipher_ctx * h,
|
||||
_libssh2_cipher_type(algo),
|
||||
unsigned char *iv, unsigned char *secret, int encrypt)
|
||||
{
|
||||
EVP_CIPHER_CTX_init(h);
|
||||
EVP_CipherInit(h, algo(), secret, iv, encrypt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx,
|
||||
_libssh2_cipher_type(algo),
|
||||
int encrypt, unsigned char *block)
|
||||
{
|
||||
int blocksize = ctx->cipher->block_size;
|
||||
unsigned char buf[EVP_MAX_BLOCK_LENGTH];
|
||||
int ret;
|
||||
(void) algo;
|
||||
(void) encrypt;
|
||||
|
||||
if (blocksize == 1) {
|
||||
/* Hack for arcfour. */
|
||||
blocksize = 8;
|
||||
}
|
||||
ret = EVP_Cipher(ctx, buf, block, blocksize);
|
||||
if (ret == 1) {
|
||||
memcpy(block, buf, blocksize);
|
||||
}
|
||||
return ret == 1 ? 0 : 1;
|
||||
}
|
||||
|
||||
#if LIBSSH2_AES_CTR
|
||||
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AES_KEY key;
|
||||
EVP_CIPHER_CTX *aes_ctx;
|
||||
unsigned char ctr[AES_BLOCK_SIZE];
|
||||
} aes_ctr_ctx;
|
||||
|
||||
static int
|
||||
aes_ctr_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc) /* init key */
|
||||
{
|
||||
/*
|
||||
* variable "c" is leaked from this scope, but is later freed
|
||||
* in aes_ctr_cleanup
|
||||
*/
|
||||
aes_ctr_ctx *c = malloc(sizeof(*c));
|
||||
const EVP_CIPHER *aes_cipher;
|
||||
(void) enc;
|
||||
|
||||
if (c == NULL)
|
||||
return 0;
|
||||
|
||||
switch (ctx->key_len) {
|
||||
case 16:
|
||||
aes_cipher = EVP_aes_128_ecb();
|
||||
break;
|
||||
case 24:
|
||||
aes_cipher = EVP_aes_192_ecb();
|
||||
break;
|
||||
case 32:
|
||||
aes_cipher = EVP_aes_256_ecb();
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
c->aes_ctx = malloc(sizeof(EVP_CIPHER_CTX));
|
||||
if (c->aes_ctx == NULL)
|
||||
return 0;
|
||||
|
||||
if (EVP_EncryptInit(c->aes_ctx, aes_cipher, key, NULL) != 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
EVP_CIPHER_CTX_set_padding(c->aes_ctx, 0);
|
||||
|
||||
memcpy(c->ctr, iv, AES_BLOCK_SIZE);
|
||||
|
||||
EVP_CIPHER_CTX_set_app_data(ctx, c);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
aes_ctr_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in,
|
||||
size_t inl) /* encrypt/decrypt data */
|
||||
{
|
||||
aes_ctr_ctx *c = EVP_CIPHER_CTX_get_app_data(ctx);
|
||||
unsigned char b1[AES_BLOCK_SIZE];
|
||||
size_t i = 0;
|
||||
int outlen = 0;
|
||||
|
||||
if (inl != 16) /* libssh2 only ever encrypt one block */
|
||||
return 0;
|
||||
|
||||
if (c == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
To encrypt a packet P=P1||P2||...||Pn (where P1, P2, ..., Pn are each
|
||||
blocks of length L), the encryptor first encrypts <X> with <cipher>
|
||||
to obtain a block B1. The block B1 is then XORed with P1 to generate
|
||||
the ciphertext block C1. The counter X is then incremented
|
||||
*/
|
||||
|
||||
if (EVP_EncryptUpdate(c->aes_ctx, b1, &outlen, c->ctr, AES_BLOCK_SIZE) != 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
*out++ = *in++ ^ b1[i];
|
||||
|
||||
i = 15;
|
||||
while (c->ctr[i]++ == 0xFF) {
|
||||
if (i == 0)
|
||||
break;
|
||||
i--;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
aes_ctr_cleanup(EVP_CIPHER_CTX *ctx) /* cleanup ctx */
|
||||
{
|
||||
aes_ctr_ctx *c = EVP_CIPHER_CTX_get_app_data(ctx);
|
||||
|
||||
if (c == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c->aes_ctx != NULL) {
|
||||
_libssh2_cipher_dtor(c->aes_ctx);
|
||||
free(c->aes_ctx);
|
||||
}
|
||||
|
||||
free(c);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const EVP_CIPHER *
|
||||
make_ctr_evp (size_t keylen, EVP_CIPHER *aes_ctr_cipher)
|
||||
{
|
||||
aes_ctr_cipher->block_size = 16;
|
||||
aes_ctr_cipher->key_len = keylen;
|
||||
aes_ctr_cipher->iv_len = 16;
|
||||
aes_ctr_cipher->init = aes_ctr_init;
|
||||
aes_ctr_cipher->do_cipher = aes_ctr_do_cipher;
|
||||
aes_ctr_cipher->cleanup = aes_ctr_cleanup;
|
||||
|
||||
return aes_ctr_cipher;
|
||||
}
|
||||
|
||||
const EVP_CIPHER *
|
||||
_libssh2_EVP_aes_128_ctr(void)
|
||||
{
|
||||
static EVP_CIPHER aes_ctr_cipher;
|
||||
return !aes_ctr_cipher.key_len?
|
||||
make_ctr_evp (16, &aes_ctr_cipher) : &aes_ctr_cipher;
|
||||
}
|
||||
|
||||
const EVP_CIPHER *
|
||||
_libssh2_EVP_aes_192_ctr(void)
|
||||
{
|
||||
static EVP_CIPHER aes_ctr_cipher;
|
||||
return !aes_ctr_cipher.key_len?
|
||||
make_ctr_evp (24, &aes_ctr_cipher) : &aes_ctr_cipher;
|
||||
}
|
||||
|
||||
const EVP_CIPHER *
|
||||
_libssh2_EVP_aes_256_ctr(void)
|
||||
{
|
||||
static EVP_CIPHER aes_ctr_cipher;
|
||||
return !aes_ctr_cipher.key_len?
|
||||
make_ctr_evp (32, &aes_ctr_cipher) : &aes_ctr_cipher;
|
||||
}
|
||||
|
||||
void _libssh2_init_aes_ctr(void)
|
||||
{
|
||||
_libssh2_EVP_aes_128_ctr();
|
||||
_libssh2_EVP_aes_192_ctr();
|
||||
_libssh2_EVP_aes_256_ctr();
|
||||
}
|
||||
|
||||
#else
|
||||
void _libssh2_init_aes_ctr(void) {}
|
||||
#endif /* LIBSSH2_AES_CTR */
|
||||
|
||||
/* TODO: Optionally call a passphrase callback specified by the
|
||||
* calling program
|
||||
*/
|
||||
static int
|
||||
passphrase_cb(char *buf, int size, int rwflag, char *passphrase)
|
||||
{
|
||||
int passphrase_len = strlen(passphrase);
|
||||
(void) rwflag;
|
||||
|
||||
if (passphrase_len > (size - 1)) {
|
||||
passphrase_len = size - 1;
|
||||
}
|
||||
memcpy(buf, passphrase, passphrase_len);
|
||||
buf[passphrase_len] = '\0';
|
||||
|
||||
return passphrase_len;
|
||||
}
|
||||
|
||||
typedef void * (*pem_read_bio_func)(BIO *, void **, pem_password_cb *,
|
||||
void * u);
|
||||
|
||||
static int
|
||||
read_private_key_from_file(void ** key_ctx,
|
||||
pem_read_bio_func read_private_key,
|
||||
const char * filename,
|
||||
unsigned const char *passphrase)
|
||||
{
|
||||
BIO * bp;
|
||||
|
||||
*key_ctx = NULL;
|
||||
|
||||
bp = BIO_new_file(filename, "r");
|
||||
if (!bp) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*key_ctx = read_private_key(bp, NULL, (pem_password_cb *) passphrase_cb,
|
||||
(void *) passphrase);
|
||||
|
||||
BIO_free(bp);
|
||||
return (*key_ctx) ? 0 : -1;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename, unsigned const char *passphrase)
|
||||
{
|
||||
pem_read_bio_func read_rsa =
|
||||
(pem_read_bio_func) &PEM_read_bio_RSAPrivateKey;
|
||||
(void) session;
|
||||
|
||||
_libssh2_init_if_needed ();
|
||||
|
||||
return read_private_key_from_file((void **) rsa, read_rsa,
|
||||
filename, passphrase);
|
||||
}
|
||||
|
||||
#if LIBSSH2_DSA
|
||||
int
|
||||
_libssh2_dsa_new_private(libssh2_dsa_ctx ** dsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filename, unsigned const char *passphrase)
|
||||
{
|
||||
pem_read_bio_func read_dsa =
|
||||
(pem_read_bio_func) &PEM_read_bio_DSAPrivateKey;
|
||||
(void) session;
|
||||
|
||||
_libssh2_init_if_needed ();
|
||||
|
||||
return read_private_key_from_file((void **) dsa, read_dsa,
|
||||
filename, passphrase);
|
||||
}
|
||||
#endif /* LIBSSH_DSA */
|
||||
|
||||
int
|
||||
_libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
||||
libssh2_rsa_ctx * rsactx,
|
||||
const unsigned char *hash,
|
||||
size_t hash_len,
|
||||
unsigned char **signature, size_t *signature_len)
|
||||
{
|
||||
int ret;
|
||||
unsigned char *sig;
|
||||
unsigned int sig_len;
|
||||
|
||||
sig_len = RSA_size(rsactx);
|
||||
sig = LIBSSH2_ALLOC(session, sig_len);
|
||||
|
||||
if (!sig) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = RSA_sign(NID_sha1, hash, hash_len, sig, &sig_len, rsactx);
|
||||
|
||||
if (!ret) {
|
||||
LIBSSH2_FREE(session, sig);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*signature = sig;
|
||||
*signature_len = sig_len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LIBSSH2_DSA
|
||||
int
|
||||
_libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *hash,
|
||||
unsigned long hash_len, unsigned char *signature)
|
||||
{
|
||||
DSA_SIG *sig;
|
||||
int r_len, s_len;
|
||||
(void) hash_len;
|
||||
|
||||
sig = DSA_do_sign(hash, SHA_DIGEST_LENGTH, dsactx);
|
||||
if (!sig) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
r_len = BN_num_bytes(sig->r);
|
||||
if (r_len < 1 || r_len > 20) {
|
||||
DSA_SIG_free(sig);
|
||||
return -1;
|
||||
}
|
||||
s_len = BN_num_bytes(sig->s);
|
||||
if (s_len < 1 || s_len > 20) {
|
||||
DSA_SIG_free(sig);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(signature, 0, 40);
|
||||
|
||||
BN_bn2bin(sig->r, signature + (20 - r_len));
|
||||
BN_bn2bin(sig->s, signature + 20 + (20 - s_len));
|
||||
|
||||
DSA_SIG_free(sig);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* LIBSSH_DSA */
|
||||
|
||||
void
|
||||
libssh2_sha1(const unsigned char *message, unsigned long len,
|
||||
unsigned char *out)
|
||||
{
|
||||
EVP_MD_CTX ctx;
|
||||
|
||||
EVP_DigestInit(&ctx, EVP_get_digestbyname("sha1"));
|
||||
EVP_DigestUpdate(&ctx, message, len);
|
||||
EVP_DigestFinal(&ctx, out, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
libssh2_md5(const unsigned char *message, unsigned long len,
|
||||
unsigned char *out)
|
||||
{
|
||||
EVP_MD_CTX ctx;
|
||||
|
||||
EVP_DigestInit(&ctx, EVP_get_digestbyname("md5"));
|
||||
EVP_DigestUpdate(&ctx, message, len);
|
||||
EVP_DigestFinal(&ctx, out, NULL);
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
write_bn(unsigned char *buf, const BIGNUM *bn, int bn_bytes)
|
||||
{
|
||||
unsigned char *p = buf;
|
||||
|
||||
/* Left space for bn size which will be written below. */
|
||||
p += 4;
|
||||
|
||||
*p = 0;
|
||||
BN_bn2bin(bn, p + 1);
|
||||
if (!(*(p + 1) & 0x80)) {
|
||||
memmove(p, p + 1, --bn_bytes);
|
||||
}
|
||||
_libssh2_htonu32(p - 4, bn_bytes); /* Post write bn size. */
|
||||
|
||||
return p + bn_bytes;
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
gen_publickey_from_rsa(LIBSSH2_SESSION *session, RSA *rsa,
|
||||
size_t *key_len)
|
||||
{
|
||||
int e_bytes, n_bytes;
|
||||
unsigned long len;
|
||||
unsigned char* key;
|
||||
unsigned char* p;
|
||||
|
||||
e_bytes = BN_num_bytes(rsa->e) + 1;
|
||||
n_bytes = BN_num_bytes(rsa->n) + 1;
|
||||
|
||||
/* Key form is "ssh-rsa" + e + n. */
|
||||
len = 4 + 7 + 4 + e_bytes + 4 + n_bytes;
|
||||
|
||||
key = LIBSSH2_ALLOC(session, len);
|
||||
if (key == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Process key encoding. */
|
||||
p = key;
|
||||
|
||||
_libssh2_htonu32(p, 7); /* Key type. */
|
||||
p += 4;
|
||||
memcpy(p, "ssh-rsa", 7);
|
||||
p += 7;
|
||||
|
||||
p = write_bn(p, rsa->e, e_bytes);
|
||||
p = write_bn(p, rsa->n, n_bytes);
|
||||
|
||||
*key_len = (size_t)(p - key);
|
||||
return key;
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
gen_publickey_from_dsa(LIBSSH2_SESSION* session, DSA *dsa,
|
||||
size_t *key_len)
|
||||
{
|
||||
int p_bytes, q_bytes, g_bytes, k_bytes;
|
||||
unsigned long len;
|
||||
unsigned char* key;
|
||||
unsigned char* p;
|
||||
|
||||
p_bytes = BN_num_bytes(dsa->p) + 1;
|
||||
q_bytes = BN_num_bytes(dsa->q) + 1;
|
||||
g_bytes = BN_num_bytes(dsa->g) + 1;
|
||||
k_bytes = BN_num_bytes(dsa->pub_key) + 1;
|
||||
|
||||
/* Key form is "ssh-dss" + p + q + g + pub_key. */
|
||||
len = 4 + 7 + 4 + p_bytes + 4 + q_bytes + 4 + g_bytes + 4 + k_bytes;
|
||||
|
||||
key = LIBSSH2_ALLOC(session, len);
|
||||
if (key == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Process key encoding. */
|
||||
p = key;
|
||||
|
||||
_libssh2_htonu32(p, 7); /* Key type. */
|
||||
p += 4;
|
||||
memcpy(p, "ssh-dss", 7);
|
||||
p += 7;
|
||||
|
||||
p = write_bn(p, dsa->p, p_bytes);
|
||||
p = write_bn(p, dsa->q, q_bytes);
|
||||
p = write_bn(p, dsa->g, g_bytes);
|
||||
p = write_bn(p, dsa->pub_key, k_bytes);
|
||||
|
||||
*key_len = (size_t)(p - key);
|
||||
return key;
|
||||
}
|
||||
|
||||
static int
|
||||
gen_publickey_from_rsa_evp(LIBSSH2_SESSION *session,
|
||||
unsigned char **method,
|
||||
size_t *method_len,
|
||||
unsigned char **pubkeydata,
|
||||
size_t *pubkeydata_len,
|
||||
EVP_PKEY *pk)
|
||||
{
|
||||
RSA* rsa = NULL;
|
||||
unsigned char* key;
|
||||
unsigned char* method_buf = NULL;
|
||||
size_t key_len;
|
||||
|
||||
_libssh2_debug(session,
|
||||
LIBSSH2_TRACE_AUTH,
|
||||
"Computing public key from RSA private key envelop");
|
||||
|
||||
rsa = EVP_PKEY_get1_RSA(pk);
|
||||
if (rsa == NULL) {
|
||||
/* Assume memory allocation error... what else could it be ? */
|
||||
goto __alloc_error;
|
||||
}
|
||||
|
||||
method_buf = LIBSSH2_ALLOC(session, 7); /* ssh-rsa. */
|
||||
if (method_buf == NULL) {
|
||||
goto __alloc_error;
|
||||
}
|
||||
|
||||
key = gen_publickey_from_rsa(session, rsa, &key_len);
|
||||
if (key == NULL) {
|
||||
goto __alloc_error;
|
||||
}
|
||||
RSA_free(rsa);
|
||||
|
||||
memcpy(method_buf, "ssh-rsa", 7);
|
||||
*method = method_buf;
|
||||
*method_len = 7;
|
||||
*pubkeydata = key;
|
||||
*pubkeydata_len = key_len;
|
||||
return 0;
|
||||
|
||||
__alloc_error:
|
||||
if (rsa != NULL) {
|
||||
RSA_free(rsa);
|
||||
}
|
||||
if (method_buf != NULL) {
|
||||
LIBSSH2_FREE(session, method_buf);
|
||||
}
|
||||
|
||||
return _libssh2_error(session,
|
||||
LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for private key data");
|
||||
}
|
||||
|
||||
static int
|
||||
gen_publickey_from_dsa_evp(LIBSSH2_SESSION *session,
|
||||
unsigned char **method,
|
||||
size_t *method_len,
|
||||
unsigned char **pubkeydata,
|
||||
size_t *pubkeydata_len,
|
||||
EVP_PKEY *pk)
|
||||
{
|
||||
DSA* dsa = NULL;
|
||||
unsigned char* key;
|
||||
unsigned char* method_buf = NULL;
|
||||
size_t key_len;
|
||||
|
||||
_libssh2_debug(session,
|
||||
LIBSSH2_TRACE_AUTH,
|
||||
"Computing public key from DSA private key envelop");
|
||||
|
||||
dsa = EVP_PKEY_get1_DSA(pk);
|
||||
if (dsa == NULL) {
|
||||
/* Assume memory allocation error... what else could it be ? */
|
||||
goto __alloc_error;
|
||||
}
|
||||
|
||||
method_buf = LIBSSH2_ALLOC(session, 7); /* ssh-dss. */
|
||||
if (method_buf == NULL) {
|
||||
goto __alloc_error;
|
||||
}
|
||||
|
||||
key = gen_publickey_from_dsa(session, dsa, &key_len);
|
||||
if (key == NULL) {
|
||||
goto __alloc_error;
|
||||
}
|
||||
DSA_free(dsa);
|
||||
|
||||
memcpy(method_buf, "ssh-dss", 7);
|
||||
*method = method_buf;
|
||||
*method_len = 7;
|
||||
*pubkeydata = key;
|
||||
*pubkeydata_len = key_len;
|
||||
return 0;
|
||||
|
||||
__alloc_error:
|
||||
if (dsa != NULL) {
|
||||
DSA_free(dsa);
|
||||
}
|
||||
if (method_buf != NULL) {
|
||||
LIBSSH2_FREE(session, method_buf);
|
||||
}
|
||||
|
||||
return _libssh2_error(session,
|
||||
LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for private key data");
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
|
||||
unsigned char **method,
|
||||
size_t *method_len,
|
||||
unsigned char **pubkeydata,
|
||||
size_t *pubkeydata_len,
|
||||
const char *privatekey,
|
||||
const char *passphrase)
|
||||
{
|
||||
int st;
|
||||
BIO* bp;
|
||||
EVP_PKEY* pk;
|
||||
|
||||
_libssh2_debug(session,
|
||||
LIBSSH2_TRACE_AUTH,
|
||||
"Computing public key from private key file: %s",
|
||||
privatekey);
|
||||
|
||||
bp = BIO_new_file(privatekey, "r");
|
||||
if (bp == NULL) {
|
||||
return _libssh2_error(session,
|
||||
LIBSSH2_ERROR_FILE,
|
||||
"Unable to extract public key from private key "
|
||||
"file: Unable to open private key file");
|
||||
}
|
||||
if (!EVP_get_cipherbyname("des")) {
|
||||
/* If this cipher isn't loaded it's a pretty good indication that none
|
||||
* are. I have *NO DOUBT* that there's a better way to deal with this
|
||||
* ($#&%#$(%$#( Someone buy me an OpenSSL manual and I'll read up on
|
||||
* it.
|
||||
*/
|
||||
OpenSSL_add_all_ciphers();
|
||||
}
|
||||
BIO_reset(bp);
|
||||
pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
|
||||
BIO_free(bp);
|
||||
|
||||
if (pk == NULL) {
|
||||
return _libssh2_error(session,
|
||||
LIBSSH2_ERROR_FILE,
|
||||
"Unable to extract public key "
|
||||
"from private key file: "
|
||||
"Wrong passphrase or invalid/unrecognized "
|
||||
"private key file format");
|
||||
}
|
||||
|
||||
switch (pk->type) {
|
||||
case EVP_PKEY_RSA :
|
||||
st = gen_publickey_from_rsa_evp(
|
||||
session, method, method_len, pubkeydata, pubkeydata_len, pk);
|
||||
break;
|
||||
|
||||
case EVP_PKEY_DSA :
|
||||
st = gen_publickey_from_dsa_evp(
|
||||
session, method, method_len, pubkeydata, pubkeydata_len, pk);
|
||||
break;
|
||||
|
||||
default :
|
||||
st = _libssh2_error(session,
|
||||
LIBSSH2_ERROR_FILE,
|
||||
"Unable to extract public key "
|
||||
"from private key file: "
|
||||
"Unsupported private key file format");
|
||||
break;
|
||||
}
|
||||
|
||||
EVP_PKEY_free(pk);
|
||||
return st;
|
||||
}
|
||||
|
||||
#endif /* !LIBSSH2_LIBGCRYPT */
|
||||
178
vendor/libssh2-1.4.2/src/openssl.h
vendored
Normal file
178
vendor/libssh2-1.4.2/src/openssl.h
vendored
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
/* Copyright (C) 2009, 2010 Simon Josefsson
|
||||
* Copyright (C) 2006, 2007 The Written Word, Inc. All rights reserved.
|
||||
*
|
||||
* Author: Simon Josefsson
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/sha.h>
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
#include <openssl/md5.h>
|
||||
#endif
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#ifdef OPENSSL_NO_RSA
|
||||
# define LIBSSH2_RSA 0
|
||||
#else
|
||||
# define LIBSSH2_RSA 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_DSA
|
||||
# define LIBSSH2_DSA 0
|
||||
#else
|
||||
# define LIBSSH2_DSA 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_MD5
|
||||
# define LIBSSH2_MD5 0
|
||||
#else
|
||||
# define LIBSSH2_MD5 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_RIPEMD
|
||||
# define LIBSSH2_HMAC_RIPEMD 0
|
||||
#else
|
||||
# define LIBSSH2_HMAC_RIPEMD 1
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x00907000L && !defined(OPENSSL_NO_AES)
|
||||
# define LIBSSH2_AES_CTR 1
|
||||
# define LIBSSH2_AES 1
|
||||
#else
|
||||
# define LIBSSH2_AES_CTR 0
|
||||
# define LIBSSH2_AES 0
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_BLOWFISH
|
||||
# define LIBSSH2_BLOWFISH 0
|
||||
#else
|
||||
# define LIBSSH2_BLOWFISH 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_RC4
|
||||
# define LIBSSH2_RC4 0
|
||||
#else
|
||||
# define LIBSSH2_RC4 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_CAST
|
||||
# define LIBSSH2_CAST 0
|
||||
#else
|
||||
# define LIBSSH2_CAST 1
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_DES
|
||||
# define LIBSSH2_3DES 0
|
||||
#else
|
||||
# define LIBSSH2_3DES 1
|
||||
#endif
|
||||
|
||||
#define _libssh2_random(buf, len) RAND_bytes ((buf), (len))
|
||||
|
||||
#define libssh2_sha1_ctx EVP_MD_CTX
|
||||
#define libssh2_sha1_init(ctx) EVP_DigestInit(ctx, EVP_get_digestbyname("sha1"))
|
||||
#define libssh2_sha1_update(ctx, data, len) EVP_DigestUpdate(&(ctx), data, len)
|
||||
#define libssh2_sha1_final(ctx, out) EVP_DigestFinal(&(ctx), out, NULL)
|
||||
void libssh2_sha1(const unsigned char *message, unsigned long len, unsigned char *out);
|
||||
|
||||
#define libssh2_md5_ctx EVP_MD_CTX
|
||||
#define libssh2_md5_init(ctx) EVP_DigestInit(ctx, EVP_get_digestbyname("md5"))
|
||||
#define libssh2_md5_update(ctx, data, len) EVP_DigestUpdate(&(ctx), data, len)
|
||||
#define libssh2_md5_final(ctx, out) EVP_DigestFinal(&(ctx), out, NULL)
|
||||
void libssh2_md5(const unsigned char *message, unsigned long len, unsigned char *out);
|
||||
|
||||
#define libssh2_hmac_ctx HMAC_CTX
|
||||
#define libssh2_hmac_sha1_init(ctx, key, keylen) \
|
||||
HMAC_Init(ctx, key, keylen, EVP_sha1())
|
||||
#define libssh2_hmac_md5_init(ctx, key, keylen) \
|
||||
HMAC_Init(ctx, key, keylen, EVP_md5())
|
||||
#define libssh2_hmac_ripemd160_init(ctx, key, keylen) \
|
||||
HMAC_Init(ctx, key, keylen, EVP_ripemd160())
|
||||
#define libssh2_hmac_update(ctx, data, datalen) \
|
||||
HMAC_Update(&(ctx), data, datalen)
|
||||
#define libssh2_hmac_final(ctx, data) HMAC_Final(&(ctx), data, NULL)
|
||||
#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
|
||||
|
||||
#define libssh2_crypto_init() OpenSSL_add_all_algorithms()
|
||||
#define libssh2_crypto_exit()
|
||||
|
||||
#define libssh2_rsa_ctx RSA
|
||||
|
||||
#define _libssh2_rsa_free(rsactx) RSA_free(rsactx)
|
||||
|
||||
#define libssh2_dsa_ctx DSA
|
||||
|
||||
|
||||
#define _libssh2_dsa_free(dsactx) DSA_free(dsactx)
|
||||
|
||||
#define _libssh2_cipher_type(name) const EVP_CIPHER *(*name)(void)
|
||||
#define _libssh2_cipher_ctx EVP_CIPHER_CTX
|
||||
|
||||
#define _libssh2_cipher_aes256 EVP_aes_256_cbc
|
||||
#define _libssh2_cipher_aes192 EVP_aes_192_cbc
|
||||
#define _libssh2_cipher_aes128 EVP_aes_128_cbc
|
||||
#define _libssh2_cipher_aes128ctr _libssh2_EVP_aes_128_ctr
|
||||
#define _libssh2_cipher_aes192ctr _libssh2_EVP_aes_192_ctr
|
||||
#define _libssh2_cipher_aes256ctr _libssh2_EVP_aes_256_ctr
|
||||
#define _libssh2_cipher_blowfish EVP_bf_cbc
|
||||
#define _libssh2_cipher_arcfour EVP_rc4
|
||||
#define _libssh2_cipher_cast5 EVP_cast5_cbc
|
||||
#define _libssh2_cipher_3des EVP_des_ede3_cbc
|
||||
|
||||
#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_cleanup(ctx)
|
||||
|
||||
#define _libssh2_bn BIGNUM
|
||||
#define _libssh2_bn_ctx BN_CTX
|
||||
#define _libssh2_bn_ctx_new() BN_CTX_new()
|
||||
#define _libssh2_bn_ctx_free(bnctx) BN_CTX_free(bnctx)
|
||||
#define _libssh2_bn_init() BN_new()
|
||||
#define _libssh2_bn_rand(bn, bits, top, bottom) BN_rand(bn, bits, top, bottom)
|
||||
#define _libssh2_bn_mod_exp(r, a, p, m, ctx) BN_mod_exp(r, a, p, m, ctx)
|
||||
#define _libssh2_bn_set_word(bn, val) BN_set_word(bn, val)
|
||||
#define _libssh2_bn_from_bin(bn, len, val) BN_bin2bn(val, len, bn)
|
||||
#define _libssh2_bn_to_bin(bn, val) BN_bn2bin(bn, val)
|
||||
#define _libssh2_bn_bytes(bn) BN_num_bytes(bn)
|
||||
#define _libssh2_bn_bits(bn) BN_num_bits(bn)
|
||||
#define _libssh2_bn_free(bn) BN_clear_free(bn)
|
||||
|
||||
const EVP_CIPHER *_libssh2_EVP_aes_128_ctr(void);
|
||||
const EVP_CIPHER *_libssh2_EVP_aes_192_ctr(void);
|
||||
const EVP_CIPHER *_libssh2_EVP_aes_256_ctr(void);
|
||||
|
||||
1243
vendor/libssh2-1.4.2/src/packet.c
vendored
Normal file
1243
vendor/libssh2-1.4.2/src/packet.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
76
vendor/libssh2-1.4.2/src/packet.h
vendored
Normal file
76
vendor/libssh2-1.4.2/src/packet.h
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
#ifndef LIBSSH2_PACKET_H
|
||||
#define LIBSSH2_PACKET_H
|
||||
/*
|
||||
* Copyright (C) 2010 by Daniel Stenberg
|
||||
* Author: Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
int _libssh2_packet_read(LIBSSH2_SESSION * session);
|
||||
|
||||
int _libssh2_packet_ask(LIBSSH2_SESSION * session, unsigned char packet_type,
|
||||
unsigned char **data, size_t *data_len,
|
||||
int match_ofs,
|
||||
const unsigned char *match_buf,
|
||||
size_t match_len);
|
||||
|
||||
int _libssh2_packet_askv(LIBSSH2_SESSION * session,
|
||||
const unsigned char *packet_types,
|
||||
unsigned char **data, size_t *data_len,
|
||||
int match_ofs,
|
||||
const unsigned char *match_buf,
|
||||
size_t match_len);
|
||||
int _libssh2_packet_require(LIBSSH2_SESSION * session,
|
||||
unsigned char packet_type, unsigned char **data,
|
||||
size_t *data_len, int match_ofs,
|
||||
const unsigned char *match_buf,
|
||||
size_t match_len,
|
||||
packet_require_state_t * state);
|
||||
int _libssh2_packet_requirev(LIBSSH2_SESSION *session,
|
||||
const unsigned char *packet_types,
|
||||
unsigned char **data, size_t *data_len,
|
||||
int match_ofs,
|
||||
const unsigned char *match_buf,
|
||||
size_t match_len,
|
||||
packet_requirev_state_t * state);
|
||||
int _libssh2_packet_burn(LIBSSH2_SESSION * session,
|
||||
libssh2_nonblocking_states * state);
|
||||
int _libssh2_packet_write(LIBSSH2_SESSION * session, unsigned char *data,
|
||||
unsigned long data_len);
|
||||
int _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
|
||||
size_t datalen, int macstate);
|
||||
|
||||
#endif /* LIBSSH2_PACKET_H */
|
||||
213
vendor/libssh2-1.4.2/src/pem.c
vendored
Normal file
213
vendor/libssh2-1.4.2/src/pem.c
vendored
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
/* Copyright (C) 2007 The Written Word, Inc.
|
||||
* Copyright (C) 2008, Simon Josefsson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
#ifdef LIBSSH2_LIBGCRYPT /* compile only if we build with libgcrypt */
|
||||
|
||||
static int
|
||||
readline(char *line, int line_size, FILE * fp)
|
||||
{
|
||||
if (!fgets(line, line_size, fp)) {
|
||||
return -1;
|
||||
}
|
||||
if (*line && line[strlen(line) - 1] == '\n') {
|
||||
line[strlen(line) - 1] = '\0';
|
||||
}
|
||||
if (*line && line[strlen(line) - 1] == '\r') {
|
||||
line[strlen(line) - 1] = '\0';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define LINE_SIZE 128
|
||||
|
||||
int
|
||||
_libssh2_pem_parse(LIBSSH2_SESSION * session,
|
||||
const char *headerbegin,
|
||||
const char *headerend,
|
||||
FILE * fp, unsigned char **data, unsigned int *datalen)
|
||||
{
|
||||
char line[LINE_SIZE];
|
||||
char *b64data = NULL;
|
||||
unsigned int b64datalen = 0;
|
||||
int ret;
|
||||
|
||||
do {
|
||||
if (readline(line, LINE_SIZE, fp)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
while (strcmp(line, headerbegin) != 0);
|
||||
|
||||
*line = '\0';
|
||||
|
||||
do {
|
||||
if (*line) {
|
||||
char *tmp;
|
||||
size_t linelen;
|
||||
|
||||
linelen = strlen(line);
|
||||
tmp = LIBSSH2_REALLOC(session, b64data, b64datalen + linelen);
|
||||
if (!tmp) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
memcpy(tmp + b64datalen, line, linelen);
|
||||
b64data = tmp;
|
||||
b64datalen += linelen;
|
||||
}
|
||||
|
||||
if (readline(line, LINE_SIZE, fp)) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
} while (strcmp(line, headerend) != 0);
|
||||
|
||||
if (libssh2_base64_decode(session, (char**) data, datalen,
|
||||
b64data, b64datalen)) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
if (b64data) {
|
||||
LIBSSH2_FREE(session, b64data);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
read_asn1_length(const unsigned char *data,
|
||||
unsigned int datalen, unsigned int *len)
|
||||
{
|
||||
unsigned int lenlen;
|
||||
int nextpos;
|
||||
|
||||
if (datalen < 1) {
|
||||
return -1;
|
||||
}
|
||||
*len = data[0];
|
||||
|
||||
if (*len >= 0x80) {
|
||||
lenlen = *len & 0x7F;
|
||||
*len = data[1];
|
||||
if (1 + lenlen > datalen) {
|
||||
return -1;
|
||||
}
|
||||
if (lenlen > 1) {
|
||||
*len <<= 8;
|
||||
*len |= data[2];
|
||||
}
|
||||
} else {
|
||||
lenlen = 0;
|
||||
}
|
||||
|
||||
nextpos = 1 + lenlen;
|
||||
if (lenlen > 2 || 1 + lenlen + *len > datalen) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nextpos;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_pem_decode_sequence(unsigned char **data, unsigned int *datalen)
|
||||
{
|
||||
unsigned int len;
|
||||
int lenlen;
|
||||
|
||||
if (*datalen < 1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((*data)[0] != '\x30') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
(*data)++;
|
||||
(*datalen)--;
|
||||
|
||||
lenlen = read_asn1_length(*data, *datalen, &len);
|
||||
if (lenlen < 0 || lenlen + len != *datalen) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*data += lenlen;
|
||||
*datalen -= lenlen;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
_libssh2_pem_decode_integer(unsigned char **data, unsigned int *datalen,
|
||||
unsigned char **i, unsigned int *ilen)
|
||||
{
|
||||
unsigned int len;
|
||||
int lenlen;
|
||||
|
||||
if (*datalen < 1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((*data)[0] != '\x02') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
(*data)++;
|
||||
(*datalen)--;
|
||||
|
||||
lenlen = read_asn1_length(*data, *datalen, &len);
|
||||
if (lenlen < 0 || lenlen + len > *datalen) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*data += lenlen;
|
||||
*datalen -= lenlen;
|
||||
|
||||
*i = *data;
|
||||
*ilen = len;
|
||||
|
||||
*data += len;
|
||||
*datalen -= len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* LIBSSH2_LIBGCRYPT */
|
||||
1058
vendor/libssh2-1.4.2/src/publickey.c
vendored
Normal file
1058
vendor/libssh2-1.4.2/src/publickey.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
1085
vendor/libssh2-1.4.2/src/scp.c
vendored
Normal file
1085
vendor/libssh2-1.4.2/src/scp.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
1751
vendor/libssh2-1.4.2/src/session.c
vendored
Normal file
1751
vendor/libssh2-1.4.2/src/session.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
93
vendor/libssh2-1.4.2/src/session.h
vendored
Normal file
93
vendor/libssh2-1.4.2/src/session.h
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
#ifndef LIBSSH2_SESSION_H
|
||||
#define LIBSSH2_SESSION_H
|
||||
/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2009-2010 by Daniel Stenberg
|
||||
* Copyright (c) 2010 Simon Josefsson <simon@josefsson.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* Conveniance-macros to allow code like this;
|
||||
|
||||
int rc = BLOCK_ADJUST(rc, session, session_startup(session, sock) );
|
||||
|
||||
int rc = BLOCK_ADJUST_ERRNO(ptr, session, session_startup(session, sock) );
|
||||
|
||||
The point of course being to make sure that while in non-blocking mode
|
||||
these always return no matter what the return code is, but in blocking mode
|
||||
it blocks if EAGAIN is the reason for the return from the underlying
|
||||
function.
|
||||
|
||||
*/
|
||||
#define BLOCK_ADJUST(rc,sess,x) \
|
||||
do { \
|
||||
time_t entry_time = time (NULL); \
|
||||
do { \
|
||||
rc = x; \
|
||||
/* the order of the check below is important to properly deal with \
|
||||
the case when the 'sess' is freed */ \
|
||||
if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
* For functions that returns a pointer, we need to check if the API is
|
||||
* non-blocking and return immediately. If the pointer is non-NULL we return
|
||||
* immediately. If the API is blocking and we get a NULL we check the errno
|
||||
* and *only* if that is EAGAIN we loop and wait for socket action.
|
||||
*/
|
||||
#define BLOCK_ADJUST_ERRNO(ptr,sess,x) \
|
||||
do { \
|
||||
time_t entry_time = time (NULL); \
|
||||
int rc; \
|
||||
do { \
|
||||
ptr = x; \
|
||||
if(!sess->api_block_mode || \
|
||||
(ptr != NULL) || \
|
||||
(libssh2_session_last_errno(sess) != LIBSSH2_ERROR_EAGAIN) ) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
} while(0)
|
||||
|
||||
|
||||
int _libssh2_wait_socket(LIBSSH2_SESSION *session, time_t entry_time);
|
||||
|
||||
/* this is the lib-internal set blocking function */
|
||||
int _libssh2_session_set_blocking(LIBSSH2_SESSION * session, int blocking);
|
||||
|
||||
#endif /* LIBSSH2_SESSION_H */
|
||||
3278
vendor/libssh2-1.4.2/src/sftp.c
vendored
Normal file
3278
vendor/libssh2-1.4.2/src/sftp.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
230
vendor/libssh2-1.4.2/src/sftp.h
vendored
Normal file
230
vendor/libssh2-1.4.2/src/sftp.h
vendored
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
#ifndef _LIBSSH2_SFTP_H
|
||||
#define _LIBSSH2_SFTP_H
|
||||
/*
|
||||
* Copyright (C) 2010 - 2012 by Daniel Stenberg
|
||||
* Author: Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* MAX_SFTP_OUTGOING_SIZE MUST not be larger than 32500 or so. This is the
|
||||
* amount of data sent in each FXP_WRITE packet
|
||||
*/
|
||||
#define MAX_SFTP_OUTGOING_SIZE 30000
|
||||
|
||||
/* MAX_SFTP_READ_SIZE is how much data is asked for at max in each FXP_READ
|
||||
* packets.
|
||||
*/
|
||||
#define MAX_SFTP_READ_SIZE 2000
|
||||
|
||||
struct sftp_pipeline_chunk {
|
||||
struct list_node node;
|
||||
size_t len; /* WRITE: size of the data to write
|
||||
READ: how many bytes that was asked for */
|
||||
size_t sent;
|
||||
ssize_t lefttosend; /* if 0, the entire packet has been sent off */
|
||||
uint32_t request_id;
|
||||
unsigned char packet[1]; /* data */
|
||||
};
|
||||
|
||||
struct sftp_zombie_requests {
|
||||
struct list_node node;
|
||||
uint32_t request_id;
|
||||
};
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(x,y) ((x)<(y)?(x):(y))
|
||||
#endif
|
||||
|
||||
struct _LIBSSH2_SFTP_PACKET
|
||||
{
|
||||
struct list_node node; /* linked list header */
|
||||
uint32_t request_id;
|
||||
unsigned char *data;
|
||||
size_t data_len; /* payload size */
|
||||
};
|
||||
|
||||
typedef struct _LIBSSH2_SFTP_PACKET LIBSSH2_SFTP_PACKET;
|
||||
|
||||
#define SFTP_HANDLE_MAXLEN 256 /* according to spec! */
|
||||
|
||||
struct _LIBSSH2_SFTP_HANDLE
|
||||
{
|
||||
struct list_node node;
|
||||
|
||||
LIBSSH2_SFTP *sftp;
|
||||
|
||||
char handle[SFTP_HANDLE_MAXLEN];
|
||||
size_t handle_len;
|
||||
|
||||
enum {
|
||||
LIBSSH2_SFTP_HANDLE_FILE,
|
||||
LIBSSH2_SFTP_HANDLE_DIR
|
||||
} handle_type;
|
||||
|
||||
union _libssh2_sftp_handle_data
|
||||
{
|
||||
struct _libssh2_sftp_handle_file_data
|
||||
{
|
||||
libssh2_uint64_t offset;
|
||||
libssh2_uint64_t offset_sent;
|
||||
size_t acked; /* container for acked data that hasn't been
|
||||
returned to caller yet, used for sftp_write */
|
||||
|
||||
/* 'data' is used by sftp_read() and is allocated data that has
|
||||
been received already from the server but wasn't returned to
|
||||
the caller yet. It is of size 'data_len' and 'data_left is the
|
||||
number of bytes not yet returned, counted from the end of the
|
||||
buffer. */
|
||||
unsigned char *data;
|
||||
size_t data_len;
|
||||
size_t data_left;
|
||||
|
||||
char eof; /* we have read to the end */
|
||||
} file;
|
||||
struct _libssh2_sftp_handle_dir_data
|
||||
{
|
||||
uint32_t names_left;
|
||||
void *names_packet;
|
||||
char *next_name;
|
||||
} dir;
|
||||
} u;
|
||||
|
||||
/* State variables used in libssh2_sftp_close_handle() */
|
||||
libssh2_nonblocking_states close_state;
|
||||
uint32_t close_request_id;
|
||||
unsigned char *close_packet;
|
||||
|
||||
/* list of outstanding packets sent to server */
|
||||
struct list_head packet_list;
|
||||
|
||||
};
|
||||
|
||||
struct _LIBSSH2_SFTP
|
||||
{
|
||||
LIBSSH2_CHANNEL *channel;
|
||||
|
||||
uint32_t request_id, version;
|
||||
|
||||
struct list_head packets;
|
||||
|
||||
/* List of FXP_READ responses to ignore because EOF already received. */
|
||||
struct list_head zombie_requests;
|
||||
|
||||
/* a list of _LIBSSH2_SFTP_HANDLE structs */
|
||||
struct list_head sftp_handles;
|
||||
|
||||
uint32_t last_errno;
|
||||
|
||||
/* Holder for partial packet, use in libssh2_sftp_packet_read() */
|
||||
unsigned char partial_size[4]; /* buffer for size field */
|
||||
size_t partial_size_len; /* size field length */
|
||||
unsigned char *partial_packet; /* The data */
|
||||
uint32_t partial_len; /* Desired number of bytes */
|
||||
size_t partial_received; /* Bytes received so far */
|
||||
|
||||
/* Time that libssh2_sftp_packet_requirev() started reading */
|
||||
time_t requirev_start;
|
||||
|
||||
/* State variables used in libssh2_sftp_open_ex() */
|
||||
libssh2_nonblocking_states open_state;
|
||||
unsigned char *open_packet;
|
||||
uint32_t open_packet_len; /* 32 bit on the wire */
|
||||
size_t open_packet_sent;
|
||||
uint32_t open_request_id;
|
||||
|
||||
/* State variable used in sftp_read() */
|
||||
libssh2_nonblocking_states read_state;
|
||||
|
||||
/* State variable used in sftp_packet_read() */
|
||||
libssh2_nonblocking_states packet_state;
|
||||
|
||||
/* State variable used in sftp_write() */
|
||||
libssh2_nonblocking_states write_state;
|
||||
|
||||
/* State variables used in libssh2_sftp_readdir() */
|
||||
libssh2_nonblocking_states readdir_state;
|
||||
unsigned char *readdir_packet;
|
||||
uint32_t readdir_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_fstat_ex() */
|
||||
libssh2_nonblocking_states fstat_state;
|
||||
unsigned char *fstat_packet;
|
||||
uint32_t fstat_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_unlink_ex() */
|
||||
libssh2_nonblocking_states unlink_state;
|
||||
unsigned char *unlink_packet;
|
||||
uint32_t unlink_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_rename_ex() */
|
||||
libssh2_nonblocking_states rename_state;
|
||||
unsigned char *rename_packet;
|
||||
unsigned char *rename_s;
|
||||
uint32_t rename_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_fstatvfs() */
|
||||
libssh2_nonblocking_states fstatvfs_state;
|
||||
unsigned char *fstatvfs_packet;
|
||||
uint32_t fstatvfs_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_statvfs() */
|
||||
libssh2_nonblocking_states statvfs_state;
|
||||
unsigned char *statvfs_packet;
|
||||
uint32_t statvfs_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_mkdir() */
|
||||
libssh2_nonblocking_states mkdir_state;
|
||||
unsigned char *mkdir_packet;
|
||||
uint32_t mkdir_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_rmdir() */
|
||||
libssh2_nonblocking_states rmdir_state;
|
||||
unsigned char *rmdir_packet;
|
||||
uint32_t rmdir_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_stat() */
|
||||
libssh2_nonblocking_states stat_state;
|
||||
unsigned char *stat_packet;
|
||||
uint32_t stat_request_id;
|
||||
|
||||
/* State variables used in libssh2_sftp_symlink() */
|
||||
libssh2_nonblocking_states symlink_state;
|
||||
unsigned char *symlink_packet;
|
||||
uint32_t symlink_request_id;
|
||||
};
|
||||
|
||||
#endif
|
||||
873
vendor/libssh2-1.4.2/src/transport.c
vendored
Normal file
873
vendor/libssh2-1.4.2/src/transport.c
vendored
Normal file
|
|
@ -0,0 +1,873 @@
|
|||
/* Copyright (C) 2007 The Written Word, Inc. All rights reserved.
|
||||
* Copyright (C) 2009-2010 by Daniel Stenberg
|
||||
* Author: Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file handles reading and writing to the SECSH transport layer. RFC4253.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#ifdef LIBSSH2DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "transport.h"
|
||||
#include "mac.h"
|
||||
|
||||
#define MAX_BLOCKSIZE 32 /* MUST fit biggest crypto block size we use/get */
|
||||
#define MAX_MACSIZE 20 /* MUST fit biggest MAC length we support */
|
||||
|
||||
#ifdef LIBSSH2DEBUG
|
||||
#define UNPRINTABLE_CHAR '.'
|
||||
static void
|
||||
debugdump(LIBSSH2_SESSION * session,
|
||||
const char *desc, const unsigned char *ptr, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
size_t c;
|
||||
unsigned int width = 0x10;
|
||||
char buffer[256]; /* Must be enough for width*4 + about 30 or so */
|
||||
size_t used;
|
||||
static const char* hex_chars = "0123456789ABCDEF";
|
||||
|
||||
if (!(session->showmask & LIBSSH2_TRACE_TRANS)) {
|
||||
/* not asked for, bail out */
|
||||
return;
|
||||
}
|
||||
|
||||
used = snprintf(buffer, sizeof(buffer), "=> %s (%d bytes)\n",
|
||||
desc, (int) size);
|
||||
if (session->tracehandler)
|
||||
(session->tracehandler)(session, session->tracehandler_context,
|
||||
buffer, used);
|
||||
else
|
||||
fprintf(stderr, "%s", buffer);
|
||||
|
||||
for(i = 0; i < size; i += width) {
|
||||
|
||||
used = snprintf(buffer, sizeof(buffer), "%04lx: ", (long)i);
|
||||
|
||||
/* hex not disabled, show it */
|
||||
for(c = 0; c < width; c++) {
|
||||
if (i + c < size) {
|
||||
buffer[used++] = hex_chars[(ptr[i+c] >> 4) & 0xF];
|
||||
buffer[used++] = hex_chars[ptr[i+c] & 0xF];
|
||||
}
|
||||
else {
|
||||
buffer[used++] = ' ';
|
||||
buffer[used++] = ' ';
|
||||
}
|
||||
|
||||
buffer[used++] = ' ';
|
||||
if ((width/2) - 1 == c)
|
||||
buffer[used++] = ' ';
|
||||
}
|
||||
|
||||
buffer[used++] = ':';
|
||||
buffer[used++] = ' ';
|
||||
|
||||
for(c = 0; (c < width) && (i + c < size); c++) {
|
||||
buffer[used++] = isprint(ptr[i + c]) ?
|
||||
ptr[i + c] : UNPRINTABLE_CHAR;
|
||||
}
|
||||
buffer[used++] = '\n';
|
||||
buffer[used] = 0;
|
||||
|
||||
if (session->tracehandler)
|
||||
(session->tracehandler)(session, session->tracehandler_context,
|
||||
buffer, used);
|
||||
else
|
||||
fprintf(stderr, "%s", buffer);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define debugdump(a,x,y,z)
|
||||
#endif
|
||||
|
||||
|
||||
/* decrypt() decrypts 'len' bytes from 'source' to 'dest'.
|
||||
*
|
||||
* returns 0 on success and negative on failure
|
||||
*/
|
||||
|
||||
static int
|
||||
decrypt(LIBSSH2_SESSION * session, unsigned char *source,
|
||||
unsigned char *dest, int len)
|
||||
{
|
||||
struct transportpacket *p = &session->packet;
|
||||
int blocksize = session->remote.crypt->blocksize;
|
||||
|
||||
/* if we get called with a len that isn't an even number of blocksizes
|
||||
we risk losing those extra bytes */
|
||||
assert((len % blocksize) == 0);
|
||||
|
||||
while (len >= blocksize) {
|
||||
if (session->remote.crypt->crypt(session, source,
|
||||
&session->remote.crypt_abstract)) {
|
||||
LIBSSH2_FREE(session, p->payload);
|
||||
return LIBSSH2_ERROR_DECRYPT;
|
||||
}
|
||||
|
||||
/* if the crypt() function would write to a given address it
|
||||
wouldn't have to memcpy() and we could avoid this memcpy()
|
||||
too */
|
||||
memcpy(dest, source, blocksize);
|
||||
|
||||
len -= blocksize; /* less bytes left */
|
||||
dest += blocksize; /* advance write pointer */
|
||||
source += blocksize; /* advance read pointer */
|
||||
}
|
||||
return LIBSSH2_ERROR_NONE; /* all is fine */
|
||||
}
|
||||
|
||||
/*
|
||||
* fullpacket() gets called when a full packet has been received and properly
|
||||
* collected.
|
||||
*/
|
||||
static int
|
||||
fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
|
||||
{
|
||||
unsigned char macbuf[MAX_MACSIZE];
|
||||
struct transportpacket *p = &session->packet;
|
||||
int rc;
|
||||
|
||||
if (session->fullpacket_state == libssh2_NB_state_idle) {
|
||||
session->fullpacket_macstate = LIBSSH2_MAC_CONFIRMED;
|
||||
session->fullpacket_payload_len = p->packet_length - 1;
|
||||
|
||||
if (encrypted) {
|
||||
|
||||
/* Calculate MAC hash */
|
||||
session->remote.mac->hash(session, macbuf, /* store hash here */
|
||||
session->remote.seqno,
|
||||
p->init, 5,
|
||||
p->payload,
|
||||
session->fullpacket_payload_len,
|
||||
&session->remote.mac_abstract);
|
||||
|
||||
/* Compare the calculated hash with the MAC we just read from
|
||||
* the network. The read one is at the very end of the payload
|
||||
* buffer. Note that 'payload_len' here is the packet_length
|
||||
* field which includes the padding but not the MAC.
|
||||
*/
|
||||
if (memcmp(macbuf, p->payload + session->fullpacket_payload_len,
|
||||
session->remote.mac->mac_len)) {
|
||||
session->fullpacket_macstate = LIBSSH2_MAC_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
session->remote.seqno++;
|
||||
|
||||
/* ignore the padding */
|
||||
session->fullpacket_payload_len -= p->padding_length;
|
||||
|
||||
/* Check for and deal with decompression */
|
||||
if (session->remote.comp &&
|
||||
session->remote.comp->compress &&
|
||||
session->remote.comp_abstract) {
|
||||
/*
|
||||
* The buffer for the decompression (remote.comp_abstract) is
|
||||
* initialised in time when it is needed so as long it is NULL we
|
||||
* cannot decompress.
|
||||
*/
|
||||
|
||||
unsigned char *data;
|
||||
size_t data_len;
|
||||
rc = session->remote.comp->decomp(session,
|
||||
&data, &data_len,
|
||||
LIBSSH2_PACKET_MAXDECOMP,
|
||||
p->payload,
|
||||
session->fullpacket_payload_len,
|
||||
&session->remote.comp_abstract);
|
||||
LIBSSH2_FREE(session, p->payload);
|
||||
if(rc)
|
||||
return rc;
|
||||
|
||||
p->payload = data;
|
||||
session->fullpacket_payload_len = data_len;
|
||||
}
|
||||
|
||||
session->fullpacket_packet_type = p->payload[0];
|
||||
|
||||
debugdump(session, "libssh2_transport_read() plain",
|
||||
p->payload, session->fullpacket_payload_len);
|
||||
|
||||
session->fullpacket_state = libssh2_NB_state_created;
|
||||
}
|
||||
|
||||
if (session->fullpacket_state == libssh2_NB_state_created) {
|
||||
rc = _libssh2_packet_add(session, p->payload,
|
||||
session->fullpacket_payload_len,
|
||||
session->fullpacket_macstate);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
session->fullpacket_state = libssh2_NB_state_idle;
|
||||
|
||||
return session->fullpacket_packet_type;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _libssh2_transport_read
|
||||
*
|
||||
* Collect a packet into the input queue.
|
||||
*
|
||||
* Returns packet type added to input queue (0 if nothing added), or a
|
||||
* negative error number.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function reads the binary stream as specified in chapter 6 of RFC4253
|
||||
* "The Secure Shell (SSH) Transport Layer Protocol"
|
||||
*
|
||||
* DOES NOT call _libssh2_error() for ANY error case.
|
||||
*/
|
||||
int _libssh2_transport_read(LIBSSH2_SESSION * session)
|
||||
{
|
||||
int rc;
|
||||
struct transportpacket *p = &session->packet;
|
||||
int remainbuf;
|
||||
int remainpack;
|
||||
int numbytes;
|
||||
int numdecrypt;
|
||||
unsigned char block[MAX_BLOCKSIZE];
|
||||
int blocksize;
|
||||
int encrypted = 1;
|
||||
size_t total_num;
|
||||
|
||||
/* default clear the bit */
|
||||
session->socket_block_directions &= ~LIBSSH2_SESSION_BLOCK_INBOUND;
|
||||
|
||||
/*
|
||||
* All channels, systems, subsystems, etc eventually make it down here
|
||||
* when looking for more incoming data. If a key exchange is going on
|
||||
* (LIBSSH2_STATE_EXCHANGING_KEYS bit is set) then the remote end will
|
||||
* ONLY send key exchange related traffic. In non-blocking mode, there is
|
||||
* a chance to break out of the kex_exchange function with an EAGAIN
|
||||
* status, and never come back to it. If LIBSSH2_STATE_EXCHANGING_KEYS is
|
||||
* active, then we must redirect to the key exchange. However, if
|
||||
* kex_exchange is active (as in it is the one that calls this execution
|
||||
* of packet_read, then don't redirect, as that would be an infinite loop!
|
||||
*/
|
||||
|
||||
if (session->state & LIBSSH2_STATE_EXCHANGING_KEYS &&
|
||||
!(session->state & LIBSSH2_STATE_KEX_ACTIVE)) {
|
||||
|
||||
/* Whoever wants a packet won't get anything until the key re-exchange
|
||||
* is done!
|
||||
*/
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS, "Redirecting into the"
|
||||
" key re-exchange from _libssh2_transport_read");
|
||||
rc = _libssh2_kex_exchange(session, 1, &session->startup_key_state);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* =============================== NOTE ===============================
|
||||
* I know this is very ugly and not a really good use of "goto", but
|
||||
* this case statement would be even uglier to do it any other way
|
||||
*/
|
||||
if (session->readPack_state == libssh2_NB_state_jump1) {
|
||||
session->readPack_state = libssh2_NB_state_idle;
|
||||
encrypted = session->readPack_encrypted;
|
||||
goto libssh2_transport_read_point1;
|
||||
}
|
||||
|
||||
do {
|
||||
if (session->socket_state == LIBSSH2_SOCKET_DISCONNECTED) {
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
if (session->state & LIBSSH2_STATE_NEWKEYS) {
|
||||
blocksize = session->remote.crypt->blocksize;
|
||||
} else {
|
||||
encrypted = 0; /* not encrypted */
|
||||
blocksize = 5; /* not strictly true, but we can use 5 here to
|
||||
make the checks below work fine still */
|
||||
}
|
||||
|
||||
/* read/use a whole big chunk into a temporary area stored in
|
||||
the LIBSSH2_SESSION struct. We will decrypt data from that
|
||||
buffer into the packet buffer so this temp one doesn't have
|
||||
to be able to keep a whole SSH packet, just be large enough
|
||||
so that we can read big chunks from the network layer. */
|
||||
|
||||
/* how much data there is remaining in the buffer to deal with
|
||||
before we should read more from the network */
|
||||
remainbuf = p->writeidx - p->readidx;
|
||||
|
||||
/* if remainbuf turns negative we have a bad internal error */
|
||||
assert(remainbuf >= 0);
|
||||
|
||||
if (remainbuf < blocksize) {
|
||||
/* If we have less than a blocksize left, it is too
|
||||
little data to deal with, read more */
|
||||
ssize_t nread;
|
||||
|
||||
/* move any remainder to the start of the buffer so
|
||||
that we can do a full refill */
|
||||
if (remainbuf) {
|
||||
memmove(p->buf, &p->buf[p->readidx], remainbuf);
|
||||
p->readidx = 0;
|
||||
p->writeidx = remainbuf;
|
||||
} else {
|
||||
/* nothing to move, just zero the indexes */
|
||||
p->readidx = p->writeidx = 0;
|
||||
}
|
||||
|
||||
/* now read a big chunk from the network into the temp buffer */
|
||||
nread =
|
||||
LIBSSH2_RECV(session, &p->buf[remainbuf],
|
||||
PACKETBUFSIZE - remainbuf,
|
||||
LIBSSH2_SOCKET_RECV_FLAGS(session));
|
||||
if (nread <= 0) {
|
||||
/* check if this is due to EAGAIN and return the special
|
||||
return code if so, error out normally otherwise */
|
||||
if ((nread < 0) && (nread == -EAGAIN)) {
|
||||
session->socket_block_directions |=
|
||||
LIBSSH2_SESSION_BLOCK_INBOUND;
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
}
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET,
|
||||
"Error recving %d bytes (got %d)",
|
||||
PACKETBUFSIZE - remainbuf, -nread);
|
||||
return LIBSSH2_ERROR_SOCKET_RECV;
|
||||
}
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET,
|
||||
"Recved %d/%d bytes to %p+%d", nread,
|
||||
PACKETBUFSIZE - remainbuf, p->buf, remainbuf);
|
||||
|
||||
debugdump(session, "libssh2_transport_read() raw",
|
||||
&p->buf[remainbuf], nread);
|
||||
/* advance write pointer */
|
||||
p->writeidx += nread;
|
||||
|
||||
/* update remainbuf counter */
|
||||
remainbuf = p->writeidx - p->readidx;
|
||||
}
|
||||
|
||||
/* how much data to deal with from the buffer */
|
||||
numbytes = remainbuf;
|
||||
|
||||
if (!p->total_num) {
|
||||
/* No payload package area allocated yet. To know the
|
||||
size of this payload, we need to decrypt the first
|
||||
blocksize data. */
|
||||
|
||||
if (numbytes < blocksize) {
|
||||
/* we can't act on anything less than blocksize, but this
|
||||
check is only done for the initial block since once we have
|
||||
got the start of a block we can in fact deal with fractions
|
||||
*/
|
||||
session->socket_block_directions |=
|
||||
LIBSSH2_SESSION_BLOCK_INBOUND;
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
}
|
||||
|
||||
if (encrypted) {
|
||||
rc = decrypt(session, &p->buf[p->readidx], block, blocksize);
|
||||
if (rc != LIBSSH2_ERROR_NONE) {
|
||||
return rc;
|
||||
}
|
||||
/* save the first 5 bytes of the decrypted package, to be
|
||||
used in the hash calculation later down. */
|
||||
memcpy(p->init, &p->buf[p->readidx], 5);
|
||||
} else {
|
||||
/* the data is plain, just copy it verbatim to
|
||||
the working block buffer */
|
||||
memcpy(block, &p->buf[p->readidx], blocksize);
|
||||
}
|
||||
|
||||
/* advance the read pointer */
|
||||
p->readidx += blocksize;
|
||||
|
||||
/* we now have the initial blocksize bytes decrypted,
|
||||
* and we can extract packet and padding length from it
|
||||
*/
|
||||
p->packet_length = _libssh2_ntohu32(block);
|
||||
if (p->packet_length < 1)
|
||||
return LIBSSH2_ERROR_DECRYPT;
|
||||
|
||||
p->padding_length = block[4];
|
||||
|
||||
/* total_num is the number of bytes following the initial
|
||||
(5 bytes) packet length and padding length fields */
|
||||
total_num =
|
||||
p->packet_length - 1 +
|
||||
(encrypted ? session->remote.mac->mac_len : 0);
|
||||
|
||||
/* RFC4253 section 6.1 Maximum Packet Length says:
|
||||
*
|
||||
* "All implementations MUST be able to process
|
||||
* packets with uncompressed payload length of 32768
|
||||
* bytes or less and total packet size of 35000 bytes
|
||||
* or less (including length, padding length, payload,
|
||||
* padding, and MAC.)."
|
||||
*/
|
||||
if (total_num > LIBSSH2_PACKET_MAXPAYLOAD) {
|
||||
return LIBSSH2_ERROR_OUT_OF_BOUNDARY;
|
||||
}
|
||||
|
||||
/* Get a packet handle put data into. We get one to
|
||||
hold all data, including padding and MAC. */
|
||||
p->payload = LIBSSH2_ALLOC(session, total_num);
|
||||
if (!p->payload) {
|
||||
return LIBSSH2_ERROR_ALLOC;
|
||||
}
|
||||
p->total_num = total_num;
|
||||
/* init write pointer to start of payload buffer */
|
||||
p->wptr = p->payload;
|
||||
|
||||
if (blocksize > 5) {
|
||||
/* copy the data from index 5 to the end of
|
||||
the blocksize from the temporary buffer to
|
||||
the start of the decrypted buffer */
|
||||
memcpy(p->wptr, &block[5], blocksize - 5);
|
||||
p->wptr += blocksize - 5; /* advance write pointer */
|
||||
}
|
||||
|
||||
/* init the data_num field to the number of bytes of
|
||||
the package read so far */
|
||||
p->data_num = p->wptr - p->payload;
|
||||
|
||||
/* we already dealt with a blocksize worth of data */
|
||||
numbytes -= blocksize;
|
||||
}
|
||||
|
||||
/* how much there is left to add to the current payload
|
||||
package */
|
||||
remainpack = p->total_num - p->data_num;
|
||||
|
||||
if (numbytes > remainpack) {
|
||||
/* if we have more data in the buffer than what is going into this
|
||||
particular packet, we limit this round to this packet only */
|
||||
numbytes = remainpack;
|
||||
}
|
||||
|
||||
if (encrypted) {
|
||||
/* At the end of the incoming stream, there is a MAC,
|
||||
and we don't want to decrypt that since we need it
|
||||
"raw". We MUST however decrypt the padding data
|
||||
since it is used for the hash later on. */
|
||||
int skip = session->remote.mac->mac_len;
|
||||
|
||||
/* if what we have plus numbytes is bigger than the
|
||||
total minus the skip margin, we should lower the
|
||||
amount to decrypt even more */
|
||||
if ((p->data_num + numbytes) > (p->total_num - skip)) {
|
||||
numdecrypt = (p->total_num - skip) - p->data_num;
|
||||
} else {
|
||||
int frac;
|
||||
numdecrypt = numbytes;
|
||||
frac = numdecrypt % blocksize;
|
||||
if (frac) {
|
||||
/* not an aligned amount of blocks,
|
||||
align it */
|
||||
numdecrypt -= frac;
|
||||
/* and make it no unencrypted data
|
||||
after it */
|
||||
numbytes = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* unencrypted data should not be decrypted at all */
|
||||
numdecrypt = 0;
|
||||
}
|
||||
|
||||
/* if there are bytes to decrypt, do that */
|
||||
if (numdecrypt > 0) {
|
||||
/* now decrypt the lot */
|
||||
rc = decrypt(session, &p->buf[p->readidx], p->wptr, numdecrypt);
|
||||
if (rc != LIBSSH2_ERROR_NONE) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* advance the read pointer */
|
||||
p->readidx += numdecrypt;
|
||||
/* advance write pointer */
|
||||
p->wptr += numdecrypt;
|
||||
/* increse data_num */
|
||||
p->data_num += numdecrypt;
|
||||
|
||||
/* bytes left to take care of without decryption */
|
||||
numbytes -= numdecrypt;
|
||||
}
|
||||
|
||||
/* if there are bytes to copy that aren't decrypted, simply
|
||||
copy them as-is to the target buffer */
|
||||
if (numbytes > 0) {
|
||||
memcpy(p->wptr, &p->buf[p->readidx], numbytes);
|
||||
|
||||
/* advance the read pointer */
|
||||
p->readidx += numbytes;
|
||||
/* advance write pointer */
|
||||
p->wptr += numbytes;
|
||||
/* increse data_num */
|
||||
p->data_num += numbytes;
|
||||
}
|
||||
|
||||
/* now check how much data there's left to read to finish the
|
||||
current packet */
|
||||
remainpack = p->total_num - p->data_num;
|
||||
|
||||
if (!remainpack) {
|
||||
/* we have a full packet */
|
||||
libssh2_transport_read_point1:
|
||||
rc = fullpacket(session, encrypted);
|
||||
if (rc == LIBSSH2_ERROR_EAGAIN) {
|
||||
|
||||
if (session->packAdd_state != libssh2_NB_state_idle)
|
||||
{
|
||||
/* fullpacket only returns LIBSSH2_ERROR_EAGAIN if
|
||||
* libssh2_packet_add returns LIBSSH2_ERROR_EAGAIN. If that
|
||||
* returns LIBSSH2_ERROR_EAGAIN but the packAdd_state is idle,
|
||||
* then the packet has been added to the brigade, but some
|
||||
* immediate action that was taken based on the packet
|
||||
* type (such as key re-exchange) is not yet complete.
|
||||
* Clear the way for a new packet to be read in.
|
||||
*/
|
||||
session->readPack_encrypted = encrypted;
|
||||
session->readPack_state = libssh2_NB_state_jump1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
p->total_num = 0; /* no packet buffer available */
|
||||
|
||||
return rc;
|
||||
}
|
||||
} while (1); /* loop */
|
||||
|
||||
return LIBSSH2_ERROR_SOCKET_RECV; /* we never reach this point */
|
||||
}
|
||||
|
||||
static int
|
||||
send_existing(LIBSSH2_SESSION *session, const unsigned char *data,
|
||||
size_t data_len, ssize_t *ret)
|
||||
{
|
||||
ssize_t rc;
|
||||
ssize_t length;
|
||||
struct transportpacket *p = &session->packet;
|
||||
|
||||
if (!p->olen) {
|
||||
*ret = 0;
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
/* send as much as possible of the existing packet */
|
||||
if ((data != p->odata) || (data_len != p->olen)) {
|
||||
/* When we are about to complete the sending of a packet, it is vital
|
||||
that the caller doesn't try to send a new/different packet since
|
||||
we don't add this one up until the previous one has been sent. To
|
||||
make the caller really notice his/hers flaw, we return error for
|
||||
this case */
|
||||
return LIBSSH2_ERROR_BAD_USE;
|
||||
}
|
||||
|
||||
*ret = 1; /* set to make our parent return */
|
||||
|
||||
/* number of bytes left to send */
|
||||
length = p->ototal_num - p->osent;
|
||||
|
||||
rc = LIBSSH2_SEND(session, &p->outbuf[p->osent], length,
|
||||
LIBSSH2_SOCKET_SEND_FLAGS(session));
|
||||
if (rc < 0)
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET,
|
||||
"Error sending %d bytes: %d", length, -rc);
|
||||
else {
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET,
|
||||
"Sent %d/%d bytes at %p+%d", rc, length, p->outbuf,
|
||||
p->osent);
|
||||
debugdump(session, "libssh2_transport_write send()",
|
||||
&p->outbuf[p->osent], rc);
|
||||
}
|
||||
|
||||
if (rc == length) {
|
||||
/* the remainder of the package was sent */
|
||||
p->ototal_num = 0;
|
||||
p->olen = 0;
|
||||
/* we leave *ret set so that the parent returns as we MUST return back
|
||||
a send success now, so that we don't risk sending EAGAIN later
|
||||
which then would confuse the parent function */
|
||||
return LIBSSH2_ERROR_NONE;
|
||||
|
||||
}
|
||||
else if (rc < 0) {
|
||||
/* nothing was sent */
|
||||
if (rc != -EAGAIN)
|
||||
/* send failure! */
|
||||
return LIBSSH2_ERROR_SOCKET_SEND;
|
||||
|
||||
session->socket_block_directions |= LIBSSH2_SESSION_BLOCK_OUTBOUND;
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
}
|
||||
|
||||
p->osent += rc; /* we sent away this much data */
|
||||
|
||||
return rc < length ? LIBSSH2_ERROR_EAGAIN : LIBSSH2_ERROR_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_transport_send
|
||||
*
|
||||
* Send a packet, encrypting it and adding a MAC code if necessary
|
||||
* Returns 0 on success, non-zero on failure.
|
||||
*
|
||||
* The data is provided as _two_ data areas that are combined by this
|
||||
* function. The 'data' part is sent immediately before 'data2'. 'data2' may
|
||||
* be set to NULL to only use a single part.
|
||||
*
|
||||
* Returns LIBSSH2_ERROR_EAGAIN if it would block or if the whole packet was
|
||||
* not sent yet. If it does so, the caller should call this function again as
|
||||
* soon as it is likely that more data can be sent, and this function MUST
|
||||
* then be called with the same argument set (same data pointer and same
|
||||
* data_len) until ERROR_NONE or failure is returned.
|
||||
*
|
||||
* This function DOES NOT call _libssh2_error() on any errors.
|
||||
*/
|
||||
int _libssh2_transport_send(LIBSSH2_SESSION *session,
|
||||
const unsigned char *data, size_t data_len,
|
||||
const unsigned char *data2, size_t data2_len)
|
||||
{
|
||||
int blocksize =
|
||||
(session->state & LIBSSH2_STATE_NEWKEYS) ?
|
||||
session->local.crypt->blocksize : 8;
|
||||
int padding_length;
|
||||
size_t packet_length;
|
||||
int total_length;
|
||||
#ifdef RANDOM_PADDING
|
||||
int rand_max;
|
||||
int seed = data[0]; /* FIXME: make this random */
|
||||
#endif
|
||||
struct transportpacket *p = &session->packet;
|
||||
int encrypted;
|
||||
ssize_t ret;
|
||||
int rc;
|
||||
const unsigned char *orgdata = data;
|
||||
size_t orgdata_len = data_len;
|
||||
|
||||
/*
|
||||
* If the last read operation was interrupted in the middle of a key
|
||||
* exchange, we must complete that key exchange before continuing to write
|
||||
* further data.
|
||||
*
|
||||
* See the similar block in _libssh2_transport_read for more details.
|
||||
*/
|
||||
if (session->state & LIBSSH2_STATE_EXCHANGING_KEYS &&
|
||||
!(session->state & LIBSSH2_STATE_KEX_ACTIVE)) {
|
||||
/* Don't write any new packets if we're still in the middle of a key
|
||||
* exchange. */
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_TRANS, "Redirecting into the"
|
||||
" key re-exchange from _libssh2_transport_send");
|
||||
rc = _libssh2_kex_exchange(session, 1, &session->startup_key_state);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
debugdump(session, "libssh2_transport_write plain", data, data_len);
|
||||
if(data2)
|
||||
debugdump(session, "libssh2_transport_write plain2", data2, data2_len);
|
||||
|
||||
/* FIRST, check if we have a pending write to complete. send_existing
|
||||
only sanity-check data and data_len and not data2 and data2_len!! */
|
||||
rc = send_existing(session, data, data_len, &ret);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
session->socket_block_directions &= ~LIBSSH2_SESSION_BLOCK_OUTBOUND;
|
||||
|
||||
if (ret)
|
||||
/* set by send_existing if data was sent */
|
||||
return rc;
|
||||
|
||||
encrypted = (session->state & LIBSSH2_STATE_NEWKEYS) ? 1 : 0;
|
||||
|
||||
if (encrypted && session->local.comp->compress) {
|
||||
/* the idea here is that these function must fail if the output gets
|
||||
larger than what fits in the assigned buffer so thus they don't
|
||||
check the input size as we don't know how much it compresses */
|
||||
size_t dest_len = MAX_SSH_PACKET_LEN-5-256;
|
||||
size_t dest2_len = dest_len;
|
||||
|
||||
/* compress directly to the target buffer */
|
||||
rc = session->local.comp->comp(session,
|
||||
&p->outbuf[5], &dest_len,
|
||||
data, data_len,
|
||||
&session->local.comp_abstract);
|
||||
if(rc)
|
||||
return rc; /* compression failure */
|
||||
|
||||
if(data2 && data2_len) {
|
||||
/* compress directly to the target buffer right after where the
|
||||
previous call put data */
|
||||
dest2_len -= dest_len;
|
||||
|
||||
rc = session->local.comp->comp(session,
|
||||
&p->outbuf[5+dest_len], &dest2_len,
|
||||
data2, data2_len,
|
||||
&session->local.comp_abstract);
|
||||
}
|
||||
else
|
||||
dest2_len = 0;
|
||||
if(rc)
|
||||
return rc; /* compression failure */
|
||||
|
||||
data_len = dest_len + dest2_len; /* use the combined length */
|
||||
}
|
||||
else {
|
||||
if((data_len + data2_len) >= (MAX_SSH_PACKET_LEN-0x100))
|
||||
/* too large packet, return error for this until we make this
|
||||
function split it up and send multiple SSH packets */
|
||||
return LIBSSH2_ERROR_INVAL;
|
||||
|
||||
/* copy the payload data */
|
||||
memcpy(&p->outbuf[5], data, data_len);
|
||||
if(data2 && data2_len)
|
||||
memcpy(&p->outbuf[5+data_len], data2, data2_len);
|
||||
data_len += data2_len; /* use the combined length */
|
||||
}
|
||||
|
||||
|
||||
/* RFC4253 says: Note that the length of the concatenation of
|
||||
'packet_length', 'padding_length', 'payload', and 'random padding'
|
||||
MUST be a multiple of the cipher block size or 8, whichever is
|
||||
larger. */
|
||||
|
||||
/* Plain math: (4 + 1 + packet_length + padding_length) % blocksize == 0 */
|
||||
|
||||
packet_length = data_len + 1 + 4; /* 1 is for padding_length field
|
||||
4 for the packet_length field */
|
||||
|
||||
/* at this point we have it all except the padding */
|
||||
|
||||
/* first figure out our minimum padding amount to make it an even
|
||||
block size */
|
||||
padding_length = blocksize - (packet_length % blocksize);
|
||||
|
||||
/* if the padding becomes too small we add another blocksize worth
|
||||
of it (taken from the original libssh2 where it didn't have any
|
||||
real explanation) */
|
||||
if (padding_length < 4) {
|
||||
padding_length += blocksize;
|
||||
}
|
||||
#ifdef RANDOM_PADDING
|
||||
/* FIXME: we can add padding here, but that also makes the packets
|
||||
bigger etc */
|
||||
|
||||
/* now we can add 'blocksize' to the padding_length N number of times
|
||||
(to "help thwart traffic analysis") but it must be less than 255 in
|
||||
total */
|
||||
rand_max = (255 - padding_length) / blocksize + 1;
|
||||
padding_length += blocksize * (seed % rand_max);
|
||||
#endif
|
||||
|
||||
packet_length += padding_length;
|
||||
|
||||
/* append the MAC length to the total_length size */
|
||||
total_length =
|
||||
packet_length + (encrypted ? session->local.mac->mac_len : 0);
|
||||
|
||||
/* store packet_length, which is the size of the whole packet except
|
||||
the MAC and the packet_length field itself */
|
||||
_libssh2_htonu32(p->outbuf, packet_length - 4);
|
||||
/* store padding_length */
|
||||
p->outbuf[4] = padding_length;
|
||||
|
||||
/* fill the padding area with random junk */
|
||||
_libssh2_random(p->outbuf + 5 + data_len, padding_length);
|
||||
|
||||
if (encrypted) {
|
||||
size_t i;
|
||||
|
||||
/* Calculate MAC hash. Put the output at index packet_length,
|
||||
since that size includes the whole packet. The MAC is
|
||||
calculated on the entire unencrypted packet, including all
|
||||
fields except the MAC field itself. */
|
||||
session->local.mac->hash(session, p->outbuf + packet_length,
|
||||
session->local.seqno, p->outbuf,
|
||||
packet_length, NULL, 0,
|
||||
&session->local.mac_abstract);
|
||||
|
||||
/* Encrypt the whole packet data, one block size at a time.
|
||||
The MAC field is not encrypted. */
|
||||
for(i = 0; i < packet_length; i += session->local.crypt->blocksize) {
|
||||
unsigned char *ptr = &p->outbuf[i];
|
||||
if (session->local.crypt->crypt(session, ptr,
|
||||
&session->local.crypt_abstract))
|
||||
return LIBSSH2_ERROR_ENCRYPT; /* encryption failure */
|
||||
}
|
||||
}
|
||||
|
||||
session->local.seqno++;
|
||||
|
||||
ret = LIBSSH2_SEND(session, p->outbuf, total_length,
|
||||
LIBSSH2_SOCKET_SEND_FLAGS(session));
|
||||
if (ret < 0)
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET,
|
||||
"Error sending %d bytes: %d", total_length, -ret);
|
||||
else {
|
||||
_libssh2_debug(session, LIBSSH2_TRACE_SOCKET, "Sent %d/%d bytes at %p",
|
||||
ret, total_length, p->outbuf);
|
||||
debugdump(session, "libssh2_transport_write send()", p->outbuf, ret);
|
||||
}
|
||||
|
||||
if (ret != total_length) {
|
||||
if (ret >= 0 || ret == -EAGAIN) {
|
||||
/* the whole packet could not be sent, save the rest */
|
||||
session->socket_block_directions |= LIBSSH2_SESSION_BLOCK_OUTBOUND;
|
||||
p->odata = orgdata;
|
||||
p->olen = orgdata_len;
|
||||
p->osent = ret <= 0 ? 0 : ret;
|
||||
p->ototal_num = total_length;
|
||||
return LIBSSH2_ERROR_EAGAIN;
|
||||
}
|
||||
return LIBSSH2_ERROR_SOCKET_SEND;
|
||||
}
|
||||
|
||||
/* the whole thing got sent away */
|
||||
p->odata = NULL;
|
||||
p->olen = 0;
|
||||
|
||||
return LIBSSH2_ERROR_NONE; /* all is good */
|
||||
}
|
||||
87
vendor/libssh2-1.4.2/src/transport.h
vendored
Normal file
87
vendor/libssh2-1.4.2/src/transport.h
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#ifndef __LIBSSH2_TRANSPORT_H
|
||||
#define __LIBSSH2_TRANSPORT_H
|
||||
|
||||
/* Copyright (C) 2007 The Written Word, Inc. All rights reserved.
|
||||
* Copyright (C) 2009-2010 by Daniel Stenberg
|
||||
* Author: Daniel Stenberg <daniel@haxx.se>
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* This file handles reading and writing to the SECSH transport layer. RFC4253.
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
#include "packet.h"
|
||||
|
||||
|
||||
/*
|
||||
* libssh2_transport_send
|
||||
*
|
||||
* Send a packet, encrypting it and adding a MAC code if necessary
|
||||
* Returns 0 on success, non-zero on failure.
|
||||
*
|
||||
* The data is provided as _two_ data areas that are combined by this
|
||||
* function. The 'data' part is sent immediately before 'data2'. 'data2' can
|
||||
* be set to NULL (or data2_len to 0) to only use a single part.
|
||||
*
|
||||
* Returns LIBSSH2_ERROR_EAGAIN if it would block or if the whole packet was
|
||||
* not sent yet. If it does so, the caller should call this function again as
|
||||
* soon as it is likely that more data can be sent, and this function MUST
|
||||
* then be called with the same argument set (same data pointer and same
|
||||
* data_len) until ERROR_NONE or failure is returned.
|
||||
*
|
||||
* This function DOES NOT call _libssh2_error() on any errors.
|
||||
*/
|
||||
int _libssh2_transport_send(LIBSSH2_SESSION *session,
|
||||
const unsigned char *data, size_t data_len,
|
||||
const unsigned char *data2, size_t data2_len);
|
||||
|
||||
/*
|
||||
* _libssh2_transport_read
|
||||
*
|
||||
* Collect a packet into the input brigade block only controls whether or not
|
||||
* to wait for a packet to start.
|
||||
*
|
||||
* Returns packet type added to input brigade (PACKET_NONE if nothing added),
|
||||
* or PACKET_FAIL on failure and PACKET_EAGAIN if it couldn't process a full
|
||||
* packet.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function reads the binary stream as specified in chapter 6 of RFC4253
|
||||
* "The Secure Shell (SSH) Transport Layer Protocol"
|
||||
*/
|
||||
int _libssh2_transport_read(LIBSSH2_SESSION * session);
|
||||
|
||||
#endif /* __LIBSSH2_TRANSPORT_H */
|
||||
1687
vendor/libssh2-1.4.2/src/userauth.c
vendored
Normal file
1687
vendor/libssh2-1.4.2/src/userauth.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
50
vendor/libssh2-1.4.2/src/userauth.h
vendored
Normal file
50
vendor/libssh2-1.4.2/src/userauth.h
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#ifndef LIBSSH2_USERAUTH_H
|
||||
#define LIBSSH2_USERAUTH_H
|
||||
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
|
||||
* Copyright (c) 2009-2010 by Daniel Stenberg
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
int
|
||||
_libssh2_userauth_publickey(LIBSSH2_SESSION *session,
|
||||
const char *username,
|
||||
unsigned int username_len,
|
||||
const unsigned char *pubkeydata,
|
||||
unsigned long pubkeydata_len,
|
||||
LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC((*sign_callback)),
|
||||
void *abstract);
|
||||
|
||||
#endif /* LIBSSH2_USERAUTH_H */
|
||||
54
vendor/libssh2-1.4.2/src/version.c
vendored
Normal file
54
vendor/libssh2-1.4.2/src/version.c
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/* Copyright (C) 2009 Daniel Stenberg. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names
|
||||
* of any other contributors may be used to endorse or
|
||||
* promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "libssh2_priv.h"
|
||||
|
||||
/*
|
||||
libssh2_version() can be used like this:
|
||||
|
||||
if (!libssh2_version(LIBSSH2_VERSION_NUM)) {
|
||||
fprintf (stderr, "Runtime libssh2 version too old!\n");
|
||||
exit(1);
|
||||
}
|
||||
*/
|
||||
LIBSSH2_API
|
||||
const char *libssh2_version(int req_version_num)
|
||||
{
|
||||
if(req_version_num <= LIBSSH2_VERSION_NUM)
|
||||
return LIBSSH2_VERSION;
|
||||
return NULL; /* this is not a suitable library! */
|
||||
}
|
||||
16
vendor/sigar/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
16
vendor/sigar/CMakeFiles/CMakeDirectoryInformation.cmake
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# Relative path conversion top directories.
|
||||
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/dlarimer/projects/AthenaRuntime")
|
||||
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/dlarimer/projects/AthenaRuntime")
|
||||
|
||||
# Force unix paths in dependencies.
|
||||
SET(CMAKE_FORCE_UNIX_PATHS 1)
|
||||
|
||||
|
||||
# The C and CXX include file regular expressions for this directory.
|
||||
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
||||
1
vendor/sigar/CMakeFiles/progress.marks
vendored
Normal file
1
vendor/sigar/CMakeFiles/progress.marks
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
5
|
||||
8
vendor/sigar/CMakeFiles/sigar.dir/C.includecache
vendored
Normal file
8
vendor/sigar/CMakeFiles/sigar.dir/C.includecache
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
|
||||
|
||||
#IncludeRegexScan: ^.*$
|
||||
|
||||
#IncludeRegexComplain: ^$
|
||||
|
||||
#IncludeRegexTransform:
|
||||
|
||||
43
vendor/sigar/CMakeFiles/sigar.dir/DependInfo.cmake
vendored
Normal file
43
vendor/sigar/CMakeFiles/sigar.dir/DependInfo.cmake
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# The set of languages for which implicit dependencies are needed:
|
||||
SET(CMAKE_DEPENDS_LANGUAGES
|
||||
"C"
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
SET(CMAKE_DEPENDS_CHECK_C
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_cache.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_fileinfo.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_format.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_getline.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_ptql.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_signal.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_util.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o"
|
||||
"/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_version_autoconf.c" "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o"
|
||||
)
|
||||
SET(CMAKE_C_COMPILER_ID "GNU")
|
||||
|
||||
# Preprocessor definitions for this target.
|
||||
SET(CMAKE_TARGET_DEFINITIONS
|
||||
"DARWIN_HAS_LIBPROC_H"
|
||||
)
|
||||
|
||||
# Targets to which this target links.
|
||||
SET(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
)
|
||||
|
||||
# The include file search paths:
|
||||
SET(CMAKE_C_TARGET_INCLUDE_PATH
|
||||
"."
|
||||
"/usr/local/include"
|
||||
"vendor/fc/include"
|
||||
"libs/cpparchive/include"
|
||||
"/opt/local/include"
|
||||
"libs/fa/include"
|
||||
"vendor/fc/vendor/libssh2-1.4.2/include"
|
||||
"vendor/fc/vendor/sigar/include"
|
||||
"vendor/fc/vendor/sigar/src/os/darwin"
|
||||
)
|
||||
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||
337
vendor/sigar/CMakeFiles/sigar.dir/build.make
vendored
Normal file
337
vendor/sigar/CMakeFiles/sigar.dir/build.make
vendored
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /opt/local/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /opt/local/bin/cmake -E remove -f
|
||||
|
||||
# The program to use to edit the cache.
|
||||
CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# Include any dependencies generated for this target.
|
||||
include vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/depend.make
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/progress.make
|
||||
|
||||
# Include the compile flags for this target's objects.
|
||||
include vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_1)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c > CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c -o CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: vendor/fc/vendor/sigar/src/sigar.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_2)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar.c > CMakeFiles/sigar.dir/src/sigar.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar.c -o CMakeFiles/sigar.dir/src/sigar.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: vendor/fc/vendor/sigar/src/sigar_cache.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_3)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_cache.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_cache.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_cache.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_cache.c > CMakeFiles/sigar.dir/src/sigar_cache.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_cache.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_cache.c -o CMakeFiles/sigar.dir/src/sigar_cache.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: vendor/fc/vendor/sigar/src/sigar_fileinfo.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_4)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_fileinfo.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_fileinfo.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_fileinfo.c > CMakeFiles/sigar.dir/src/sigar_fileinfo.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_fileinfo.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_fileinfo.c -o CMakeFiles/sigar.dir/src/sigar_fileinfo.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: vendor/fc/vendor/sigar/src/sigar_format.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_5)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_format.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_format.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_format.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_format.c > CMakeFiles/sigar.dir/src/sigar_format.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_format.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_format.c -o CMakeFiles/sigar.dir/src/sigar_format.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: vendor/fc/vendor/sigar/src/sigar_getline.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_6)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_getline.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_getline.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_getline.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_getline.c > CMakeFiles/sigar.dir/src/sigar_getline.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_getline.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_getline.c -o CMakeFiles/sigar.dir/src/sigar_getline.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: vendor/fc/vendor/sigar/src/sigar_ptql.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_7)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_ptql.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_ptql.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_ptql.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_ptql.c > CMakeFiles/sigar.dir/src/sigar_ptql.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_ptql.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_ptql.c -o CMakeFiles/sigar.dir/src/sigar_ptql.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: vendor/fc/vendor/sigar/src/sigar_signal.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_8)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_signal.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_signal.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_signal.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_signal.c > CMakeFiles/sigar.dir/src/sigar_signal.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_signal.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_signal.c -o CMakeFiles/sigar.dir/src/sigar_signal.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: vendor/fc/vendor/sigar/src/sigar_util.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_9)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_util.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_util.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_util.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_util.c > CMakeFiles/sigar.dir/src/sigar_util.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_util.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_util.c -o CMakeFiles/sigar.dir/src/sigar_util.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/flags.make
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o: vendor/fc/vendor/sigar/src/sigar_version_autoconf.c
|
||||
$(CMAKE_COMMAND) -E cmake_progress_report /Users/dlarimer/projects/AthenaRuntime/CMakeFiles $(CMAKE_PROGRESS_10)
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o -c /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_version_autoconf.c
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.i"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -E /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_version_autoconf.c > CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.i
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.s"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && /opt/local/bin/gcc $(C_DEFINES) $(C_FLAGS) -S /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_version_autoconf.c -o CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.s
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.requires:
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.provides: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.requires
|
||||
$(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.provides.build
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.provides
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.provides.build: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o
|
||||
|
||||
# Object files for target sigar
|
||||
sigar_OBJECTS = \
|
||||
"CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_cache.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_format.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_getline.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_ptql.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_signal.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_util.c.o" \
|
||||
"CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o"
|
||||
|
||||
# External object files for target sigar
|
||||
sigar_EXTERNAL_OBJECTS =
|
||||
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make
|
||||
vendor/fc/vendor/sigar/libsigar.a: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/link.txt
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking C static library libsigar.a"
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && $(CMAKE_COMMAND) -P CMakeFiles/sigar.dir/cmake_clean_target.cmake
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/sigar.dir/link.txt --verbose=$(VERBOSE)
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build: vendor/fc/vendor/sigar/libsigar.a
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o.requires
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o.requires
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/requires
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/clean:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar && $(CMAKE_COMMAND) -P CMakeFiles/sigar.dir/cmake_clean.cmake
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/clean
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/depend:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/dlarimer/projects/AthenaRuntime /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar /Users/dlarimer/projects/AthenaRuntime /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/depend
|
||||
|
||||
19
vendor/sigar/CMakeFiles/sigar.dir/cmake_clean.cmake
vendored
Normal file
19
vendor/sigar/CMakeFiles/sigar.dir/cmake_clean.cmake
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FILE(REMOVE_RECURSE
|
||||
"CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_cache.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_format.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_getline.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_ptql.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_signal.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_util.c.o"
|
||||
"CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o"
|
||||
"libsigar.pdb"
|
||||
"libsigar.a"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
FOREACH(lang C)
|
||||
INCLUDE(CMakeFiles/sigar.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
ENDFOREACH(lang)
|
||||
3
vendor/sigar/CMakeFiles/sigar.dir/cmake_clean_target.cmake
vendored
Normal file
3
vendor/sigar/CMakeFiles/sigar.dir/cmake_clean_target.cmake
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
FILE(REMOVE_RECURSE
|
||||
"libsigar.a"
|
||||
)
|
||||
98
vendor/sigar/CMakeFiles/sigar.dir/depend.internal
vendored
Normal file
98
vendor/sigar/CMakeFiles/sigar.dir/depend.internal
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
/opt/local/include/dlfcn.h
|
||||
/opt/local/include/mach-o/dyld.h
|
||||
/opt/local/include/mach-o/loader.h
|
||||
/opt/local/include/mach/machine.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/opt/local/include/mach-o/dyld.h
|
||||
/opt/local/include/mach-o/loader.h
|
||||
/opt/local/include/mach/machine.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_format.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_cache.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_fileinfo.c
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_fileinfo.h
|
||||
/usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_format.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/opt/local/include/mach-o/dyld.h
|
||||
/opt/local/include/mach-o/loader.h
|
||||
/opt/local/include/mach/machine.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_format.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_getline.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_getline.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_ptql.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/opt/local/include/mach-o/dyld.h
|
||||
/opt/local/include/mach-o/loader.h
|
||||
/opt/local/include/mach/machine.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_signal.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_util.c
|
||||
/opt/local/include/dlfcn.h
|
||||
/opt/local/include/mach-o/dyld.h
|
||||
/opt/local/include/mach-o/loader.h
|
||||
/opt/local/include/mach/machine.h
|
||||
/usr/local/include/sigar.h
|
||||
/usr/local/include/sigar_log.h
|
||||
/usr/local/include/sigar_private.h
|
||||
/usr/local/include/sigar_ptql.h
|
||||
/usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o
|
||||
/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/sigar_version_autoconf.c
|
||||
/usr/local/include/sigar.h
|
||||
98
vendor/sigar/CMakeFiles/sigar.dir/depend.make
vendored
Normal file
98
vendor/sigar/CMakeFiles/sigar.dir/depend.make
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: vendor/fc/vendor/sigar/src/os/darwin/darwin_sigar.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /opt/local/include/mach-o/dyld.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /opt/local/include/mach-o/loader.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /opt/local/include/mach/machine.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o: /usr/local/include/sigar_util.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: vendor/fc/vendor/sigar/src/sigar.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /opt/local/include/mach-o/dyld.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /opt/local/include/mach-o/loader.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /opt/local/include/mach/machine.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar_format.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: /usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o: vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: vendor/fc/vendor/sigar/src/sigar_cache.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o: /usr/local/include/sigar_util.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: vendor/fc/vendor/sigar/src/sigar_fileinfo.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: /usr/local/include/sigar_fileinfo.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o: /usr/local/include/sigar_log.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: vendor/fc/vendor/sigar/src/sigar_format.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /opt/local/include/mach-o/dyld.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /opt/local/include/mach-o/loader.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /opt/local/include/mach/machine.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar_format.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: /usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o: vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: vendor/fc/vendor/sigar/src/sigar_getline.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar_getline.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o: /usr/local/include/sigar_util.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: vendor/fc/vendor/sigar/src/sigar_ptql.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /opt/local/include/mach-o/dyld.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /opt/local/include/mach-o/loader.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /opt/local/include/mach/machine.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: /usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o: vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: vendor/fc/vendor/sigar/src/sigar_signal.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o: /usr/local/include/sigar_util.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: vendor/fc/vendor/sigar/src/sigar_util.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /opt/local/include/dlfcn.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /opt/local/include/mach-o/dyld.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /opt/local/include/mach-o/loader.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /opt/local/include/mach/machine.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /usr/local/include/sigar.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /usr/local/include/sigar_log.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /usr/local/include/sigar_private.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /usr/local/include/sigar_ptql.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: /usr/local/include/sigar_util.h
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o: vendor/fc/vendor/sigar/src/os/darwin/sigar_os.h
|
||||
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o: vendor/fc/vendor/sigar/src/sigar_version_autoconf.c
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o: /usr/local/include/sigar.h
|
||||
|
||||
8
vendor/sigar/CMakeFiles/sigar.dir/flags.make
vendored
Normal file
8
vendor/sigar/CMakeFiles/sigar.dir/flags.make
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# compile C with /opt/local/bin/gcc
|
||||
C_FLAGS = -O3 -DNDEBUG -I/Users/dlarimer/projects/AthenaRuntime -I/usr/local/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/include -I/Users/dlarimer/projects/AthenaRuntime/libs/cpparchive/include -I/opt/local/include -I/Users/dlarimer/projects/AthenaRuntime/libs/fa/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/libssh2-1.4.2/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/include -I/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/src/os/darwin
|
||||
|
||||
C_DEFINES = -DDARWIN_HAS_LIBPROC_H
|
||||
|
||||
2
vendor/sigar/CMakeFiles/sigar.dir/link.txt
vendored
Normal file
2
vendor/sigar/CMakeFiles/sigar.dir/link.txt
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/opt/local/bin/ar cr libsigar.a CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o CMakeFiles/sigar.dir/src/sigar.c.o CMakeFiles/sigar.dir/src/sigar_cache.c.o CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o CMakeFiles/sigar.dir/src/sigar_format.c.o CMakeFiles/sigar.dir/src/sigar_getline.c.o CMakeFiles/sigar.dir/src/sigar_ptql.c.o CMakeFiles/sigar.dir/src/sigar_signal.c.o CMakeFiles/sigar.dir/src/sigar_util.c.o CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o
|
||||
/opt/local/bin/ranlib libsigar.a
|
||||
11
vendor/sigar/CMakeFiles/sigar.dir/progress.make
vendored
Normal file
11
vendor/sigar/CMakeFiles/sigar.dir/progress.make
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
CMAKE_PROGRESS_1 =
|
||||
CMAKE_PROGRESS_2 = 70
|
||||
CMAKE_PROGRESS_3 =
|
||||
CMAKE_PROGRESS_4 = 71
|
||||
CMAKE_PROGRESS_5 =
|
||||
CMAKE_PROGRESS_6 = 72
|
||||
CMAKE_PROGRESS_7 =
|
||||
CMAKE_PROGRESS_8 = 73
|
||||
CMAKE_PROGRESS_9 =
|
||||
CMAKE_PROGRESS_10 = 74
|
||||
|
||||
33
vendor/sigar/CMakeLists.txt
vendored
Normal file
33
vendor/sigar/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
INCLUDE_DIRECTORIES(include)
|
||||
|
||||
|
||||
IF(WIN32)
|
||||
INCLUDE_DIRECTORIES(src/os/win32)
|
||||
SET( os_sources src/os/win32/peb.c src/os/win32/wmi.cpp src/os/win32/win32_sigar.c )
|
||||
ELSE(WIN32)
|
||||
IF( APPLE )
|
||||
ADD_DEFINITIONS( -DDARWIN_HAS_LIBPROC_H )
|
||||
INCLUDE_DIRECTORIES(src/os/darwin)
|
||||
SET( os_sources src/os/darwin/darwin_sigar.c )
|
||||
ELSE( APPLE )
|
||||
INCLUDE_DIRECTORIES(src/os/linux)
|
||||
SET( os_sources src/os/linux/linux_sigar.c )
|
||||
ENDIF( APPLE )
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
SET( sources
|
||||
${os_sources}
|
||||
src/sigar.c
|
||||
src/sigar_cache.c
|
||||
src/sigar_fileinfo.c
|
||||
src/sigar_format.c
|
||||
src/sigar_getline.c
|
||||
src/sigar_ptql.c
|
||||
src/sigar_signal.c
|
||||
src/sigar_util.c
|
||||
src/sigar_version_autoconf.c
|
||||
)
|
||||
|
||||
SETUP_LIBRARY( sigar SOURCES ${sources} LIBRARIES ${libraries} LIBRARY_TYPE STATIC )
|
||||
452
vendor/sigar/Makefile
vendored
Normal file
452
vendor/sigar/Makefile
vendored
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /opt/local/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /opt/local/bin/cmake -E remove -f
|
||||
|
||||
# The program to use to edit the cache.
|
||||
CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/dlarimer/projects/AthenaRuntime
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/opt/local/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/opt/local/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/opt/local/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: install/local
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: install/strip
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/opt/local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -E cmake_progress_start /Users/dlarimer/projects/AthenaRuntime/CMakeFiles /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/CMakeFiles/progress.marks
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/sigar/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /Users/dlarimer/projects/AthenaRuntime/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/sigar/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/sigar/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/sigar/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/rule:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f CMakeFiles/Makefile2 vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/rule
|
||||
.PHONY : vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
sigar: vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/rule
|
||||
.PHONY : sigar
|
||||
|
||||
# fast build rule for target.
|
||||
sigar/fast:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build
|
||||
.PHONY : sigar/fast
|
||||
|
||||
src/os/darwin/darwin_sigar.o: src/os/darwin/darwin_sigar.c.o
|
||||
.PHONY : src/os/darwin/darwin_sigar.o
|
||||
|
||||
# target to build an object file
|
||||
src/os/darwin/darwin_sigar.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.o
|
||||
.PHONY : src/os/darwin/darwin_sigar.c.o
|
||||
|
||||
src/os/darwin/darwin_sigar.i: src/os/darwin/darwin_sigar.c.i
|
||||
.PHONY : src/os/darwin/darwin_sigar.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/os/darwin/darwin_sigar.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.i
|
||||
.PHONY : src/os/darwin/darwin_sigar.c.i
|
||||
|
||||
src/os/darwin/darwin_sigar.s: src/os/darwin/darwin_sigar.c.s
|
||||
.PHONY : src/os/darwin/darwin_sigar.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/os/darwin/darwin_sigar.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/os/darwin/darwin_sigar.c.s
|
||||
.PHONY : src/os/darwin/darwin_sigar.c.s
|
||||
|
||||
src/sigar.o: src/sigar.c.o
|
||||
.PHONY : src/sigar.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.o
|
||||
.PHONY : src/sigar.c.o
|
||||
|
||||
src/sigar.i: src/sigar.c.i
|
||||
.PHONY : src/sigar.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.i
|
||||
.PHONY : src/sigar.c.i
|
||||
|
||||
src/sigar.s: src/sigar.c.s
|
||||
.PHONY : src/sigar.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar.c.s
|
||||
.PHONY : src/sigar.c.s
|
||||
|
||||
src/sigar_cache.o: src/sigar_cache.c.o
|
||||
.PHONY : src/sigar_cache.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_cache.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.o
|
||||
.PHONY : src/sigar_cache.c.o
|
||||
|
||||
src/sigar_cache.i: src/sigar_cache.c.i
|
||||
.PHONY : src/sigar_cache.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_cache.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.i
|
||||
.PHONY : src/sigar_cache.c.i
|
||||
|
||||
src/sigar_cache.s: src/sigar_cache.c.s
|
||||
.PHONY : src/sigar_cache.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_cache.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_cache.c.s
|
||||
.PHONY : src/sigar_cache.c.s
|
||||
|
||||
src/sigar_fileinfo.o: src/sigar_fileinfo.c.o
|
||||
.PHONY : src/sigar_fileinfo.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_fileinfo.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.o
|
||||
.PHONY : src/sigar_fileinfo.c.o
|
||||
|
||||
src/sigar_fileinfo.i: src/sigar_fileinfo.c.i
|
||||
.PHONY : src/sigar_fileinfo.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_fileinfo.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.i
|
||||
.PHONY : src/sigar_fileinfo.c.i
|
||||
|
||||
src/sigar_fileinfo.s: src/sigar_fileinfo.c.s
|
||||
.PHONY : src/sigar_fileinfo.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_fileinfo.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_fileinfo.c.s
|
||||
.PHONY : src/sigar_fileinfo.c.s
|
||||
|
||||
src/sigar_format.o: src/sigar_format.c.o
|
||||
.PHONY : src/sigar_format.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_format.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.o
|
||||
.PHONY : src/sigar_format.c.o
|
||||
|
||||
src/sigar_format.i: src/sigar_format.c.i
|
||||
.PHONY : src/sigar_format.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_format.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.i
|
||||
.PHONY : src/sigar_format.c.i
|
||||
|
||||
src/sigar_format.s: src/sigar_format.c.s
|
||||
.PHONY : src/sigar_format.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_format.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_format.c.s
|
||||
.PHONY : src/sigar_format.c.s
|
||||
|
||||
src/sigar_getline.o: src/sigar_getline.c.o
|
||||
.PHONY : src/sigar_getline.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_getline.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.o
|
||||
.PHONY : src/sigar_getline.c.o
|
||||
|
||||
src/sigar_getline.i: src/sigar_getline.c.i
|
||||
.PHONY : src/sigar_getline.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_getline.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.i
|
||||
.PHONY : src/sigar_getline.c.i
|
||||
|
||||
src/sigar_getline.s: src/sigar_getline.c.s
|
||||
.PHONY : src/sigar_getline.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_getline.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_getline.c.s
|
||||
.PHONY : src/sigar_getline.c.s
|
||||
|
||||
src/sigar_ptql.o: src/sigar_ptql.c.o
|
||||
.PHONY : src/sigar_ptql.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_ptql.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.o
|
||||
.PHONY : src/sigar_ptql.c.o
|
||||
|
||||
src/sigar_ptql.i: src/sigar_ptql.c.i
|
||||
.PHONY : src/sigar_ptql.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_ptql.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.i
|
||||
.PHONY : src/sigar_ptql.c.i
|
||||
|
||||
src/sigar_ptql.s: src/sigar_ptql.c.s
|
||||
.PHONY : src/sigar_ptql.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_ptql.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_ptql.c.s
|
||||
.PHONY : src/sigar_ptql.c.s
|
||||
|
||||
src/sigar_signal.o: src/sigar_signal.c.o
|
||||
.PHONY : src/sigar_signal.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_signal.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.o
|
||||
.PHONY : src/sigar_signal.c.o
|
||||
|
||||
src/sigar_signal.i: src/sigar_signal.c.i
|
||||
.PHONY : src/sigar_signal.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_signal.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.i
|
||||
.PHONY : src/sigar_signal.c.i
|
||||
|
||||
src/sigar_signal.s: src/sigar_signal.c.s
|
||||
.PHONY : src/sigar_signal.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_signal.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_signal.c.s
|
||||
.PHONY : src/sigar_signal.c.s
|
||||
|
||||
src/sigar_util.o: src/sigar_util.c.o
|
||||
.PHONY : src/sigar_util.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_util.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.o
|
||||
.PHONY : src/sigar_util.c.o
|
||||
|
||||
src/sigar_util.i: src/sigar_util.c.i
|
||||
.PHONY : src/sigar_util.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_util.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.i
|
||||
.PHONY : src/sigar_util.c.i
|
||||
|
||||
src/sigar_util.s: src/sigar_util.c.s
|
||||
.PHONY : src/sigar_util.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_util.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_util.c.s
|
||||
.PHONY : src/sigar_util.c.s
|
||||
|
||||
src/sigar_version_autoconf.o: src/sigar_version_autoconf.c.o
|
||||
.PHONY : src/sigar_version_autoconf.o
|
||||
|
||||
# target to build an object file
|
||||
src/sigar_version_autoconf.c.o:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.o
|
||||
.PHONY : src/sigar_version_autoconf.c.o
|
||||
|
||||
src/sigar_version_autoconf.i: src/sigar_version_autoconf.c.i
|
||||
.PHONY : src/sigar_version_autoconf.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/sigar_version_autoconf.c.i:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.i
|
||||
.PHONY : src/sigar_version_autoconf.c.i
|
||||
|
||||
src/sigar_version_autoconf.s: src/sigar_version_autoconf.c.s
|
||||
.PHONY : src/sigar_version_autoconf.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/sigar_version_autoconf.c.s:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(MAKE) -f vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/build.make vendor/fc/vendor/sigar/CMakeFiles/sigar.dir/src/sigar_version_autoconf.c.s
|
||||
.PHONY : src/sigar_version_autoconf.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... sigar"
|
||||
@echo "... src/os/darwin/darwin_sigar.o"
|
||||
@echo "... src/os/darwin/darwin_sigar.i"
|
||||
@echo "... src/os/darwin/darwin_sigar.s"
|
||||
@echo "... src/sigar.o"
|
||||
@echo "... src/sigar.i"
|
||||
@echo "... src/sigar.s"
|
||||
@echo "... src/sigar_cache.o"
|
||||
@echo "... src/sigar_cache.i"
|
||||
@echo "... src/sigar_cache.s"
|
||||
@echo "... src/sigar_fileinfo.o"
|
||||
@echo "... src/sigar_fileinfo.i"
|
||||
@echo "... src/sigar_fileinfo.s"
|
||||
@echo "... src/sigar_format.o"
|
||||
@echo "... src/sigar_format.i"
|
||||
@echo "... src/sigar_format.s"
|
||||
@echo "... src/sigar_getline.o"
|
||||
@echo "... src/sigar_getline.i"
|
||||
@echo "... src/sigar_getline.s"
|
||||
@echo "... src/sigar_ptql.o"
|
||||
@echo "... src/sigar_ptql.i"
|
||||
@echo "... src/sigar_ptql.s"
|
||||
@echo "... src/sigar_signal.o"
|
||||
@echo "... src/sigar_signal.i"
|
||||
@echo "... src/sigar_signal.s"
|
||||
@echo "... src/sigar_util.o"
|
||||
@echo "... src/sigar_util.i"
|
||||
@echo "... src/sigar_util.s"
|
||||
@echo "... src/sigar_version_autoconf.o"
|
||||
@echo "... src/sigar_version_autoconf.i"
|
||||
@echo "... src/sigar_version_autoconf.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /Users/dlarimer/projects/AthenaRuntime && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
37
vendor/sigar/cmake_install.cmake
vendored
Normal file
37
vendor/sigar/cmake_install.cmake
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Install script for directory: /Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar
|
||||
|
||||
# Set the install prefix
|
||||
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
IF(BUILD_TYPE)
|
||||
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
ELSE(BUILD_TYPE)
|
||||
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
||||
ENDIF(BUILD_TYPE)
|
||||
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
|
||||
# Set the component getting installed.
|
||||
IF(NOT CMAKE_INSTALL_COMPONENT)
|
||||
IF(COMPONENT)
|
||||
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
||||
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
ELSE(COMPONENT)
|
||||
SET(CMAKE_INSTALL_COMPONENT)
|
||||
ENDIF(COMPONENT)
|
||||
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
||||
|
||||
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
||||
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "/Users/dlarimer/projects/AthenaRuntime/vendor/fc/vendor/sigar/libsigar.a")
|
||||
IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libsigar.a" AND
|
||||
NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libsigar.a")
|
||||
EXECUTE_PROCESS(COMMAND "/opt/local/bin/ranlib" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libsigar.a")
|
||||
ENDIF()
|
||||
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
||||
|
||||
943
vendor/sigar/include/sigar.h
vendored
Normal file
943
vendor/sigar/include/sigar.h
vendored
Normal file
|
|
@ -0,0 +1,943 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2008 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
* Copyright (c) 2009-2010 VMware, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_H
|
||||
#define SIGAR_H
|
||||
|
||||
/* System Information Gatherer And Reporter */
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef MAX_INTERFACE_NAME_LEN
|
||||
#define MAX_INTERFACE_NAME_LEN 256
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_LP64) || \
|
||||
defined(__LP64__) || \
|
||||
defined(__64BIT__) || \
|
||||
defined(__powerpc64__) || \
|
||||
defined(__osf__)
|
||||
#define SIGAR_64BIT
|
||||
#endif
|
||||
|
||||
/* for printf sigar_uint64_t */
|
||||
#ifdef SIGAR_64BIT
|
||||
# define SIGAR_F_U64 "%lu"
|
||||
#else
|
||||
# define SIGAR_F_U64 "%Lu"
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
typedef unsigned __int32 sigar_uint32_t;
|
||||
|
||||
typedef unsigned __int64 sigar_uint64_t;
|
||||
|
||||
typedef __int32 sigar_int32_t;
|
||||
|
||||
typedef __int64 sigar_int64_t;
|
||||
|
||||
#elif ULONG_MAX > 4294967295UL
|
||||
|
||||
typedef unsigned int sigar_uint32_t;
|
||||
|
||||
typedef unsigned long sigar_uint64_t;
|
||||
|
||||
typedef int sigar_int32_t;
|
||||
|
||||
typedef long sigar_int64_t;
|
||||
|
||||
#else
|
||||
|
||||
typedef unsigned int sigar_uint32_t;
|
||||
|
||||
typedef unsigned long long sigar_uint64_t;
|
||||
|
||||
typedef int sigar_int32_t;
|
||||
|
||||
typedef long long sigar_int64_t;
|
||||
|
||||
#endif
|
||||
|
||||
#define SIGAR_FIELD_NOTIMPL -1
|
||||
|
||||
#define SIGAR_OK 0
|
||||
#define SIGAR_START_ERROR 20000
|
||||
#define SIGAR_ENOTIMPL (SIGAR_START_ERROR + 1)
|
||||
#define SIGAR_OS_START_ERROR (SIGAR_START_ERROR*2)
|
||||
|
||||
#ifdef WIN32
|
||||
# define SIGAR_ENOENT ERROR_FILE_NOT_FOUND
|
||||
# define SIGAR_EACCES ERROR_ACCESS_DENIED
|
||||
# define SIGAR_ENXIO ERROR_BAD_DRIVER_LEVEL
|
||||
#else
|
||||
# define SIGAR_ENOENT ENOENT
|
||||
# define SIGAR_EACCES EACCES
|
||||
# define SIGAR_ENXIO ENXIO
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define SIGAR_DECLARE(type) \
|
||||
__declspec(dllexport) type __stdcall
|
||||
#else
|
||||
# define SIGAR_DECLARE(type) type
|
||||
#endif
|
||||
|
||||
#if defined(PATH_MAX)
|
||||
# define SIGAR_PATH_MAX PATH_MAX
|
||||
#elif defined(MAXPATHLEN)
|
||||
# define SIGAR_PATH_MAX MAXPATHLEN
|
||||
#else
|
||||
# define SIGAR_PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
typedef sigar_uint64_t sigar_pid_t;
|
||||
typedef unsigned long sigar_uid_t;
|
||||
typedef unsigned long sigar_gid_t;
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
typedef pid_t sigar_pid_t;
|
||||
typedef uid_t sigar_uid_t;
|
||||
typedef gid_t sigar_gid_t;
|
||||
#endif
|
||||
|
||||
typedef struct sigar_t sigar_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_open(sigar_t **sigar);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_close(sigar_t *sigar);
|
||||
|
||||
SIGAR_DECLARE(sigar_pid_t) sigar_pid_get(sigar_t *sigar);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_kill(sigar_pid_t pid, int signum);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_signum_get(char *name);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_strerror(sigar_t *sigar, int err);
|
||||
|
||||
/* system memory info */
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
ram,
|
||||
total,
|
||||
used,
|
||||
free,
|
||||
actual_used,
|
||||
actual_free;
|
||||
double used_percent;
|
||||
double free_percent;
|
||||
} sigar_mem_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
total,
|
||||
used,
|
||||
free,
|
||||
page_in,
|
||||
page_out;
|
||||
} sigar_swap_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
user,
|
||||
sys,
|
||||
nice,
|
||||
idle,
|
||||
wait,
|
||||
irq,
|
||||
soft_irq,
|
||||
stolen,
|
||||
total;
|
||||
} sigar_cpu_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu);
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_cpu_t *data;
|
||||
} sigar_cpu_list_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_cpu_list_get(sigar_t *sigar, sigar_cpu_list_t *cpulist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_cpu_list_destroy(sigar_t *sigar,
|
||||
sigar_cpu_list_t *cpulist);
|
||||
|
||||
typedef struct {
|
||||
char vendor[128];
|
||||
char model[128];
|
||||
int mhz;
|
||||
int mhz_max;
|
||||
int mhz_min;
|
||||
sigar_uint64_t cache_size;
|
||||
int total_sockets;
|
||||
int total_cores;
|
||||
int cores_per_socket;
|
||||
} sigar_cpu_info_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_cpu_info_t *data;
|
||||
} sigar_cpu_info_list_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_cpu_info_list_get(sigar_t *sigar,
|
||||
sigar_cpu_info_list_t *cpu_infos);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_cpu_info_list_destroy(sigar_t *sigar,
|
||||
sigar_cpu_info_list_t *cpu_infos);
|
||||
|
||||
typedef struct {
|
||||
double uptime;
|
||||
} sigar_uptime_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_uptime_get(sigar_t *sigar,
|
||||
sigar_uptime_t *uptime);
|
||||
|
||||
typedef struct {
|
||||
double loadavg[3];
|
||||
} sigar_loadavg_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_loadavg_get(sigar_t *sigar,
|
||||
sigar_loadavg_t *loadavg);
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_pid_t *data;
|
||||
} sigar_proc_list_t;
|
||||
|
||||
typedef struct {
|
||||
/* RLIMIT_CPU */
|
||||
sigar_uint64_t cpu_cur, cpu_max;
|
||||
/* RLIMIT_FSIZE */
|
||||
sigar_uint64_t file_size_cur, file_size_max;
|
||||
/* PIPE_BUF */
|
||||
sigar_uint64_t pipe_size_cur, pipe_size_max;
|
||||
/* RLIMIT_DATA */
|
||||
sigar_uint64_t data_cur, data_max;
|
||||
/* RLIMIT_STACK */
|
||||
sigar_uint64_t stack_cur, stack_max;
|
||||
/* RLIMIT_CORE */
|
||||
sigar_uint64_t core_cur, core_max;
|
||||
/* RLIMIT_RSS */
|
||||
sigar_uint64_t memory_cur, memory_max;
|
||||
/* RLIMIT_NPROC */
|
||||
sigar_uint64_t processes_cur, processes_max;
|
||||
/* RLIMIT_NOFILE */
|
||||
sigar_uint64_t open_files_cur, open_files_max;
|
||||
/* RLIMIT_AS */
|
||||
sigar_uint64_t virtual_memory_cur, virtual_memory_max;
|
||||
} sigar_resource_limit_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_resource_limit_get(sigar_t *sigar,
|
||||
sigar_resource_limit_t *rlimit);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_list_get(sigar_t *sigar,
|
||||
sigar_proc_list_t *proclist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_list_destroy(sigar_t *sigar,
|
||||
sigar_proc_list_t *proclist);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t total;
|
||||
sigar_uint64_t sleeping;
|
||||
sigar_uint64_t running;
|
||||
sigar_uint64_t zombie;
|
||||
sigar_uint64_t stopped;
|
||||
sigar_uint64_t idle;
|
||||
sigar_uint64_t threads;
|
||||
} sigar_proc_stat_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_stat_get(sigar_t *sigar,
|
||||
sigar_proc_stat_t *procstat);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
size,
|
||||
resident,
|
||||
share,
|
||||
minor_faults,
|
||||
major_faults,
|
||||
page_faults;
|
||||
} sigar_proc_mem_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_mem_t *procmem);
|
||||
|
||||
typedef struct {
|
||||
sigar_uid_t uid;
|
||||
sigar_gid_t gid;
|
||||
sigar_uid_t euid;
|
||||
sigar_gid_t egid;
|
||||
} sigar_proc_cred_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_cred_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_cred_t *proccred);
|
||||
|
||||
#define SIGAR_CRED_NAME_MAX 512
|
||||
|
||||
typedef struct {
|
||||
char user[SIGAR_CRED_NAME_MAX];
|
||||
char group[SIGAR_CRED_NAME_MAX];
|
||||
} sigar_proc_cred_name_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_proc_cred_name_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_cred_name_t *proccredname);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
start_time,
|
||||
user,
|
||||
sys,
|
||||
total;
|
||||
} sigar_proc_time_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_time_t *proctime);
|
||||
|
||||
typedef struct {
|
||||
/* must match sigar_proc_time_t fields */
|
||||
sigar_uint64_t
|
||||
start_time,
|
||||
user,
|
||||
sys,
|
||||
total;
|
||||
sigar_uint64_t last_time;
|
||||
double percent;
|
||||
} sigar_proc_cpu_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_cpu_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_cpu_t *proccpu);
|
||||
|
||||
#define SIGAR_PROC_STATE_SLEEP 'S'
|
||||
#define SIGAR_PROC_STATE_RUN 'R'
|
||||
#define SIGAR_PROC_STATE_STOP 'T'
|
||||
#define SIGAR_PROC_STATE_ZOMBIE 'Z'
|
||||
#define SIGAR_PROC_STATE_IDLE 'D'
|
||||
|
||||
#define SIGAR_PROC_NAME_LEN 128
|
||||
|
||||
typedef struct {
|
||||
char name[SIGAR_PROC_NAME_LEN];
|
||||
char state;
|
||||
sigar_pid_t ppid;
|
||||
int tty;
|
||||
int priority;
|
||||
int nice;
|
||||
int processor;
|
||||
sigar_uint64_t threads;
|
||||
} sigar_proc_state_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_state_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_state_t *procstate);
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
char **data;
|
||||
} sigar_proc_args_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_args_t *procargs);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_args_destroy(sigar_t *sigar,
|
||||
sigar_proc_args_t *procargs);
|
||||
|
||||
typedef struct {
|
||||
void *data; /* user data */
|
||||
|
||||
enum {
|
||||
SIGAR_PROC_ENV_ALL,
|
||||
SIGAR_PROC_ENV_KEY
|
||||
} type;
|
||||
|
||||
/* used for SIGAR_PROC_ENV_KEY */
|
||||
const char *key;
|
||||
int klen;
|
||||
|
||||
int (*env_getter)(void *, const char *, int, char *, int);
|
||||
} sigar_proc_env_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_env_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_env_t *procenv);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t total;
|
||||
/* XXX - which are files, sockets, etc. */
|
||||
} sigar_proc_fd_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_fd_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_fd_t *procfd);
|
||||
|
||||
typedef struct {
|
||||
char name[SIGAR_PATH_MAX+1];
|
||||
char cwd[SIGAR_PATH_MAX+1];
|
||||
char root[SIGAR_PATH_MAX+1];
|
||||
} sigar_proc_exe_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_exe_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_exe_t *procexe);
|
||||
|
||||
typedef struct {
|
||||
void *data; /* user data */
|
||||
|
||||
int (*module_getter)(void *, char *, int);
|
||||
} sigar_proc_modules_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_modules_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_modules_t *procmods);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t user;
|
||||
sigar_uint64_t sys;
|
||||
sigar_uint64_t total;
|
||||
} sigar_thread_cpu_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_thread_cpu_get(sigar_t *sigar,
|
||||
sigar_uint64_t id,
|
||||
sigar_thread_cpu_t *cpu);
|
||||
|
||||
typedef enum {
|
||||
SIGAR_FSTYPE_UNKNOWN,
|
||||
SIGAR_FSTYPE_NONE,
|
||||
SIGAR_FSTYPE_LOCAL_DISK,
|
||||
SIGAR_FSTYPE_NETWORK,
|
||||
SIGAR_FSTYPE_RAM_DISK,
|
||||
SIGAR_FSTYPE_CDROM,
|
||||
SIGAR_FSTYPE_SWAP,
|
||||
SIGAR_FSTYPE_MAX
|
||||
} sigar_file_system_type_e;
|
||||
|
||||
#define SIGAR_FS_NAME_LEN SIGAR_PATH_MAX
|
||||
#define SIGAR_FS_INFO_LEN 256
|
||||
|
||||
typedef struct {
|
||||
char dir_name[SIGAR_FS_NAME_LEN];
|
||||
char dev_name[SIGAR_FS_NAME_LEN];
|
||||
char type_name[SIGAR_FS_INFO_LEN]; /* e.g. "local" */
|
||||
char sys_type_name[SIGAR_FS_INFO_LEN]; /* e.g. "ext3" */
|
||||
char options[SIGAR_FS_INFO_LEN];
|
||||
sigar_file_system_type_e type;
|
||||
unsigned long flags;
|
||||
} sigar_file_system_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_file_system_t *data;
|
||||
} sigar_file_system_list_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_file_system_list_get(sigar_t *sigar,
|
||||
sigar_file_system_list_t *fslist);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_file_system_list_destroy(sigar_t *sigar,
|
||||
sigar_file_system_list_t *fslist);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t reads;
|
||||
sigar_uint64_t writes;
|
||||
sigar_uint64_t write_bytes;
|
||||
sigar_uint64_t read_bytes;
|
||||
sigar_uint64_t rtime;
|
||||
sigar_uint64_t wtime;
|
||||
sigar_uint64_t qtime;
|
||||
sigar_uint64_t time;
|
||||
sigar_uint64_t snaptime;
|
||||
double service_time;
|
||||
double queue;
|
||||
} sigar_disk_usage_t;
|
||||
|
||||
/* XXX for sigar_file_system_usage_t compat */
|
||||
#define disk_reads disk.reads
|
||||
#define disk_writes disk.writes
|
||||
#define disk_write_bytes disk.write_bytes
|
||||
#define disk_read_bytes disk.read_bytes
|
||||
#define disk_queue disk.queue
|
||||
#define disk_service_time disk.service_time
|
||||
|
||||
typedef struct {
|
||||
sigar_disk_usage_t disk;
|
||||
double use_percent;
|
||||
sigar_uint64_t total;
|
||||
sigar_uint64_t free;
|
||||
sigar_uint64_t used;
|
||||
sigar_uint64_t avail;
|
||||
sigar_uint64_t files;
|
||||
sigar_uint64_t free_files;
|
||||
} sigar_file_system_usage_t;
|
||||
|
||||
#undef SIGAR_DISK_USAGE_T
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_file_system_usage_get(sigar_t *sigar,
|
||||
const char *dirname,
|
||||
sigar_file_system_usage_t *fsusage);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar,
|
||||
const char *name,
|
||||
sigar_disk_usage_t *disk);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_file_system_ping(sigar_t *sigar,
|
||||
sigar_file_system_t *fs);
|
||||
|
||||
typedef struct {
|
||||
enum {
|
||||
SIGAR_AF_UNSPEC,
|
||||
SIGAR_AF_INET,
|
||||
SIGAR_AF_INET6,
|
||||
SIGAR_AF_LINK
|
||||
} family;
|
||||
union {
|
||||
sigar_uint32_t in;
|
||||
sigar_uint32_t in6[4];
|
||||
unsigned char mac[8];
|
||||
} addr;
|
||||
} sigar_net_address_t;
|
||||
|
||||
#define SIGAR_INET6_ADDRSTRLEN 46
|
||||
|
||||
#define SIGAR_MAXDOMAINNAMELEN 256
|
||||
#define SIGAR_MAXHOSTNAMELEN 256
|
||||
|
||||
typedef struct {
|
||||
char default_gateway[SIGAR_INET6_ADDRSTRLEN];
|
||||
char default_gateway_interface[MAX_INTERFACE_NAME_LEN];
|
||||
char host_name[SIGAR_MAXHOSTNAMELEN];
|
||||
char domain_name[SIGAR_MAXDOMAINNAMELEN];
|
||||
char primary_dns[SIGAR_INET6_ADDRSTRLEN];
|
||||
char secondary_dns[SIGAR_INET6_ADDRSTRLEN];
|
||||
} sigar_net_info_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_info_get(sigar_t *sigar,
|
||||
sigar_net_info_t *netinfo);
|
||||
|
||||
#define SIGAR_RTF_UP 0x1
|
||||
#define SIGAR_RTF_GATEWAY 0x2
|
||||
#define SIGAR_RTF_HOST 0x4
|
||||
|
||||
typedef struct {
|
||||
sigar_net_address_t destination;
|
||||
sigar_net_address_t gateway;
|
||||
sigar_net_address_t mask;
|
||||
sigar_uint64_t
|
||||
flags,
|
||||
refcnt,
|
||||
use,
|
||||
metric,
|
||||
mtu,
|
||||
window,
|
||||
irtt;
|
||||
char ifname[MAX_INTERFACE_NAME_LEN];
|
||||
} sigar_net_route_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_net_route_t *data;
|
||||
} sigar_net_route_list_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_net_route_list_get(sigar_t *sigar,
|
||||
sigar_net_route_list_t *routelist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_net_route_list_destroy(sigar_t *sigar,
|
||||
sigar_net_route_list_t *routelist);
|
||||
|
||||
/*
|
||||
* platforms define most of these "standard" flags,
|
||||
* but of course, with different values in some cases.
|
||||
*/
|
||||
#define SIGAR_IFF_UP 0x1
|
||||
#define SIGAR_IFF_BROADCAST 0x2
|
||||
#define SIGAR_IFF_DEBUG 0x4
|
||||
#define SIGAR_IFF_LOOPBACK 0x8
|
||||
#define SIGAR_IFF_POINTOPOINT 0x10
|
||||
#define SIGAR_IFF_NOTRAILERS 0x20
|
||||
#define SIGAR_IFF_RUNNING 0x40
|
||||
#define SIGAR_IFF_NOARP 0x80
|
||||
#define SIGAR_IFF_PROMISC 0x100
|
||||
#define SIGAR_IFF_ALLMULTI 0x200
|
||||
#define SIGAR_IFF_MULTICAST 0x800
|
||||
#define SIGAR_IFF_SLAVE 0x1000
|
||||
#define SIGAR_IFF_MASTER 0x2000
|
||||
#define SIGAR_IFF_DYNAMIC 0x4000
|
||||
|
||||
#define SIGAR_NULL_HWADDR "00:00:00:00:00:00"
|
||||
|
||||
/* scope values from linux-2.6/include/net/ipv6.h */
|
||||
#define SIGAR_IPV6_ADDR_ANY 0x0000
|
||||
#define SIGAR_IPV6_ADDR_UNICAST 0x0001
|
||||
#define SIGAR_IPV6_ADDR_MULTICAST 0x0002
|
||||
#define SIGAR_IPV6_ADDR_LOOPBACK 0x0010
|
||||
#define SIGAR_IPV6_ADDR_LINKLOCAL 0x0020
|
||||
#define SIGAR_IPV6_ADDR_SITELOCAL 0x0040
|
||||
#define SIGAR_IPV6_ADDR_COMPATv4 0x0080
|
||||
|
||||
typedef struct {
|
||||
char name[MAX_INTERFACE_NAME_LEN];
|
||||
char type[64];
|
||||
char description[256];
|
||||
sigar_net_address_t hwaddr;
|
||||
sigar_net_address_t address;
|
||||
sigar_net_address_t destination;
|
||||
sigar_net_address_t broadcast;
|
||||
sigar_net_address_t netmask;
|
||||
sigar_net_address_t address6;
|
||||
int prefix6_length;
|
||||
int scope6;
|
||||
sigar_uint64_t
|
||||
flags,
|
||||
mtu,
|
||||
metric;
|
||||
int tx_queue_len;
|
||||
} sigar_net_interface_config_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_interface_config_get(sigar_t *sigar,
|
||||
const char *name,
|
||||
sigar_net_interface_config_t *ifconfig);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_interface_config_primary_get(sigar_t *sigar,
|
||||
sigar_net_interface_config_t *ifconfig);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t
|
||||
/* received */
|
||||
rx_packets,
|
||||
rx_bytes,
|
||||
rx_errors,
|
||||
rx_dropped,
|
||||
rx_overruns,
|
||||
rx_frame,
|
||||
/* transmitted */
|
||||
tx_packets,
|
||||
tx_bytes,
|
||||
tx_errors,
|
||||
tx_dropped,
|
||||
tx_overruns,
|
||||
tx_collisions,
|
||||
tx_carrier,
|
||||
speed;
|
||||
} sigar_net_interface_stat_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_interface_stat_get(sigar_t *sigar,
|
||||
const char *name,
|
||||
sigar_net_interface_stat_t *ifstat);
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
char **data;
|
||||
} sigar_net_interface_list_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_interface_list_get(sigar_t *sigar,
|
||||
sigar_net_interface_list_t *iflist);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_interface_list_destroy(sigar_t *sigar,
|
||||
sigar_net_interface_list_t *iflist);
|
||||
|
||||
#define SIGAR_NETCONN_CLIENT 0x01
|
||||
#define SIGAR_NETCONN_SERVER 0x02
|
||||
|
||||
#define SIGAR_NETCONN_TCP 0x10
|
||||
#define SIGAR_NETCONN_UDP 0x20
|
||||
#define SIGAR_NETCONN_RAW 0x40
|
||||
#define SIGAR_NETCONN_UNIX 0x80
|
||||
|
||||
enum {
|
||||
SIGAR_TCP_ESTABLISHED = 1,
|
||||
SIGAR_TCP_SYN_SENT,
|
||||
SIGAR_TCP_SYN_RECV,
|
||||
SIGAR_TCP_FIN_WAIT1,
|
||||
SIGAR_TCP_FIN_WAIT2,
|
||||
SIGAR_TCP_TIME_WAIT,
|
||||
SIGAR_TCP_CLOSE,
|
||||
SIGAR_TCP_CLOSE_WAIT,
|
||||
SIGAR_TCP_LAST_ACK,
|
||||
SIGAR_TCP_LISTEN,
|
||||
SIGAR_TCP_CLOSING,
|
||||
SIGAR_TCP_IDLE,
|
||||
SIGAR_TCP_BOUND,
|
||||
SIGAR_TCP_UNKNOWN
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned long local_port;
|
||||
sigar_net_address_t local_address;
|
||||
unsigned long remote_port;
|
||||
sigar_net_address_t remote_address;
|
||||
sigar_uid_t uid;
|
||||
unsigned long inode;
|
||||
int type;
|
||||
int state;
|
||||
unsigned long send_queue;
|
||||
unsigned long receive_queue;
|
||||
} sigar_net_connection_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_net_connection_t *data;
|
||||
} sigar_net_connection_list_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_connection_list_get(sigar_t *sigar,
|
||||
sigar_net_connection_list_t *connlist,
|
||||
int flags);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_connection_list_destroy(sigar_t *sigar,
|
||||
sigar_net_connection_list_t *connlist);
|
||||
|
||||
typedef struct sigar_net_connection_walker_t sigar_net_connection_walker_t;
|
||||
|
||||
/* alternative to sigar_net_connection_list_get */
|
||||
struct sigar_net_connection_walker_t {
|
||||
sigar_t *sigar;
|
||||
int flags;
|
||||
void *data; /* user data */
|
||||
int (*add_connection)(sigar_net_connection_walker_t *walker,
|
||||
sigar_net_connection_t *connection);
|
||||
};
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_connection_walk(sigar_net_connection_walker_t *walker);
|
||||
|
||||
typedef struct {
|
||||
int tcp_states[SIGAR_TCP_UNKNOWN];
|
||||
sigar_uint32_t tcp_inbound_total;
|
||||
sigar_uint32_t tcp_outbound_total;
|
||||
sigar_uint32_t all_inbound_total;
|
||||
sigar_uint32_t all_outbound_total;
|
||||
} sigar_net_stat_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_stat_get(sigar_t *sigar,
|
||||
sigar_net_stat_t *netstat,
|
||||
int flags);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_stat_port_get(sigar_t *sigar,
|
||||
sigar_net_stat_t *netstat,
|
||||
int flags,
|
||||
sigar_net_address_t *address,
|
||||
unsigned long port);
|
||||
|
||||
/* TCP-MIB */
|
||||
typedef struct {
|
||||
sigar_uint64_t active_opens;
|
||||
sigar_uint64_t passive_opens;
|
||||
sigar_uint64_t attempt_fails;
|
||||
sigar_uint64_t estab_resets;
|
||||
sigar_uint64_t curr_estab;
|
||||
sigar_uint64_t in_segs;
|
||||
sigar_uint64_t out_segs;
|
||||
sigar_uint64_t retrans_segs;
|
||||
sigar_uint64_t in_errs;
|
||||
sigar_uint64_t out_rsts;
|
||||
} sigar_tcp_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_tcp_get(sigar_t *sigar,
|
||||
sigar_tcp_t *tcp);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t null;
|
||||
sigar_uint64_t getattr;
|
||||
sigar_uint64_t setattr;
|
||||
sigar_uint64_t root;
|
||||
sigar_uint64_t lookup;
|
||||
sigar_uint64_t readlink;
|
||||
sigar_uint64_t read;
|
||||
sigar_uint64_t writecache;
|
||||
sigar_uint64_t write;
|
||||
sigar_uint64_t create;
|
||||
sigar_uint64_t remove;
|
||||
sigar_uint64_t rename;
|
||||
sigar_uint64_t link;
|
||||
sigar_uint64_t symlink;
|
||||
sigar_uint64_t mkdir;
|
||||
sigar_uint64_t rmdir;
|
||||
sigar_uint64_t readdir;
|
||||
sigar_uint64_t fsstat;
|
||||
} sigar_nfs_v2_t;
|
||||
|
||||
typedef sigar_nfs_v2_t sigar_nfs_client_v2_t;
|
||||
typedef sigar_nfs_v2_t sigar_nfs_server_v2_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_nfs_client_v2_get(sigar_t *sigar,
|
||||
sigar_nfs_client_v2_t *nfs);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_nfs_server_v2_get(sigar_t *sigar,
|
||||
sigar_nfs_server_v2_t *nfs);
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t null;
|
||||
sigar_uint64_t getattr;
|
||||
sigar_uint64_t setattr;
|
||||
sigar_uint64_t lookup;
|
||||
sigar_uint64_t access;
|
||||
sigar_uint64_t readlink;
|
||||
sigar_uint64_t read;
|
||||
sigar_uint64_t write;
|
||||
sigar_uint64_t create;
|
||||
sigar_uint64_t mkdir;
|
||||
sigar_uint64_t symlink;
|
||||
sigar_uint64_t mknod;
|
||||
sigar_uint64_t remove;
|
||||
sigar_uint64_t rmdir;
|
||||
sigar_uint64_t rename;
|
||||
sigar_uint64_t link;
|
||||
sigar_uint64_t readdir;
|
||||
sigar_uint64_t readdirplus;
|
||||
sigar_uint64_t fsstat;
|
||||
sigar_uint64_t fsinfo;
|
||||
sigar_uint64_t pathconf;
|
||||
sigar_uint64_t commit;
|
||||
} sigar_nfs_v3_t;
|
||||
|
||||
typedef sigar_nfs_v3_t sigar_nfs_client_v3_t;
|
||||
typedef sigar_nfs_v3_t sigar_nfs_server_v3_t;
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_nfs_client_v3_get(sigar_t *sigar,
|
||||
sigar_nfs_client_v3_t *nfs);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_nfs_server_v3_get(sigar_t *sigar,
|
||||
sigar_nfs_server_v3_t *nfs);
|
||||
|
||||
SIGAR_DECLARE(int)
|
||||
sigar_net_listen_address_get(sigar_t *sigar,
|
||||
unsigned long port,
|
||||
sigar_net_address_t *address);
|
||||
|
||||
typedef struct {
|
||||
char ifname[MAX_INTERFACE_NAME_LEN];
|
||||
char type[64];
|
||||
sigar_net_address_t hwaddr;
|
||||
sigar_net_address_t address;
|
||||
sigar_uint64_t flags;
|
||||
} sigar_arp_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_arp_t *data;
|
||||
} sigar_arp_list_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_arp_list_get(sigar_t *sigar,
|
||||
sigar_arp_list_t *arplist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_arp_list_destroy(sigar_t *sigar,
|
||||
sigar_arp_list_t *arplist);
|
||||
|
||||
typedef struct {
|
||||
char user[32];
|
||||
char device[32];
|
||||
char host[256];
|
||||
sigar_uint64_t time;
|
||||
} sigar_who_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned long number;
|
||||
unsigned long size;
|
||||
sigar_who_t *data;
|
||||
} sigar_who_list_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_who_list_get(sigar_t *sigar,
|
||||
sigar_who_list_t *wholist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_who_list_destroy(sigar_t *sigar,
|
||||
sigar_who_list_t *wholist);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_proc_port_get(sigar_t *sigar,
|
||||
int protocol, unsigned long port,
|
||||
sigar_pid_t *pid);
|
||||
|
||||
typedef struct {
|
||||
const char *build_date;
|
||||
const char *scm_revision;
|
||||
const char *version;
|
||||
const char *archname;
|
||||
const char *archlib;
|
||||
const char *binname;
|
||||
const char *description;
|
||||
int major, minor, maint, build;
|
||||
} sigar_version_t;
|
||||
|
||||
SIGAR_DECLARE(sigar_version_t *) sigar_version_get(void);
|
||||
|
||||
#define SIGAR_SYS_INFO_LEN SIGAR_MAXHOSTNAMELEN /* more than enough */
|
||||
|
||||
typedef struct {
|
||||
char name[SIGAR_SYS_INFO_LEN]; /* canonicalized sysname */
|
||||
char version[SIGAR_SYS_INFO_LEN]; /* utsname.release */
|
||||
char arch[SIGAR_SYS_INFO_LEN];
|
||||
char machine[SIGAR_SYS_INFO_LEN];
|
||||
char description[SIGAR_SYS_INFO_LEN];
|
||||
char patch_level[SIGAR_SYS_INFO_LEN];
|
||||
char vendor[SIGAR_SYS_INFO_LEN];
|
||||
char vendor_version[SIGAR_SYS_INFO_LEN];
|
||||
char vendor_name[SIGAR_SYS_INFO_LEN]; /* utsname.sysname */
|
||||
char vendor_code_name[SIGAR_SYS_INFO_LEN];
|
||||
} sigar_sys_info_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_sys_info_get(sigar_t *sigar, sigar_sys_info_t *sysinfo);
|
||||
|
||||
#define SIGAR_FQDN_LEN 512
|
||||
|
||||
SIGAR_DECLARE(int) sigar_fqdn_get(sigar_t *sigar, char *name, int namelen);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_rpc_ping(char *hostname,
|
||||
int protocol,
|
||||
unsigned long program,
|
||||
unsigned long version);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_rpc_strerror(int err);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_password_get(const char *prompt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
157
vendor/sigar/include/sigar_fileinfo.h
vendored
Normal file
157
vendor/sigar/include/sigar_fileinfo.h
vendored
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2005 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* nor may "Apache" appear in their name, without prior written
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
#include "sigar.h"
|
||||
|
||||
typedef enum {
|
||||
SIGAR_FILETYPE_NOFILE = 0, /**< no file type determined */
|
||||
SIGAR_FILETYPE_REG, /**< a regular file */
|
||||
SIGAR_FILETYPE_DIR, /**< a directory */
|
||||
SIGAR_FILETYPE_CHR, /**< a character device */
|
||||
SIGAR_FILETYPE_BLK, /**< a block device */
|
||||
SIGAR_FILETYPE_PIPE, /**< a FIFO / pipe */
|
||||
SIGAR_FILETYPE_LNK, /**< a symbolic link */
|
||||
SIGAR_FILETYPE_SOCK, /**< a [unix domain] socket */
|
||||
SIGAR_FILETYPE_UNKFILE /**< a file of some other unknown type */
|
||||
} sigar_file_type_e;
|
||||
|
||||
#define SIGAR_UREAD 0x0400 /**< Read by user */
|
||||
#define SIGAR_UWRITE 0x0200 /**< Write by user */
|
||||
#define SIGAR_UEXECUTE 0x0100 /**< Execute by user */
|
||||
|
||||
#define SIGAR_GREAD 0x0040 /**< Read by group */
|
||||
#define SIGAR_GWRITE 0x0020 /**< Write by group */
|
||||
#define SIGAR_GEXECUTE 0x0010 /**< Execute by group */
|
||||
|
||||
#define SIGAR_WREAD 0x0004 /**< Read by others */
|
||||
#define SIGAR_WWRITE 0x0002 /**< Write by others */
|
||||
#define SIGAR_WEXECUTE 0x0001 /**< Execute by others */
|
||||
|
||||
typedef struct {
|
||||
/** The access permissions of the file. Mimics Unix access rights. */
|
||||
sigar_uint64_t permissions;
|
||||
sigar_file_type_e type;
|
||||
/** The user id that owns the file */
|
||||
sigar_uid_t uid;
|
||||
/** The group id that owns the file */
|
||||
sigar_gid_t gid;
|
||||
/** The inode of the file. */
|
||||
sigar_uint64_t inode;
|
||||
/** The id of the device the file is on. */
|
||||
sigar_uint64_t device;
|
||||
/** The number of hard links to the file. */
|
||||
sigar_uint64_t nlink;
|
||||
/** The size of the file */
|
||||
sigar_uint64_t size;
|
||||
/** The time the file was last accessed */
|
||||
sigar_uint64_t atime;
|
||||
/** The time the file was last modified */
|
||||
sigar_uint64_t mtime;
|
||||
/** The time the file was last changed */
|
||||
sigar_uint64_t ctime;
|
||||
} sigar_file_attrs_t;
|
||||
|
||||
typedef struct {
|
||||
sigar_uint64_t total;
|
||||
sigar_uint64_t files;
|
||||
sigar_uint64_t subdirs;
|
||||
sigar_uint64_t symlinks;
|
||||
sigar_uint64_t chrdevs;
|
||||
sigar_uint64_t blkdevs;
|
||||
sigar_uint64_t sockets;
|
||||
sigar_uint64_t disk_usage;
|
||||
} sigar_dir_stat_t;
|
||||
|
||||
typedef sigar_dir_stat_t sigar_dir_usage_t;
|
||||
|
||||
SIGAR_DECLARE(const char *)
|
||||
sigar_file_attrs_type_string_get(sigar_file_type_e type);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_file_attrs_get(sigar_t *sigar,
|
||||
const char *file,
|
||||
sigar_file_attrs_t *fileattrs);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_link_attrs_get(sigar_t *sigar,
|
||||
const char *file,
|
||||
sigar_file_attrs_t *fileattrs);
|
||||
|
||||
SIGAR_DECLARE(int)sigar_file_attrs_mode_get(sigar_uint64_t permissions);
|
||||
|
||||
SIGAR_DECLARE(char *)
|
||||
sigar_file_attrs_permissions_string_get(sigar_uint64_t permissions,
|
||||
char *str);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_dir_stat_get(sigar_t *sigar,
|
||||
const char *dir,
|
||||
sigar_dir_stat_t *dirstats);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_dir_usage_get(sigar_t *sigar,
|
||||
const char *dir,
|
||||
sigar_dir_usage_t *dirusage);
|
||||
65
vendor/sigar/include/sigar_format.h
vendored
Normal file
65
vendor/sigar/include/sigar_format.h
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright (c) 2007-2008 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_FORMAT_H
|
||||
#define SIGAR_FORMAT_H
|
||||
|
||||
typedef struct {
|
||||
double user;
|
||||
double sys;
|
||||
double nice;
|
||||
double idle;
|
||||
double wait;
|
||||
double irq;
|
||||
double soft_irq;
|
||||
double stolen;
|
||||
double combined;
|
||||
} sigar_cpu_perc_t;
|
||||
|
||||
SIGAR_DECLARE(int) sigar_cpu_perc_calculate(sigar_cpu_t *prev,
|
||||
sigar_cpu_t *curr,
|
||||
sigar_cpu_perc_t *perc);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_uptime_string(sigar_t *sigar,
|
||||
sigar_uptime_t *uptime,
|
||||
char *buffer,
|
||||
int buflen);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_format_size(sigar_uint64_t size, char *buf);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_net_address_equals(sigar_net_address_t *addr1,
|
||||
sigar_net_address_t *addr2);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_net_address_to_string(sigar_t *sigar,
|
||||
sigar_net_address_t *address,
|
||||
char *addr_str);
|
||||
|
||||
SIGAR_DECLARE(const char *)sigar_net_scope_to_string(int type);
|
||||
|
||||
SIGAR_DECLARE(sigar_uint32_t) sigar_net_address_hash(sigar_net_address_t *address);
|
||||
|
||||
SIGAR_DECLARE(const char *)sigar_net_connection_type_get(int type);
|
||||
|
||||
SIGAR_DECLARE(const char *)sigar_net_connection_state_get(int state);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_net_interface_flags_to_string(sigar_uint64_t flags, char *buf);
|
||||
|
||||
SIGAR_DECLARE(char *)sigar_net_services_name_get(sigar_t *sigar,
|
||||
int protocol, unsigned long port);
|
||||
|
||||
#endif
|
||||
|
||||
18
vendor/sigar/include/sigar_getline.h
vendored
Normal file
18
vendor/sigar/include/sigar_getline.h
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef SIGAR_GETLINE_H
|
||||
#define SIGAR_GETLINE_H
|
||||
|
||||
#include "sigar.h"
|
||||
|
||||
typedef int (*sigar_getline_completer_t)(char *, int, int *);
|
||||
|
||||
SIGAR_DECLARE(char *) sigar_getline(char *prompt);
|
||||
SIGAR_DECLARE(void) sigar_getline_setwidth(int width);
|
||||
SIGAR_DECLARE(void) sigar_getline_redraw(void);
|
||||
SIGAR_DECLARE(void) sigar_getline_reset(void);
|
||||
SIGAR_DECLARE(void) sigar_getline_windowchanged();
|
||||
SIGAR_DECLARE(void) sigar_getline_histinit(char *file);
|
||||
SIGAR_DECLARE(void) sigar_getline_histadd(char *buf);
|
||||
SIGAR_DECLARE(int) sigar_getline_eof();
|
||||
SIGAR_DECLARE(void) sigar_getline_completer_set(sigar_getline_completer_t func);
|
||||
|
||||
#endif /* SIGAR_GETLINE_H */
|
||||
80
vendor/sigar/include/sigar_log.h
vendored
Normal file
80
vendor/sigar/include/sigar_log.h
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2006 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_LOG_H
|
||||
#define SIGAR_LOG_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define SIGAR_LOG_FATAL 0
|
||||
#define SIGAR_LOG_ERROR 1
|
||||
#define SIGAR_LOG_WARN 2
|
||||
#define SIGAR_LOG_INFO 3
|
||||
#define SIGAR_LOG_DEBUG 4
|
||||
#define SIGAR_LOG_TRACE 5
|
||||
|
||||
#define SIGAR_LOG_IS_FATAL(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_FATAL)
|
||||
|
||||
#define SIGAR_LOG_IS_ERROR(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_ERROR)
|
||||
|
||||
#define SIGAR_LOG_IS_WARN(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_WARN)
|
||||
|
||||
#define SIGAR_LOG_IS_INFO(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_INFO)
|
||||
|
||||
#define SIGAR_LOG_IS_DEBUG(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_DEBUG)
|
||||
|
||||
#define SIGAR_LOG_IS_TRACE(sigar) \
|
||||
(sigar->log_level >= SIGAR_LOG_TRACE)
|
||||
|
||||
#define SIGAR_STRINGIFY(n) #n
|
||||
|
||||
#define SIGAR_LOG_FILELINE \
|
||||
__FILE__ ":" SIGAR_STRINGIFY(__LINE__)
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ > 2)
|
||||
# define SIGAR_FUNC __func__
|
||||
# else
|
||||
# define SIGAR_FUNC __FUNCTION__
|
||||
# endif
|
||||
#else
|
||||
# define SIGAR_FUNC SIGAR_LOG_FILELINE
|
||||
#endif
|
||||
|
||||
typedef void (*sigar_log_impl_t)(sigar_t *, void *, int, char *);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_log_printf(sigar_t *sigar, int level,
|
||||
const char *format, ...);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_log(sigar_t *sigar, int level, char *message);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_log_impl_set(sigar_t *sigar, void *data,
|
||||
sigar_log_impl_t impl);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_log_impl_file(sigar_t *sigar, void *data,
|
||||
int level, char *message);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_log_level_get(sigar_t *sigar);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_log_level_set(sigar_t *sigar, int level);
|
||||
|
||||
|
||||
#endif /* SIGAR_LOG_H */
|
||||
422
vendor/sigar/include/sigar_private.h
vendored
Normal file
422
vendor/sigar/include/sigar_private.h
vendored
Normal file
|
|
@ -0,0 +1,422 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2008 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
* Copyright (c) 2009-2010 VMware, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_PRIVATE_DOT_H
|
||||
#define SIGAR_PRIVATE_DOT_H
|
||||
|
||||
#include "sigar_log.h"
|
||||
#include "sigar_ptql.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#ifndef DARWIN
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
#define _MEMORY_H /* exclude memory.h on solaris */
|
||||
#define DMALLOC_FUNC_CHECK
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
/* common to all os sigar_t's */
|
||||
/* XXX: this is ugly; but don't want the same stuffs
|
||||
* duplicated on 4 platforms and am too lazy to change
|
||||
* sigar_t to the way it was originally where sigar_t was
|
||||
* common and contained a sigar_os_t.
|
||||
* feel free trav ;-)
|
||||
*/
|
||||
#define SIGAR_T_BASE \
|
||||
int cpu_list_cores; \
|
||||
int log_level; \
|
||||
void *log_data; \
|
||||
sigar_log_impl_t log_impl; \
|
||||
void *ptql_re_data; \
|
||||
sigar_ptql_re_impl_t ptql_re_impl; \
|
||||
unsigned int ncpu; \
|
||||
unsigned long version; \
|
||||
unsigned long boot_time; \
|
||||
int ticks; \
|
||||
sigar_pid_t pid; \
|
||||
char errbuf[256]; \
|
||||
char *ifconf_buf; \
|
||||
int ifconf_len; \
|
||||
char *self_path; \
|
||||
sigar_proc_list_t *pids; \
|
||||
sigar_cache_t *fsdev; \
|
||||
sigar_cache_t *proc_cpu; \
|
||||
sigar_cache_t *net_listen; \
|
||||
sigar_cache_t *net_services_tcp; \
|
||||
sigar_cache_t *net_services_udp
|
||||
|
||||
#if defined(WIN32)
|
||||
# define SIGAR_INLINE __inline
|
||||
#elif defined(__GNUC__)
|
||||
# define SIGAR_INLINE inline
|
||||
#else
|
||||
# define SIGAR_INLINE
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
/* linux has its own strdup macro, make sure we use dmalloc's */
|
||||
#define sigar_strdup(s) \
|
||||
dmalloc_strndup(__FILE__, __LINE__, (s), -1, 0)
|
||||
#else
|
||||
# ifdef WIN32
|
||||
# define sigar_strdup(s) _strdup(s)
|
||||
# else
|
||||
# define sigar_strdup(s) strdup(s)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define SIGAR_ZERO(s) \
|
||||
memset(s, '\0', sizeof(*(s)))
|
||||
|
||||
#define SIGAR_STRNCPY(dest, src, len) \
|
||||
strncpy(dest, src, len); \
|
||||
dest[len-1] = '\0'
|
||||
|
||||
/* we use fixed size buffers pretty much everywhere */
|
||||
/* this is strncpy + ensured \0 terminator */
|
||||
#define SIGAR_SSTRCPY(dest, src) \
|
||||
SIGAR_STRNCPY(dest, src, sizeof(dest))
|
||||
|
||||
#ifndef strEQ
|
||||
#define strEQ(s1, s2) (strcmp(s1, s2) == 0)
|
||||
#endif
|
||||
|
||||
#ifndef strnEQ
|
||||
#define strnEQ(s1, s2, n) (strncmp(s1, s2, n) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#ifndef strcaseEQ
|
||||
#define strcaseEQ(s1, s2) (strcasecmp(s1, s2) == 0)
|
||||
#endif
|
||||
|
||||
#ifndef strncaseEQ
|
||||
#define strncaseEQ(s1, s2, n) (strncasecmp(s1, s2, n) == 0)
|
||||
#endif
|
||||
|
||||
#ifdef offsetof
|
||||
#define sigar_offsetof offsetof
|
||||
#else
|
||||
#define sigar_offsetof(type, field) ((size_t)(&((type *)0)->field))
|
||||
#endif
|
||||
|
||||
#define SIGAR_MSEC 1000L
|
||||
#define SIGAR_USEC 1000000L
|
||||
#define SIGAR_NSEC 1000000000L
|
||||
|
||||
#define SIGAR_SEC2NANO(s) \
|
||||
((sigar_uint64_t)(s) * (sigar_uint64_t)SIGAR_NSEC)
|
||||
|
||||
/* cpu ticks to milliseconds */
|
||||
#define SIGAR_TICK2MSEC(s) \
|
||||
((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_MSEC / (double)sigar->ticks))
|
||||
|
||||
#define SIGAR_TICK2NSEC(s) \
|
||||
((sigar_uint64_t)(s) * ((sigar_uint64_t)SIGAR_NSEC / (double)sigar->ticks))
|
||||
|
||||
/* nanoseconds to milliseconds */
|
||||
#define SIGAR_NSEC2MSEC(s) \
|
||||
((sigar_uint64_t)(s) / ((sigar_uint64_t)1000000L))
|
||||
|
||||
#define IFTYPE_LO 2
|
||||
#define IFTYPE_ETH 3
|
||||
|
||||
#define SIGAR_LAST_PROC_EXPIRE 2
|
||||
|
||||
#define SIGAR_FS_MAX 10
|
||||
|
||||
#define SIGAR_CPU_INFO_MAX 4
|
||||
|
||||
#define SIGAR_CPU_LIST_MAX 4
|
||||
|
||||
#define SIGAR_PROC_LIST_MAX 256
|
||||
|
||||
#define SIGAR_PROC_ARGS_MAX 12
|
||||
|
||||
#define SIGAR_NET_ROUTE_LIST_MAX 6
|
||||
|
||||
#define SIGAR_NET_IFLIST_MAX 20
|
||||
|
||||
#define SIGAR_NET_CONNLIST_MAX 20
|
||||
|
||||
#define SIGAR_ARP_LIST_MAX 12
|
||||
|
||||
#define SIGAR_WHO_LIST_MAX 12
|
||||
|
||||
int sigar_os_open(sigar_t **sigar);
|
||||
|
||||
int sigar_os_close(sigar_t *sigar);
|
||||
|
||||
char *sigar_os_error_string(sigar_t *sigar, int err);
|
||||
|
||||
char *sigar_strerror_get(int err, char *errbuf, int buflen);
|
||||
|
||||
void sigar_strerror_set(sigar_t *sigar, char *msg);
|
||||
|
||||
void sigar_strerror_printf(sigar_t *sigar, const char *format, ...);
|
||||
|
||||
int sigar_sys_info_get_uname(sigar_sys_info_t *sysinfo);
|
||||
|
||||
int sigar_os_sys_info_get(sigar_t *sigar, sigar_sys_info_t *sysinfo);
|
||||
|
||||
int sigar_os_proc_list_get(sigar_t *sigar,
|
||||
sigar_proc_list_t *proclist);
|
||||
|
||||
int sigar_proc_list_create(sigar_proc_list_t *proclist);
|
||||
|
||||
int sigar_proc_list_grow(sigar_proc_list_t *proclist);
|
||||
|
||||
#define SIGAR_PROC_LIST_GROW(proclist) \
|
||||
if (proclist->number >= proclist->size) { \
|
||||
sigar_proc_list_grow(proclist); \
|
||||
}
|
||||
|
||||
int sigar_proc_args_create(sigar_proc_args_t *proclist);
|
||||
|
||||
int sigar_proc_args_grow(sigar_proc_args_t *procargs);
|
||||
|
||||
#define SIGAR_PROC_ARGS_GROW(procargs) \
|
||||
if (procargs->number >= procargs->size) { \
|
||||
sigar_proc_args_grow(procargs); \
|
||||
}
|
||||
|
||||
int sigar_os_proc_args_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_args_t *procargs);
|
||||
|
||||
int sigar_file_system_list_create(sigar_file_system_list_t *fslist);
|
||||
|
||||
int sigar_file_system_list_grow(sigar_file_system_list_t *fslist);
|
||||
|
||||
#define SIGAR_FILE_SYSTEM_LIST_GROW(fslist) \
|
||||
if (fslist->number >= fslist->size) { \
|
||||
sigar_file_system_list_grow(fslist); \
|
||||
}
|
||||
|
||||
int sigar_os_fs_type_get(sigar_file_system_t *fsp);
|
||||
|
||||
/* os plugins that set fsp->type call fs_type_get directly */
|
||||
#define sigar_fs_type_init(fsp) \
|
||||
fsp->type = SIGAR_FSTYPE_UNKNOWN; \
|
||||
sigar_fs_type_get(fsp)
|
||||
|
||||
void sigar_fs_type_get(sigar_file_system_t *fsp);
|
||||
|
||||
int sigar_cpu_info_list_create(sigar_cpu_info_list_t *cpu_infos);
|
||||
|
||||
int sigar_cpu_info_list_grow(sigar_cpu_info_list_t *cpu_infos);
|
||||
|
||||
#define SIGAR_CPU_INFO_LIST_GROW(cpu_infos) \
|
||||
if (cpu_infos->number >= cpu_infos->size) { \
|
||||
sigar_cpu_info_list_grow(cpu_infos); \
|
||||
}
|
||||
|
||||
int sigar_cpu_list_create(sigar_cpu_list_t *cpulist);
|
||||
|
||||
int sigar_cpu_list_grow(sigar_cpu_list_t *cpulist);
|
||||
|
||||
#define SIGAR_CPU_LIST_GROW(cpulist) \
|
||||
if (cpulist->number >= cpulist->size) { \
|
||||
sigar_cpu_list_grow(cpulist); \
|
||||
}
|
||||
|
||||
int sigar_net_route_list_create(sigar_net_route_list_t *routelist);
|
||||
|
||||
int sigar_net_route_list_grow(sigar_net_route_list_t *net_routelist);
|
||||
|
||||
#define SIGAR_NET_ROUTE_LIST_GROW(routelist) \
|
||||
if (routelist->number >= routelist->size) { \
|
||||
sigar_net_route_list_grow(routelist); \
|
||||
}
|
||||
|
||||
int sigar_net_interface_list_create(sigar_net_interface_list_t *iflist);
|
||||
|
||||
int sigar_net_interface_list_grow(sigar_net_interface_list_t *iflist);
|
||||
|
||||
#define SIGAR_NET_IFLIST_GROW(iflist) \
|
||||
if (iflist->number >= iflist->size) { \
|
||||
sigar_net_interface_list_grow(iflist); \
|
||||
}
|
||||
|
||||
int sigar_net_connection_list_create(sigar_net_connection_list_t *connlist);
|
||||
|
||||
int sigar_net_connection_list_grow(sigar_net_connection_list_t *connlist);
|
||||
|
||||
#define SIGAR_NET_CONNLIST_GROW(connlist) \
|
||||
if (connlist->number >= connlist->size) { \
|
||||
sigar_net_connection_list_grow(connlist); \
|
||||
}
|
||||
|
||||
#define sigar_net_address_set(a, val) \
|
||||
(a).addr.in = val; \
|
||||
(a).family = SIGAR_AF_INET
|
||||
|
||||
#define sigar_net_address6_set(a, val) \
|
||||
memcpy(&((a).addr.in6), val, sizeof((a).addr.in6)); \
|
||||
(a).family = SIGAR_AF_INET6
|
||||
|
||||
#define SIGAR_IFHWADDRLEN 6
|
||||
|
||||
#define sigar_net_address_mac_set(a, val, len) \
|
||||
memcpy(&((a).addr.mac), val, len); \
|
||||
(a).family = SIGAR_AF_LINK
|
||||
|
||||
#define sigar_hwaddr_set_null(ifconfig) \
|
||||
SIGAR_ZERO(&ifconfig->hwaddr.addr.mac); \
|
||||
ifconfig->hwaddr.family = SIGAR_AF_LINK
|
||||
|
||||
int sigar_net_interface_ipv6_config_get(sigar_t *sigar, const char *name,
|
||||
sigar_net_interface_config_t *ifconfig);
|
||||
|
||||
#define sigar_net_interface_ipv6_config_init(ifconfig) \
|
||||
ifconfig->address6.family = SIGAR_AF_INET6; \
|
||||
ifconfig->prefix6_length = 0; \
|
||||
ifconfig->scope6 = 0
|
||||
|
||||
#define SIGAR_SIN6(s) ((struct sockaddr_in6 *)(s))
|
||||
|
||||
#define SIGAR_SIN6_ADDR(s) &SIGAR_SIN6(s)->sin6_addr
|
||||
|
||||
#define sigar_net_interface_scope6_set(ifconfig, addr) \
|
||||
if (IN6_IS_ADDR_LINKLOCAL(addr)) \
|
||||
ifconfig->scope6 = SIGAR_IPV6_ADDR_LINKLOCAL; \
|
||||
else if (IN6_IS_ADDR_SITELOCAL(addr)) \
|
||||
ifconfig->scope6 = SIGAR_IPV6_ADDR_SITELOCAL; \
|
||||
else if (IN6_IS_ADDR_V4COMPAT(addr)) \
|
||||
ifconfig->scope6 = SIGAR_IPV6_ADDR_COMPATv4; \
|
||||
else if (IN6_IS_ADDR_LOOPBACK(addr)) \
|
||||
ifconfig->scope6 = SIGAR_IPV6_ADDR_LOOPBACK; \
|
||||
else \
|
||||
ifconfig->scope6 = SIGAR_IPV6_ADDR_ANY
|
||||
|
||||
int sigar_tcp_curr_estab(sigar_t *sigar, sigar_tcp_t *tcp);
|
||||
|
||||
int sigar_arp_list_create(sigar_arp_list_t *arplist);
|
||||
|
||||
int sigar_arp_list_grow(sigar_arp_list_t *arplist);
|
||||
|
||||
#define SIGAR_ARP_LIST_GROW(arplist) \
|
||||
if (arplist->number >= arplist->size) { \
|
||||
sigar_arp_list_grow(arplist); \
|
||||
}
|
||||
|
||||
int sigar_who_list_create(sigar_who_list_t *wholist);
|
||||
|
||||
int sigar_who_list_grow(sigar_who_list_t *wholist);
|
||||
|
||||
#define SIGAR_WHO_LIST_GROW(wholist) \
|
||||
if (wholist->number >= wholist->size) { \
|
||||
sigar_who_list_grow(wholist); \
|
||||
}
|
||||
|
||||
int sigar_user_id_get(sigar_t *sigar, const char *name, int *uid);
|
||||
|
||||
int sigar_user_name_get(sigar_t *sigar, int uid, char *buf, int buflen);
|
||||
|
||||
int sigar_group_name_get(sigar_t *sigar, int gid, char *buf, int buflen);
|
||||
|
||||
#define SIGAR_PROC_ENV_KEY_LOOKUP() \
|
||||
if ((procenv->type == SIGAR_PROC_ENV_KEY) && \
|
||||
(pid == sigar->pid)) \
|
||||
{ \
|
||||
char *value = getenv(procenv->key); \
|
||||
if (value != NULL) { \
|
||||
procenv->env_getter(procenv->data, \
|
||||
procenv->key, \
|
||||
procenv->klen, \
|
||||
value, strlen(value)); \
|
||||
} \
|
||||
return SIGAR_OK; \
|
||||
}
|
||||
|
||||
#define SIGAR_DISK_STATS_INIT(disk) \
|
||||
(disk)->reads = (disk)->writes = \
|
||||
(disk)->read_bytes = (disk)->write_bytes = \
|
||||
(disk)->rtime = (disk)->wtime = (disk)->qtime = (disk)->time = \
|
||||
(disk)->queue = (disk)->service_time = SIGAR_FIELD_NOTIMPL; \
|
||||
(disk)->snaptime = 0
|
||||
|
||||
/* key used for filesystem (/) -> device (/dev/hda1) mapping */
|
||||
/* and disk_usage cache for service_time */
|
||||
#define SIGAR_FSDEV_ID(sb) \
|
||||
(S_ISBLK((sb).st_mode) ? (sb).st_rdev : ((sb).st_ino + (sb).st_dev))
|
||||
|
||||
#if defined(WIN32) || defined(NETWARE)
|
||||
int sigar_get_iftype(const char *name, int *type, int *inst);
|
||||
#endif
|
||||
|
||||
#define SIGAR_NIC_LOOPBACK "Local Loopback"
|
||||
#define SIGAR_NIC_UNSPEC "UNSPEC"
|
||||
#define SIGAR_NIC_SLIP "Serial Line IP"
|
||||
#define SIGAR_NIC_CSLIP "VJ Serial Line IP"
|
||||
#define SIGAR_NIC_SLIP6 "6-bit Serial Line IP"
|
||||
#define SIGAR_NIC_CSLIP6 "VJ 6-bit Serial Line IP"
|
||||
#define SIGAR_NIC_ADAPTIVE "Adaptive Serial Line IP"
|
||||
#define SIGAR_NIC_ETHERNET "Ethernet"
|
||||
#define SIGAR_NIC_ASH "Ash"
|
||||
#define SIGAR_NIC_FDDI "Fiber Distributed Data Interface"
|
||||
#define SIGAR_NIC_HIPPI "HIPPI"
|
||||
#define SIGAR_NIC_AX25 "AMPR AX.25"
|
||||
#define SIGAR_NIC_ROSE "AMPR ROSE"
|
||||
#define SIGAR_NIC_NETROM "AMPR NET/ROM"
|
||||
#define SIGAR_NIC_X25 "generic X.25"
|
||||
#define SIGAR_NIC_TUNNEL "IPIP Tunnel"
|
||||
#define SIGAR_NIC_PPP "Point-to-Point Protocol"
|
||||
#define SIGAR_NIC_HDLC "(Cisco)-HDLC"
|
||||
#define SIGAR_NIC_LAPB "LAPB"
|
||||
#define SIGAR_NIC_ARCNET "ARCnet"
|
||||
#define SIGAR_NIC_DLCI "Frame Relay DLCI"
|
||||
#define SIGAR_NIC_FRAD "Frame Relay Access Device"
|
||||
#define SIGAR_NIC_SIT "IPv6-in-IPv4"
|
||||
#define SIGAR_NIC_IRDA "IrLAP"
|
||||
#define SIGAR_NIC_EC "Econet"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#define SIGAR_HOSTENT_LEN 1024
|
||||
#if defined(_AIX)
|
||||
#define SIGAR_HAS_HOSTENT_DATA
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char buffer[SIGAR_HOSTENT_LEN];
|
||||
int error;
|
||||
#ifndef WIN32
|
||||
struct hostent hs;
|
||||
#endif
|
||||
#ifdef SIGAR_HAS_HOSTENT_DATA
|
||||
struct hostent_data hd;
|
||||
#endif
|
||||
} sigar_hostent_t;
|
||||
|
||||
#endif
|
||||
53
vendor/sigar/include/sigar_ptql.h
vendored
Normal file
53
vendor/sigar/include/sigar_ptql.h
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2007 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_PTQL_H
|
||||
#define SIGAR_PTQL_H
|
||||
|
||||
#define SIGAR_PTQL_MALFORMED_QUERY -1
|
||||
|
||||
typedef struct sigar_ptql_query_t sigar_ptql_query_t;
|
||||
|
||||
#define SIGAR_PTQL_ERRMSG_SIZE 1024
|
||||
|
||||
typedef struct {
|
||||
char message[SIGAR_PTQL_ERRMSG_SIZE];
|
||||
} sigar_ptql_error_t;
|
||||
|
||||
typedef int (*sigar_ptql_re_impl_t)(void *, char *, char *);
|
||||
|
||||
SIGAR_DECLARE(void) sigar_ptql_re_impl_set(sigar_t *sigar, void *data,
|
||||
sigar_ptql_re_impl_t impl);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_ptql_query_t **query,
|
||||
char *ptql,
|
||||
sigar_ptql_error_t *error);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_ptql_query_match(sigar_t *sigar,
|
||||
sigar_ptql_query_t *query,
|
||||
sigar_pid_t pid);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_ptql_query_destroy(sigar_ptql_query_t *query);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_ptql_query_find_process(sigar_t *sigar,
|
||||
sigar_ptql_query_t *query,
|
||||
sigar_pid_t *pid);
|
||||
|
||||
SIGAR_DECLARE(int) sigar_ptql_query_find(sigar_t *sigar,
|
||||
sigar_ptql_query_t *query,
|
||||
sigar_proc_list_t *proclist);
|
||||
|
||||
#endif /*SIGAR_PTQL_H*/
|
||||
191
vendor/sigar/include/sigar_util.h
vendored
Normal file
191
vendor/sigar/include/sigar_util.h
vendored
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2008 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_UTIL_H
|
||||
#define SIGAR_UTIL_H
|
||||
|
||||
/* most of this is crap for dealing with linux /proc */
|
||||
#define UITOA_BUFFER_SIZE \
|
||||
(sizeof(int) * 3 + 1)
|
||||
|
||||
#define SSTRLEN(s) \
|
||||
(sizeof(s)-1)
|
||||
|
||||
#define sigar_strtoul(ptr) \
|
||||
strtoul(ptr, &ptr, 10)
|
||||
|
||||
#define sigar_strtoull(ptr) \
|
||||
strtoull(ptr, &ptr, 10)
|
||||
|
||||
#define sigar_isspace(c) \
|
||||
(isspace(((unsigned char)(c))))
|
||||
|
||||
#define sigar_isdigit(c) \
|
||||
(isdigit(((unsigned char)(c))))
|
||||
|
||||
#define sigar_isalpha(c) \
|
||||
(isalpha(((unsigned char)(c))))
|
||||
|
||||
#define sigar_isupper(c) \
|
||||
(isupper(((unsigned char)(c))))
|
||||
|
||||
#define sigar_tolower(c) \
|
||||
(tolower(((unsigned char)(c))))
|
||||
|
||||
#ifdef WIN32
|
||||
#define sigar_fileno _fileno
|
||||
#define sigar_isatty _isatty
|
||||
#define sigar_write _write
|
||||
#else
|
||||
#define sigar_fileno fileno
|
||||
#define sigar_isatty isatty
|
||||
#define sigar_write write
|
||||
#endif
|
||||
|
||||
#ifndef PROC_FS_ROOT
|
||||
#define PROC_FS_ROOT "/proc/"
|
||||
#endif
|
||||
|
||||
#ifndef PROCP_FS_ROOT
|
||||
#define PROCP_FS_ROOT "/proc/"
|
||||
#endif
|
||||
|
||||
sigar_int64_t sigar_time_now_millis(void);
|
||||
|
||||
char *sigar_uitoa(char *buf, unsigned int n, int *len);
|
||||
|
||||
int sigar_inet_ntoa(sigar_t *sigar,
|
||||
sigar_uint32_t address,
|
||||
char *addr_str);
|
||||
|
||||
struct hostent *sigar_gethostbyname(const char *name,
|
||||
sigar_hostent_t *data);
|
||||
|
||||
SIGAR_INLINE char *sigar_skip_line(char *buffer, int buflen);
|
||||
|
||||
SIGAR_INLINE char *sigar_skip_token(char *p);
|
||||
|
||||
SIGAR_INLINE char *sigar_skip_multiple_token(char *p, int count);
|
||||
|
||||
char *sigar_getword(char **line, char stop);
|
||||
|
||||
char *sigar_strcasestr(const char *s1, const char *s2);
|
||||
|
||||
int sigar_file2str(const char *fname, char *buffer, int buflen);
|
||||
|
||||
int sigar_proc_file2str(char *buffer, int buflen,
|
||||
sigar_pid_t pid,
|
||||
const char *fname,
|
||||
int fname_len);
|
||||
|
||||
#define SIGAR_PROC_FILE2STR(buffer, pid, fname) \
|
||||
sigar_proc_file2str(buffer, sizeof(buffer), \
|
||||
pid, fname, SSTRLEN(fname))
|
||||
|
||||
#define SIGAR_PROC_FILENAME(buffer, pid, fname) \
|
||||
sigar_proc_filename(buffer, sizeof(buffer), \
|
||||
pid, fname, SSTRLEN(fname))
|
||||
|
||||
#define SIGAR_SKIP_SPACE(ptr) \
|
||||
while (sigar_isspace(*ptr)) ++ptr
|
||||
|
||||
char *sigar_proc_filename(char *buffer, int buflen,
|
||||
sigar_pid_t pid,
|
||||
const char *fname, int fname_len);
|
||||
|
||||
int sigar_proc_list_procfs_get(sigar_t *sigar,
|
||||
sigar_proc_list_t *proclist);
|
||||
|
||||
int sigar_proc_fd_count(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_uint64_t *total);
|
||||
|
||||
/* linux + freebsd */
|
||||
int sigar_procfs_args_get(sigar_t *sigar, sigar_pid_t pid,
|
||||
sigar_proc_args_t *procargs);
|
||||
|
||||
int sigar_mem_calc_ram(sigar_t *sigar, sigar_mem_t *mem);
|
||||
|
||||
int sigar_statvfs(sigar_t *sigar,
|
||||
const char *dirname,
|
||||
sigar_file_system_usage_t *fsusage);
|
||||
|
||||
double sigar_file_system_usage_calc_used(sigar_t *sigar,
|
||||
sigar_file_system_usage_t *fs);
|
||||
|
||||
#define SIGAR_DEV_PREFIX "/dev/"
|
||||
|
||||
#define SIGAR_NAME_IS_DEV(dev) \
|
||||
strnEQ(dev, SIGAR_DEV_PREFIX, SSTRLEN(SIGAR_DEV_PREFIX))
|
||||
|
||||
typedef struct {
|
||||
char name[256];
|
||||
int is_partition;
|
||||
sigar_disk_usage_t disk;
|
||||
} sigar_iodev_t;
|
||||
|
||||
sigar_iodev_t *sigar_iodev_get(sigar_t *sigar,
|
||||
const char *dirname);
|
||||
|
||||
int sigar_cpu_core_count(sigar_t *sigar);
|
||||
|
||||
/* e.g. VM guest may have 1 virtual ncpu on multicore hosts */
|
||||
#define sigar_cpu_socket_count(sigar) \
|
||||
(sigar->ncpu < sigar->lcpu) ? sigar->ncpu : \
|
||||
(sigar->ncpu / sigar->lcpu)
|
||||
|
||||
int sigar_cpu_core_rollup(sigar_t *sigar);
|
||||
|
||||
void sigar_cpu_model_adjust(sigar_t *sigar, sigar_cpu_info_t *info);
|
||||
|
||||
int sigar_cpu_mhz_from_model(char *model);
|
||||
|
||||
char *sigar_get_self_path(sigar_t *sigar);
|
||||
|
||||
#if defined(__sun) || defined(__FreeBSD__)
|
||||
|
||||
#define SIGAR_HAS_DLINFO_MODULES
|
||||
#include <dlfcn.h>
|
||||
#include <link.h>
|
||||
|
||||
int sigar_dlinfo_modules(sigar_t *sigar, sigar_proc_modules_t *procmods);
|
||||
#endif
|
||||
|
||||
typedef struct sigar_cache_entry_t sigar_cache_entry_t;
|
||||
|
||||
struct sigar_cache_entry_t {
|
||||
sigar_cache_entry_t *next;
|
||||
sigar_uint64_t id;
|
||||
void *value;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
sigar_cache_entry_t **entries;
|
||||
unsigned int count, size;
|
||||
void (*free_value)(void *ptr);
|
||||
} sigar_cache_t;
|
||||
|
||||
sigar_cache_t *sigar_cache_new(int size);
|
||||
|
||||
sigar_cache_entry_t *sigar_cache_get(sigar_cache_t *table,
|
||||
sigar_uint64_t key);
|
||||
|
||||
sigar_cache_entry_t *sigar_cache_find(sigar_cache_t *table,
|
||||
sigar_uint64_t key);
|
||||
|
||||
void sigar_cache_destroy(sigar_cache_t *table);
|
||||
|
||||
#endif /* SIGAR_UTIL_H */
|
||||
BIN
vendor/sigar/libsigar_debug.a
vendored
Normal file
BIN
vendor/sigar/libsigar_debug.a
vendored
Normal file
Binary file not shown.
2151
vendor/sigar/src/os/aix/aix_sigar.c
vendored
Normal file
2151
vendor/sigar/src/os/aix/aix_sigar.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
73
vendor/sigar/src/os/aix/sigar_os.h
vendored
Normal file
73
vendor/sigar/src/os/aix/sigar_os.h
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2007, 2009 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
* Copyright (c) 2010 VMware, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_OS_H
|
||||
#define SIGAR_OS_H
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <procinfo.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
enum {
|
||||
KOFFSET_LOADAVG,
|
||||
KOFFSET_VAR,
|
||||
KOFFSET_SYSINFO,
|
||||
KOFFSET_IFNET,
|
||||
KOFFSET_VMINFO,
|
||||
KOFFSET_CPUINFO,
|
||||
KOFFSET_TCB,
|
||||
KOFFSET_ARPTABSIZE,
|
||||
KOFFSET_ARPTABP,
|
||||
KOFFSET_MAX
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
time_t mtime;
|
||||
int num;
|
||||
char **devs;
|
||||
} swaps_t;
|
||||
|
||||
typedef int (*proc_fd_func_t) (sigar_t *, sigar_pid_t, sigar_proc_fd_t *);
|
||||
|
||||
struct sigar_t {
|
||||
SIGAR_T_BASE;
|
||||
int kmem;
|
||||
/* offsets for seeking on kmem */
|
||||
long koffsets[KOFFSET_MAX];
|
||||
proc_fd_func_t getprocfd;
|
||||
int pagesize;
|
||||
swaps_t swaps;
|
||||
time_t last_getprocs;
|
||||
sigar_pid_t last_pid;
|
||||
struct procsinfo64 *pinfo;
|
||||
struct cpuinfo *cpuinfo;
|
||||
int cpuinfo_size;
|
||||
int cpu_mhz;
|
||||
char model[128];
|
||||
int aix_version;
|
||||
int thrusage;
|
||||
sigar_cache_t *diskmap;
|
||||
};
|
||||
|
||||
#define HAVE_STRERROR_R
|
||||
|
||||
#define SIGAR_EPERM_KMEM (SIGAR_OS_START_ERROR+EACCES)
|
||||
|
||||
#endif /* SIGAR_OS_H */
|
||||
3711
vendor/sigar/src/os/darwin/darwin_sigar.c
vendored
Normal file
3711
vendor/sigar/src/os/darwin/darwin_sigar.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
89
vendor/sigar/src/os/darwin/sigar_os.h
vendored
Normal file
89
vendor/sigar/src/os/darwin/sigar_os.h
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2006, 2008 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_OS_H
|
||||
#define SIGAR_OS_H
|
||||
#ifdef __APPLE__
|
||||
#define DARWIN
|
||||
#endif
|
||||
|
||||
#ifdef DARWIN
|
||||
/// Added to allow this code to compile with gcc4.7 vs Apple's built in compiler.
|
||||
#define __private_extern__ extern
|
||||
|
||||
|
||||
|
||||
|
||||
#include <mach/port.h>
|
||||
#include <mach/host_info.h>
|
||||
#ifdef DARWIN_HAS_LIBPROC_H
|
||||
#include <mach-o/dyld.h>
|
||||
#include <libproc.h>
|
||||
typedef int (*proc_pidinfo_func_t)(int, int, uint64_t, void *, int);
|
||||
typedef int (*proc_pidfdinfo_func_t)(int, int, int, void *, int);
|
||||
#endif
|
||||
#else
|
||||
#include <kvm.h>
|
||||
#endif
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
enum {
|
||||
KOFFSET_CPUINFO,
|
||||
KOFFSET_VMMETER,
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
KOFFSET_TCPSTAT,
|
||||
KOFFSET_TCBTABLE,
|
||||
#endif
|
||||
KOFFSET_MAX
|
||||
};
|
||||
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
typedef struct kinfo_proc2 bsd_pinfo_t;
|
||||
#else
|
||||
typedef struct kinfo_proc bsd_pinfo_t;
|
||||
#endif
|
||||
|
||||
struct sigar_t {
|
||||
SIGAR_T_BASE;
|
||||
int pagesize;
|
||||
time_t last_getprocs;
|
||||
sigar_pid_t last_pid;
|
||||
bsd_pinfo_t *pinfo;
|
||||
int lcpu;
|
||||
size_t argmax;
|
||||
#ifdef DARWIN
|
||||
mach_port_t mach_port;
|
||||
# ifdef DARWIN_HAS_LIBPROC_H
|
||||
void *libproc;
|
||||
proc_pidinfo_func_t proc_pidinfo;
|
||||
proc_pidfdinfo_func_t proc_pidfdinfo;
|
||||
# endif
|
||||
#else
|
||||
kvm_t *kmem;
|
||||
/* offsets for seeking on kmem */
|
||||
unsigned long koffsets[KOFFSET_MAX];
|
||||
int proc_mounted;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define SIGAR_EPERM_KMEM (SIGAR_OS_START_ERROR+EACCES)
|
||||
#define SIGAR_EPROC_NOENT (SIGAR_OS_START_ERROR+2)
|
||||
|
||||
#endif /* SIGAR_OS_H */
|
||||
1342
vendor/sigar/src/os/hpux/hpux_sigar.c
vendored
Normal file
1342
vendor/sigar/src/os/hpux/hpux_sigar.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
49
vendor/sigar/src/os/hpux/sigar_os.h
vendored
Normal file
49
vendor/sigar/src/os/hpux/sigar_os.h
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2007 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_OS_H
|
||||
#define SIGAR_OS_H
|
||||
|
||||
#if defined(__ia64) && !defined(__ia64__)
|
||||
#define __ia64__
|
||||
#endif
|
||||
|
||||
#ifdef __ia64__
|
||||
#ifndef _LP64
|
||||
#define _LP64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _PSTAT64
|
||||
|
||||
#include <sys/pstat.h>
|
||||
#include <sys/mib.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
struct sigar_t {
|
||||
SIGAR_T_BASE;
|
||||
struct pst_static pstatic;
|
||||
time_t last_getprocs;
|
||||
sigar_pid_t last_pid;
|
||||
struct pst_status *pinfo;
|
||||
|
||||
int mib;
|
||||
};
|
||||
|
||||
int hpux_get_mib_ifentry(int ppa, mib_ifEntry *mib);
|
||||
|
||||
#endif /* SIGAR_OS_H */
|
||||
2782
vendor/sigar/src/os/linux/linux_sigar.c
vendored
Normal file
2782
vendor/sigar/src/os/linux/linux_sigar.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
82
vendor/sigar/src/os/linux/sigar_os.h
vendored
Normal file
82
vendor/sigar/src/os/linux/sigar_os.h
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2008 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SIGAR_OS_H
|
||||
#define SIGAR_OS_H
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef struct {
|
||||
sigar_pid_t pid;
|
||||
time_t mtime;
|
||||
sigar_uint64_t vsize;
|
||||
sigar_uint64_t rss;
|
||||
sigar_uint64_t minor_faults;
|
||||
sigar_uint64_t major_faults;
|
||||
sigar_uint64_t ppid;
|
||||
int tty;
|
||||
int priority;
|
||||
int nice;
|
||||
sigar_uint64_t start_time;
|
||||
sigar_uint64_t utime;
|
||||
sigar_uint64_t stime;
|
||||
char name[SIGAR_PROC_NAME_LEN];
|
||||
char state;
|
||||
int processor;
|
||||
} linux_proc_stat_t;
|
||||
|
||||
typedef enum {
|
||||
IOSTAT_NONE,
|
||||
IOSTAT_PARTITIONS, /* 2.4 */
|
||||
IOSTAT_DISKSTATS, /* 2.6 */
|
||||
IOSTAT_SYS /* 2.6 */
|
||||
} linux_iostat_e;
|
||||
|
||||
struct sigar_t {
|
||||
SIGAR_T_BASE;
|
||||
int pagesize;
|
||||
int ram;
|
||||
int proc_signal_offset;
|
||||
linux_proc_stat_t last_proc_stat;
|
||||
int lcpu;
|
||||
linux_iostat_e iostat;
|
||||
char *proc_net;
|
||||
/* Native POSIX Thread Library 2.6+ kernel */
|
||||
int has_nptl;
|
||||
};
|
||||
|
||||
#define HAVE_STRERROR_R
|
||||
#ifndef __USE_XOPEN2K
|
||||
/* use gnu version of strerror_r */
|
||||
#define HAVE_STRERROR_R_GLIBC
|
||||
#endif
|
||||
#define HAVE_READDIR_R
|
||||
#define HAVE_GETPWNAM_R
|
||||
#define HAVE_GETPWUID_R
|
||||
#define HAVE_GETGRGID_R
|
||||
|
||||
#endif /* SIGAR_OS_H */
|
||||
321
vendor/sigar/src/os/solaris/get_mib2.c
vendored
Normal file
321
vendor/sigar/src/os/solaris/get_mib2.c
vendored
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
/*
|
||||
* get_mib2() -- get MIB2 information from Solaris 2.[3-7] kernel
|
||||
*
|
||||
* V. Abell <abe@cc.purdue.edu>
|
||||
* Purdue University Computing Center
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Copyright 1995 Purdue Research Foundation, West Lafayette, Indiana
|
||||
* 47907. All rights reserved.
|
||||
*
|
||||
* Written by Victor A. Abell <abe@cc.purdue.edu>
|
||||
*
|
||||
* This software is not subject to any license of the American Telephone
|
||||
* and Telegraph Company or the Regents of the University of California.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose on
|
||||
* any computer system, and to alter it and redistribute it freely, subject
|
||||
* to the following restrictions:
|
||||
*
|
||||
* 1. Neither Victor A Abell nor Purdue University are responsible for
|
||||
* any consequences of the use of this software.
|
||||
*
|
||||
* 2. The origin of this software must not be misrepresented, either by
|
||||
* explicit claim or by omission. Credit to Victor A. Abell and Purdue
|
||||
* University must appear in documentation and sources.
|
||||
*
|
||||
* 3. Altered versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
*
|
||||
* 4. This notice may not be removed or altered.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Altered for sigar:
|
||||
* - remove static stuff to make thread-safe by Doug MacEachern (3/11/05)
|
||||
*/
|
||||
|
||||
#if 0 /*ndef lint -Wall -Werror*/
|
||||
static char copyright[] =
|
||||
"@(#) Copyright 1995 Purdue Research Foundation.\nAll rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#include "get_mib2.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* close_mib2() - close MIB2 access
|
||||
*
|
||||
* return:
|
||||
*
|
||||
* exit = GET_MIB2_OK if close succeeded
|
||||
* GET_MIB2_* is the error code.
|
||||
*/
|
||||
|
||||
int
|
||||
close_mib2(solaris_mib2_t *mib2)
|
||||
{
|
||||
if (mib2->sd < 0) {
|
||||
(void) strcpy(mib2->errmsg, "close_mib2: socket not open");
|
||||
return(GET_MIB2_ERR_NOTOPEN);
|
||||
}
|
||||
if (close(mib2->sd)) {
|
||||
(void) sprintf(mib2->errmsg, "close_mib2: %s", strerror(errno));
|
||||
return(GET_MIB2_ERR_CLOSE);
|
||||
}
|
||||
mib2->sd = -1;
|
||||
if (mib2->db_len && mib2->db) {
|
||||
mib2->db_len = 0;
|
||||
free((void *)mib2->db);
|
||||
mib2->db = NULL;
|
||||
}
|
||||
if (mib2->smb_len && mib2->smb) {
|
||||
mib2->smb_len = 0;
|
||||
free((void *)mib2->smb);
|
||||
mib2->smb = NULL;
|
||||
}
|
||||
return(GET_MIB2_OK);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* get_mib2() - get MIB2 data
|
||||
*
|
||||
* return:
|
||||
*
|
||||
* exit = GET_MIB2_OK if get succeeded, and:
|
||||
* *opt = opthdr structure address
|
||||
* *data = data buffer address
|
||||
* *datalen = size of data buffer
|
||||
* GET_MIB2_* is the error code for failure.
|
||||
*/
|
||||
|
||||
int
|
||||
get_mib2(solaris_mib2_t *mib2,
|
||||
struct opthdr **opt,
|
||||
char **data,
|
||||
int *datalen)
|
||||
{
|
||||
struct strbuf d; /* streams data buffer */
|
||||
int err; /* error code */
|
||||
int f; /* flags */
|
||||
int rc; /* reply code */
|
||||
|
||||
/*
|
||||
* If MIB2 access isn't open, open it and issue the preliminary stream
|
||||
* messages.
|
||||
*/
|
||||
if (mib2->sd < 0) {
|
||||
/*
|
||||
* Open access. Return on error.
|
||||
*/
|
||||
if ((err = open_mib2(mib2))) {
|
||||
return(err);
|
||||
}
|
||||
/*
|
||||
* Set up message request and option.
|
||||
*/
|
||||
mib2->req = (struct T_optmgmt_req *)mib2->smb;
|
||||
mib2->op = (struct opthdr *)&mib2->smb[sizeof(struct T_optmgmt_req)];
|
||||
mib2->req->PRIM_type = T_OPTMGMT_REQ;
|
||||
mib2->req->OPT_offset = sizeof(struct T_optmgmt_req);
|
||||
mib2->req->OPT_length = sizeof(struct opthdr);
|
||||
|
||||
#if defined(MI_T_CURRENT)
|
||||
mib2->req->MGMT_flags = MI_T_CURRENT;
|
||||
#else /* !defined(MI_T_CURRENT) */
|
||||
# if defined(T_CURRENT)
|
||||
mib2->req->MGMT_flags = T_CURRENT;
|
||||
# else /* !defined(T_CURRENT) */
|
||||
#error "Neither MI_T_CURRENT nor T_CURRENT are defined."
|
||||
# endif /* defined(T_CURRENT) */
|
||||
#endif /* defined(MI_T_CURRENT) */
|
||||
|
||||
mib2->op->level = MIB2_IP;
|
||||
mib2->op->name = mib2->op->len = 0;
|
||||
mib2->ctlbuf.buf = mib2->smb;
|
||||
mib2->ctlbuf.len = mib2->req->OPT_offset + mib2->req->OPT_length;
|
||||
/*
|
||||
* Put the message.
|
||||
*/
|
||||
if (putmsg(mib2->sd, &mib2->ctlbuf, (struct strbuf *)NULL, 0) == -1) {
|
||||
(void) sprintf(mib2->errmsg,
|
||||
"get_mib2: putmsg request: %s", strerror(errno));
|
||||
return(GET_MIB2_ERR_PUTMSG);
|
||||
}
|
||||
/*
|
||||
* Set up to process replies.
|
||||
*/
|
||||
mib2->op_ack = (struct T_optmgmt_ack *)mib2->smb;
|
||||
mib2->ctlbuf.maxlen = mib2->smb_len;
|
||||
mib2->err_ack = (struct T_error_ack *)mib2->smb;
|
||||
mib2->op = (struct opthdr *)&mib2->smb[sizeof(struct T_optmgmt_ack)];
|
||||
}
|
||||
/*
|
||||
* Get the next (first) reply message.
|
||||
*/
|
||||
f = 0;
|
||||
if ((rc = getmsg(mib2->sd, &mib2->ctlbuf, NULL, &f)) < 0) {
|
||||
(void) sprintf(mib2->errmsg, "get_mib2: getmsg(reply): %s",
|
||||
strerror(errno));
|
||||
return(GET_MIB2_ERR_GETMSGR);
|
||||
}
|
||||
/*
|
||||
* Check for end of data.
|
||||
*/
|
||||
if (rc == 0
|
||||
&& mib2->ctlbuf.len >= sizeof(struct T_optmgmt_ack)
|
||||
&& mib2->op_ack->PRIM_type == T_OPTMGMT_ACK
|
||||
&& mib2->op_ack->MGMT_flags == T_SUCCESS
|
||||
&& mib2->op->len == 0)
|
||||
{
|
||||
err = close_mib2(mib2);
|
||||
if (err) {
|
||||
return(err);
|
||||
}
|
||||
return(GET_MIB2_EOD);
|
||||
}
|
||||
/*
|
||||
* Check for error.
|
||||
*/
|
||||
if (mib2->ctlbuf.len >= sizeof(struct T_error_ack)
|
||||
&& mib2->err_ack->PRIM_type == T_ERROR_ACK)
|
||||
{
|
||||
(void) sprintf(mib2->errmsg,
|
||||
"get_mib2: T_ERROR_ACK: len=%d, TLI=%#x, UNIX=%#x",
|
||||
mib2->ctlbuf.len,
|
||||
(int)mib2->err_ack->TLI_error,
|
||||
(int)mib2->err_ack->UNIX_error);
|
||||
return(GET_MIB2_ERR_ACK);
|
||||
}
|
||||
/*
|
||||
* Check for no data.
|
||||
*/
|
||||
if (rc != MOREDATA
|
||||
|| mib2->ctlbuf.len < sizeof(struct T_optmgmt_ack)
|
||||
|| mib2->op_ack->PRIM_type != T_OPTMGMT_ACK
|
||||
|| mib2->op_ack->MGMT_flags != T_SUCCESS)
|
||||
{
|
||||
(void) sprintf(mib2->errmsg,
|
||||
"get_mib2: T_OPTMGMT_ACK: "
|
||||
"rc=%d len=%d type=%#x flags=%#x",
|
||||
rc, mib2->ctlbuf.len,
|
||||
(int)mib2->op_ack->PRIM_type,
|
||||
(int)mib2->op_ack->MGMT_flags);
|
||||
return(GET_MIB2_ERR_NODATA);
|
||||
}
|
||||
/*
|
||||
* Allocate (or enlarge) the data buffer.
|
||||
*/
|
||||
if (mib2->op->len >= mib2->db_len) {
|
||||
mib2->db_len = mib2->op->len;
|
||||
if (mib2->db == NULL) {
|
||||
mib2->db = (char *)malloc(mib2->db_len);
|
||||
}
|
||||
else {
|
||||
mib2->db = (char *)realloc(mib2->db, mib2->db_len);
|
||||
}
|
||||
if (mib2->db == NULL) {
|
||||
(void) sprintf(mib2->errmsg,
|
||||
"get_mib2: no space for %d byte data buffer",
|
||||
mib2->db_len);
|
||||
return(GET_MIB2_ERR_NOSPC);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Get the data part of the message -- the MIB2 part.
|
||||
*/
|
||||
d.maxlen = mib2->op->len;
|
||||
d.buf = mib2->db;
|
||||
d.len = 0;
|
||||
f = 0;
|
||||
if ((rc = getmsg(mib2->sd, NULL, &d, &f)) < 0) {
|
||||
(void) sprintf(mib2->errmsg, "get_mib2: getmsg(data): %s",
|
||||
strerror(errno));
|
||||
return(GET_MIB2_ERR_GETMSGD);
|
||||
}
|
||||
if (rc) {
|
||||
(void) sprintf(mib2->errmsg,
|
||||
"get_mib2: getmsg(data): rc=%d maxlen=%d len=%d: %s",
|
||||
rc, d.maxlen, d.len, strerror(errno));
|
||||
return(GET_MIB2_ERR_GETMSGD);
|
||||
}
|
||||
/*
|
||||
* Compose a successful return.
|
||||
*/
|
||||
*opt = mib2->op;
|
||||
*data = mib2->db;
|
||||
*datalen = d.len;
|
||||
return(GET_MIB2_OK);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* open_mib2() - open access to MIB2 data
|
||||
*
|
||||
* return:
|
||||
*
|
||||
* exit = GET_MIB2_OK if open succeeded
|
||||
* GET_MIB2_* is the error code for failure.
|
||||
*/
|
||||
|
||||
int
|
||||
open_mib2(solaris_mib2_t *mib2)
|
||||
{
|
||||
/*
|
||||
* It's an error if the stream device is already open.
|
||||
*/
|
||||
if (mib2->sd >= 0) {
|
||||
(void) strcpy(mib2->errmsg, "open_mib2: MIB2 access already open");
|
||||
return(GET_MIB2_ERR_OPEN);
|
||||
}
|
||||
/*
|
||||
* Open the ARP stream device, push TCP and UDP on it.
|
||||
*/
|
||||
if ((mib2->sd = open(GET_MIB2_ARPDEV, O_RDWR, 0600)) < 0) {
|
||||
(void) sprintf(mib2->errmsg, "open_mib2: %s: %s", GET_MIB2_ARPDEV,
|
||||
strerror(errno));
|
||||
return(GET_MIB2_ERR_ARPOPEN);
|
||||
}
|
||||
if (ioctl(mib2->sd, I_PUSH, GET_MIB2_TCPSTREAM) == -1) {
|
||||
(void) sprintf(mib2->errmsg, "open_mib2: push %s: %s",
|
||||
GET_MIB2_TCPSTREAM, strerror(errno));
|
||||
return(GET_MIB2_ERR_TCPPUSH);
|
||||
}
|
||||
if (ioctl(mib2->sd, I_PUSH, GET_MIB2_UDPSTREAM) == -1) {
|
||||
(void) sprintf(mib2->errmsg, "open_mib2: push %s: %s",
|
||||
GET_MIB2_UDPSTREAM, strerror(errno));
|
||||
return(GET_MIB2_ERR_UDPPUSH);
|
||||
}
|
||||
/*
|
||||
* Allocate a stream message buffer.
|
||||
*/
|
||||
mib2->smb_len = sizeof(struct opthdr) + sizeof(struct T_optmgmt_req);
|
||||
if (mib2->smb_len < (sizeof (struct opthdr) + sizeof(struct T_optmgmt_ack))) {
|
||||
mib2->smb_len = sizeof (struct opthdr) + sizeof(struct T_optmgmt_ack);
|
||||
}
|
||||
if (mib2->smb_len < sizeof(struct T_error_ack)) {
|
||||
mib2->smb_len = sizeof(struct T_error_ack);
|
||||
}
|
||||
if ((mib2->smb = (char *)malloc(mib2->smb_len)) == NULL) {
|
||||
(void) strcpy(mib2->errmsg,
|
||||
"open_mib2: no space for stream message buffer");
|
||||
return(GET_MIB2_ERR_NOSPC);
|
||||
}
|
||||
/*
|
||||
* All is OK. Return that indication.
|
||||
*/
|
||||
return(GET_MIB2_OK);
|
||||
}
|
||||
127
vendor/sigar/src/os/solaris/get_mib2.h
vendored
Normal file
127
vendor/sigar/src/os/solaris/get_mib2.h
vendored
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* get_mib2.h -- definitions for the get_mib2() function
|
||||
*
|
||||
* V. Abell <abe@cc.purdue.edu>
|
||||
* Purdue University Computing Center
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Copyright 1995 Purdue Research Foundation, West Lafayette, Indiana
|
||||
* 47907. All rights reserved.
|
||||
*
|
||||
* Written by Victor A. Abell <abe@cc.purdue.edu>
|
||||
*
|
||||
* This software is not subject to any license of the American Telephone
|
||||
* and Telegraph Company or the Regents of the University of California.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose on
|
||||
* any computer system, and to alter it and redistribute it freely, subject
|
||||
* to the following restrictions:
|
||||
*
|
||||
* 1. Neither Victor A Abell nor Purdue University are responsible for
|
||||
* any consequences of the use of this software.
|
||||
*
|
||||
* 2. The origin of this software must not be misrepresented, either by
|
||||
* explicit claim or by omission. Credit to Victor A. Abell and Purdue
|
||||
* University must appear in documentation and sources.
|
||||
*
|
||||
* 3. Altered versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
*
|
||||
* 4. This notice may not be removed or altered.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Altered for sigar:
|
||||
* - remove static stuff to make thread-safe by Doug MacEachern (3/11/05)
|
||||
*/
|
||||
|
||||
#if !defined(GET_MIB2_H)
|
||||
#define GET_MIB2_H
|
||||
|
||||
|
||||
/*
|
||||
* Required header files
|
||||
*/
|
||||
|
||||
#include <stropts.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stream.h>
|
||||
#include <sys/tihdr.h>
|
||||
#include <sys/tiuser.h>
|
||||
#include <inet/mib2.h>
|
||||
#include <inet/led.h>
|
||||
|
||||
|
||||
/*
|
||||
* Miscellaneous definitions
|
||||
*/
|
||||
|
||||
#define GET_MIB2_ARPDEV "/dev/arp" /* ARP stream devi9ce */
|
||||
#define GET_MIB2_ERRMSGL 1024 /* ErrMsg buffer length */
|
||||
#define GET_MIB2_TCPSTREAM "tcp" /* TCP stream name */
|
||||
#define GET_MIB2_UDPSTREAM "udp" /* UDP stream name */
|
||||
|
||||
|
||||
/*
|
||||
* get_mib2() response codes
|
||||
*
|
||||
* -1 End of MIB2 information
|
||||
* 0 Next MIB2 structure returned
|
||||
* >0 Error code
|
||||
*/
|
||||
|
||||
#define GET_MIB2_EOD -1 /* end of data */
|
||||
#define GET_MIB2_OK 0 /* function succeeded */
|
||||
#define GET_MIB2_ERR_ACK 1 /* getmsg() ACK error received */
|
||||
#define GET_MIB2_ERR_ARPOPEN 2 /* error opening ARPDEV */
|
||||
#define GET_MIB2_ERR_CLOSE 3 /* MIB2 access close error */
|
||||
#define GET_MIB2_ERR_GETMSGD 4 /* error getting message data */
|
||||
#define GET_MIB2_ERR_GETMSGR 5 /* error getting message reply */
|
||||
#define GET_MIB2_ERR_NODATA 6 /* data expected; not received */
|
||||
#define GET_MIB2_ERR_NOSPC 7 /* no malloc() space */
|
||||
#define GET_MIB2_ERR_NOTOPEN 8 /* MIB2 access not open */
|
||||
#define GET_MIB2_ERR_OPEN 9 /* MIB2 access open error */
|
||||
#define GET_MIB2_ERR_PUTMSG 10 /* error putting request message */
|
||||
#define GET_MIB2_ERR_TCPPUSH 11 /* error pushing TCPSTREAM */
|
||||
#define GET_MIB2_ERR_UDPPUSH 12 /* error pushing UDPSTREAM */
|
||||
|
||||
#define GET_MIB2_ERR_MAX 13 /* maximum error number + 1 */
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *db; /* data buffer */
|
||||
int db_len; /* data buffer length */
|
||||
char *smb; /* stream message buffer */
|
||||
size_t smb_len; /* size of Smb[] */
|
||||
int sd; /* stream device descriptor */
|
||||
char errmsg[GET_MIB2_ERRMSGL]; /* error message buffer */
|
||||
struct T_optmgmt_ack *op_ack; /* message ACK pointer */
|
||||
struct strbuf ctlbuf; /* streams control buffer */
|
||||
struct T_error_ack *err_ack; /* message error pointer */
|
||||
struct opthdr *op; /* message option pointer */
|
||||
struct T_optmgmt_req *req; /* message request pointer */
|
||||
} solaris_mib2_t;
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
*/
|
||||
|
||||
int close_mib2( /* close acccess to MIB2 information */
|
||||
solaris_mib2_t *mib2
|
||||
);
|
||||
int get_mib2( /* get MIB2 information */
|
||||
solaris_mib2_t *mib2,
|
||||
struct opthdr **opt, /* opthdr pointer return (see
|
||||
* <sys/socket.h> */
|
||||
char **data, /* data buffer return address */
|
||||
int *datalen /* data buffer length return
|
||||
* address */
|
||||
);
|
||||
int open_mib2( /* open acccess to MIB2 information */
|
||||
solaris_mib2_t *mib2
|
||||
);
|
||||
|
||||
#endif /* !defined(GET_MIB2_H) */
|
||||
181
vendor/sigar/src/os/solaris/kstats.c
vendored
Normal file
181
vendor/sigar/src/os/solaris/kstats.c
vendored
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2007 Hyperic, Inc.
|
||||
* Copyright (c) 2009 SpringSource, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "sigar.h"
|
||||
#include "sigar_private.h"
|
||||
#include "sigar_util.h"
|
||||
#include "sigar_os.h"
|
||||
|
||||
int sigar_get_kstats(sigar_t *sigar)
|
||||
{
|
||||
kstat_ctl_t *kc = sigar->kc;
|
||||
unsigned int i, id, ncpu = sysconf(_SC_NPROCESSORS_CONF);
|
||||
int is_debug = SIGAR_LOG_IS_DEBUG(sigar);
|
||||
|
||||
if (ncpu != sigar->ncpu) {
|
||||
if (!sigar->ks.lcpu) {
|
||||
/* init */
|
||||
sigar->ks.lcpu = ncpu;
|
||||
sigar->ks.cpu = malloc(sizeof(*(sigar->ks.cpu)) * ncpu);
|
||||
sigar->ks.cpu_info = malloc(sizeof(*(sigar->ks.cpu_info)) * ncpu);
|
||||
sigar->ks.cpuid = malloc(sizeof(*(sigar->ks.cpuid)) * ncpu);
|
||||
}
|
||||
else {
|
||||
sigar_log_printf(sigar, SIGAR_LOG_INFO,
|
||||
"ncpu changed from %d to %d",
|
||||
sigar->ncpu, ncpu);
|
||||
if (ncpu > sigar->ks.lcpu) {
|
||||
/* one or more cpus have been added */
|
||||
sigar->ks.cpu = realloc(sigar->ks.cpu,
|
||||
sizeof(*(sigar->ks.cpu)) * ncpu);
|
||||
sigar->ks.cpu_info = realloc(sigar->ks.cpu_info,
|
||||
sizeof(*(sigar->ks.cpu_info)) * ncpu);
|
||||
sigar->ks.cpuid = realloc(sigar->ks.cpuid,
|
||||
sizeof(*(sigar->ks.cpuid)) * ncpu);
|
||||
sigar->ks.lcpu = ncpu;
|
||||
}
|
||||
/* else or more cpus have been removed */
|
||||
}
|
||||
|
||||
sigar->ncpu = ncpu;
|
||||
|
||||
/* from man p_online:
|
||||
* ``Processor numbers are integers,
|
||||
* greater than or equal to 0,
|
||||
* and are defined by the hardware platform.
|
||||
* Processor numbers are not necessarily contiguous,
|
||||
* but "not too sparse."``
|
||||
* so we maintain our own mapping in ks.cpuid[]
|
||||
*/
|
||||
|
||||
/* lookup in order, which kstat chain may not be in */
|
||||
for (i=0, id=0; i<ncpu; id++) {
|
||||
kstat_t *cpu_info, *cpu_stat;
|
||||
|
||||
if (!(cpu_info = kstat_lookup(kc, "cpu_info", id, NULL))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(cpu_stat = kstat_lookup(kc, "cpu_stat", id, NULL))) {
|
||||
/* XXX warn, faulted cpu? */
|
||||
}
|
||||
|
||||
sigar->ks.cpu_info[i] = cpu_info;
|
||||
sigar->ks.cpu[i] = cpu_stat;
|
||||
sigar->ks.cpuid[i] = id;
|
||||
|
||||
if (is_debug) {
|
||||
sigar_log_printf(sigar, SIGAR_LOG_DEBUG,
|
||||
"cpu %d id=%d", i, sigar->ks.cpuid[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
sigar->ks.system = kstat_lookup(kc, "unix", -1, "system_misc");
|
||||
sigar->ks.syspages = kstat_lookup(kc, "unix", -1, "system_pages");
|
||||
sigar->ks.mempages = kstat_lookup(kc, "bunyip", -1, "mempages");
|
||||
|
||||
return SIGAR_OK;
|
||||
}
|
||||
|
||||
SIGAR_INLINE kid_t sigar_kstat_update(sigar_t *sigar)
|
||||
{
|
||||
kid_t id = kstat_chain_update(sigar->kc);
|
||||
|
||||
switch (id) {
|
||||
case -1:
|
||||
sigar_log_printf(sigar, SIGAR_LOG_ERROR,
|
||||
"kstat_chain_update error: %s",
|
||||
sigar_strerror(sigar, errno));
|
||||
break;
|
||||
case 0:
|
||||
/* up-to-date */
|
||||
break;
|
||||
default:
|
||||
sigar_get_kstats(sigar);
|
||||
sigar_log(sigar, SIGAR_LOG_DEBUG,
|
||||
"kstat chain updated");
|
||||
break;
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
/*
|
||||
* bincompat is not possible with certain kstat data structures between
|
||||
* solaris 2.6, 2.7, 2.8, etc. alternative is to use kstat_data_lookup()
|
||||
* which means everytime we want a stat, must do a linear search
|
||||
* of ksp->ks_data. eek. so we meet half way and do the search for
|
||||
* each key once per sigar_t instance. once the initial search has
|
||||
* been done, we have a table of offsets to quickly access the stats via
|
||||
* ksp->ks_data + offset. this gives us bincompat without the overhead
|
||||
* of many kstat_data_lookup calls.
|
||||
*/
|
||||
static SIGAR_INLINE int kstat_named_offset(kstat_t *ksp, const char *name)
|
||||
{
|
||||
unsigned int i;
|
||||
kstat_named_t *kn;
|
||||
|
||||
for (i=0, kn=ksp->ks_data;
|
||||
i<ksp->ks_ndata;
|
||||
i++, kn++)
|
||||
{
|
||||
if (strEQ(kn->name, name)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -2; /* not found */
|
||||
}
|
||||
|
||||
static char *kstat_keys_system[] = {
|
||||
"boot_time",
|
||||
"avenrun_1min",
|
||||
"avenrun_5min",
|
||||
"avenrun_15min",
|
||||
NULL
|
||||
};
|
||||
|
||||
static char *kstat_keys_mempages[] = {
|
||||
"pages_anon",
|
||||
"pages_exec",
|
||||
"pages_vnode",
|
||||
NULL
|
||||
};
|
||||
|
||||
static char *kstat_keys_syspages[] = {
|
||||
"pagesfree",
|
||||
NULL
|
||||
};
|
||||
|
||||
static char **kstat_keys[] = {
|
||||
kstat_keys_system,
|
||||
kstat_keys_mempages,
|
||||
kstat_keys_syspages,
|
||||
};
|
||||
|
||||
void sigar_koffsets_lookup(kstat_t *ksp, int *offsets, int kidx)
|
||||
{
|
||||
int i;
|
||||
char **keys = kstat_keys[kidx];
|
||||
|
||||
for (i=0; keys[i]; i++) {
|
||||
offsets[i] = kstat_named_offset(ksp, keys[i]);
|
||||
}
|
||||
}
|
||||
|
||||
97
vendor/sigar/src/os/solaris/procfs.c
vendored
Normal file
97
vendor/sigar/src/os/solaris/procfs.c
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2006 Hyperic, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "sigar.h"
|
||||
#include "sigar_private.h"
|
||||
#include "sigar_util.h"
|
||||
#include "sigar_os.h"
|
||||
|
||||
#define my_pread(fd, ptr, type, offset) \
|
||||
(pread(fd, ptr, sizeof(type), offset) == sizeof(type))
|
||||
|
||||
int sigar_proc_psinfo_get(sigar_t *sigar, sigar_pid_t pid)
|
||||
{
|
||||
int fd, retval = SIGAR_OK;
|
||||
char buffer[BUFSIZ];
|
||||
time_t timenow = time(NULL);
|
||||
|
||||
if (sigar->pinfo == NULL) {
|
||||
sigar->pinfo = malloc(sizeof(*sigar->pinfo));
|
||||
}
|
||||
|
||||
if (sigar->last_pid == pid) {
|
||||
if ((timenow - sigar->last_getprocs) < SIGAR_LAST_PROC_EXPIRE) {
|
||||
return SIGAR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
sigar->last_pid = pid;
|
||||
sigar->last_getprocs = timenow;
|
||||
|
||||
(void)SIGAR_PROC_FILENAME(buffer, pid, "/psinfo");
|
||||
|
||||
if ((fd = open(buffer, O_RDONLY)) < 0) {
|
||||
return ESRCH;
|
||||
}
|
||||
|
||||
if (!my_pread(fd, sigar->pinfo, psinfo_t, 0)) {
|
||||
retval = errno;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int sigar_proc_usage_get(sigar_t *sigar, prusage_t *prusage, sigar_pid_t pid)
|
||||
{
|
||||
int fd, retval = SIGAR_OK;
|
||||
char buffer[BUFSIZ];
|
||||
|
||||
(void)SIGAR_PROC_FILENAME(buffer, pid, "/usage");
|
||||
|
||||
if ((fd = open(buffer, O_RDONLY)) < 0) {
|
||||
return ESRCH;
|
||||
}
|
||||
|
||||
if (!my_pread(fd, prusage, prusage_t, 0)) {
|
||||
retval = errno;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int sigar_proc_status_get(sigar_t *sigar, pstatus_t *pstatus, sigar_pid_t pid)
|
||||
{
|
||||
int fd, retval = SIGAR_OK;
|
||||
char buffer[BUFSIZ];
|
||||
|
||||
(void)SIGAR_PROC_FILENAME(buffer, pid, "/status");
|
||||
|
||||
if ((fd = open(buffer, O_RDONLY)) < 0) {
|
||||
return ESRCH;
|
||||
}
|
||||
|
||||
if (!my_pread(fd, pstatus, pstatus_t, 0)) {
|
||||
retval = errno;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
return retval;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue