mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-31 01:45:10 +02:00
Source snapshot from Powershell/openssh-portable:latestw_all
This commit is contained in:
parent
2c3a1a95d0
commit
944505e199
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,6 +10,7 @@ openbsd-compat/regress/Makefile
|
|||||||
openssh.xml
|
openssh.xml
|
||||||
opensshd.init
|
opensshd.init
|
||||||
survey.sh
|
survey.sh
|
||||||
|
**/*.0
|
||||||
**/*.o
|
**/*.o
|
||||||
**/*.out
|
**/*.out
|
||||||
**/*.a
|
**/*.a
|
||||||
@ -33,7 +34,7 @@ sshd
|
|||||||
/contrib/win32/openssh/Win32/Debug/libssh/libssh.tlog
|
/contrib/win32/openssh/Win32/Debug/libssh/libssh.tlog
|
||||||
/contrib/win32/openssh/Win32/Debug/libssh
|
/contrib/win32/openssh/Win32/Debug/libssh
|
||||||
/config.h
|
/config.h
|
||||||
|
/contrib/win32/openssh/LibreSSLSDK
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
@ -16,3 +16,4 @@ f6ae971186ba68d066cd102e57d5b0b2c211a5ee systrace is dead.
|
|||||||
1e6b51ddf767cbad0a4e63eb08026c127e654308 integrity.sh reliability
|
1e6b51ddf767cbad0a4e63eb08026c127e654308 integrity.sh reliability
|
||||||
fe5b31f69a60d47171836911f144acff77810217 Makefile.inc bits
|
fe5b31f69a60d47171836911f144acff77810217 Makefile.inc bits
|
||||||
5781670c0578fe89663c9085ed3ba477cf7e7913 Delete sshconnect1.c
|
5781670c0578fe89663c9085ed3ba477cf7e7913 Delete sshconnect1.c
|
||||||
|
ea80f445e819719ccdcb237022cacfac990fdc5c Makefile.inc warning flags
|
||||||
|
6
PROTOCOL
6
PROTOCOL
@ -33,8 +33,8 @@ The method is documented in:
|
|||||||
|
|
||||||
https://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
|
https://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
|
||||||
|
|
||||||
1.3. transport: New public key algorithms "ssh-rsa-cert-v00@openssh.com",
|
1.3. transport: New public key algorithms "ssh-rsa-cert-v01@openssh.com",
|
||||||
"ssh-dsa-cert-v00@openssh.com",
|
"ssh-dsa-cert-v01@openssh.com",
|
||||||
"ecdsa-sha2-nistp256-cert-v01@openssh.com",
|
"ecdsa-sha2-nistp256-cert-v01@openssh.com",
|
||||||
"ecdsa-sha2-nistp384-cert-v01@openssh.com" and
|
"ecdsa-sha2-nistp384-cert-v01@openssh.com" and
|
||||||
"ecdsa-sha2-nistp521-cert-v01@openssh.com"
|
"ecdsa-sha2-nistp521-cert-v01@openssh.com"
|
||||||
@ -454,4 +454,4 @@ respond with a SSH_FXP_STATUS message.
|
|||||||
This extension is advertised in the SSH_FXP_VERSION hello with version
|
This extension is advertised in the SSH_FXP_VERSION hello with version
|
||||||
"1".
|
"1".
|
||||||
|
|
||||||
$OpenBSD: PROTOCOL,v 1.30 2016/04/08 06:35:54 djm Exp $
|
$OpenBSD: PROTOCOL,v 1.31 2017/05/26 01:40:07 djm Exp $
|
||||||
|
585
PROTOCOL.agent
585
PROTOCOL.agent
@ -1,582 +1,3 @@
|
|||||||
This describes the protocol used by OpenSSH's ssh-agent.
|
This file used to contain a description of the SSH agent protocol
|
||||||
|
implemented by OpenSSH. It has since been superseded by
|
||||||
OpenSSH's agent supports managing keys for the standard SSH protocol
|
https://tools.ietf.org/html/draft-miller-ssh-agent-00
|
||||||
2 as well as the legacy SSH protocol 1. Support for these key types
|
|
||||||
is almost completely disjoint - in all but a few cases, operations on
|
|
||||||
protocol 2 keys cannot see or affect protocol 1 keys and vice-versa.
|
|
||||||
|
|
||||||
Protocol 1 and protocol 2 keys are separated because of the differing
|
|
||||||
cryptographic usage: protocol 1 private RSA keys are used to decrypt
|
|
||||||
challenges that were encrypted with the corresponding public key,
|
|
||||||
whereas protocol 2 RSA private keys are used to sign challenges with
|
|
||||||
a private key for verification with the corresponding public key. It
|
|
||||||
is considered unsound practice to use the same key for signing and
|
|
||||||
encryption.
|
|
||||||
|
|
||||||
With a couple of exceptions, the protocol message names used in this
|
|
||||||
document indicate which type of key the message relates to. SSH_*
|
|
||||||
messages refer to protocol 1 keys only. SSH2_* messages refer to
|
|
||||||
protocol 2 keys. Furthermore, the names also indicate whether the
|
|
||||||
message is a request to the agent (*_AGENTC_*) or a reply from the
|
|
||||||
agent (*_AGENT_*). Section 3 below contains the mapping of the
|
|
||||||
protocol message names to their integer values.
|
|
||||||
|
|
||||||
1. Data types
|
|
||||||
|
|
||||||
Because of support for legacy SSH protocol 1 keys, OpenSSH's agent
|
|
||||||
protocol makes use of some data types not defined in RFC 4251.
|
|
||||||
|
|
||||||
1.1 uint16
|
|
||||||
|
|
||||||
The "uint16" data type is a simple MSB-first 16 bit unsigned integer
|
|
||||||
encoded in two bytes.
|
|
||||||
|
|
||||||
1.2 mpint1
|
|
||||||
|
|
||||||
The "mpint1" type represents an arbitrary precision integer (bignum).
|
|
||||||
Its format is as follows:
|
|
||||||
|
|
||||||
uint16 bits
|
|
||||||
byte[(bits + 7) / 8] bignum
|
|
||||||
|
|
||||||
"bignum" contains an unsigned arbitrary precision integer encoded as
|
|
||||||
eight bits per byte in big-endian (MSB first) format.
|
|
||||||
|
|
||||||
Note the difference between the "mpint1" encoding and the "mpint"
|
|
||||||
encoding defined in RFC 4251. Also note that the length of the encoded
|
|
||||||
integer is specified in bits, not bytes and that the byte length of
|
|
||||||
the integer must be calculated by rounding up the number of bits to the
|
|
||||||
nearest eight.
|
|
||||||
|
|
||||||
2. Protocol Messages
|
|
||||||
|
|
||||||
All protocol messages are prefixed with their length in bytes, encoded
|
|
||||||
as a 32 bit unsigned integer. Specifically:
|
|
||||||
|
|
||||||
uint32 message_length
|
|
||||||
byte[message_length] message
|
|
||||||
|
|
||||||
The following message descriptions refer only to the content the
|
|
||||||
"message" field.
|
|
||||||
|
|
||||||
2.1 Generic server responses
|
|
||||||
|
|
||||||
The following generic messages may be sent by the server in response to
|
|
||||||
requests from the client. On success the agent may reply either with:
|
|
||||||
|
|
||||||
byte SSH_AGENT_SUCCESS
|
|
||||||
|
|
||||||
or a request-specific success message.
|
|
||||||
|
|
||||||
On failure, the agent may reply with:
|
|
||||||
|
|
||||||
byte SSH_AGENT_FAILURE
|
|
||||||
|
|
||||||
SSH_AGENT_FAILURE messages are also sent in reply to unknown request
|
|
||||||
types.
|
|
||||||
|
|
||||||
2.2 Adding keys to the agent
|
|
||||||
|
|
||||||
Keys are added to the agent using the SSH_AGENTC_ADD_RSA_IDENTITY and
|
|
||||||
SSH2_AGENTC_ADD_IDENTITY requests for protocol 1 and protocol 2 keys
|
|
||||||
respectively.
|
|
||||||
|
|
||||||
Two variants of these requests are SSH_AGENTC_ADD_RSA_ID_CONSTRAINED
|
|
||||||
and SSH2_AGENTC_ADD_ID_CONSTRAINED - these add keys with optional
|
|
||||||
"constraints" on their usage.
|
|
||||||
|
|
||||||
OpenSSH may be built with support for keys hosted on a smartcard
|
|
||||||
or other hardware security module. These keys may be added
|
|
||||||
to the agent using the SSH_AGENTC_ADD_SMARTCARD_KEY and
|
|
||||||
SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED requests.
|
|
||||||
|
|
||||||
2.2.1 Key constraints
|
|
||||||
|
|
||||||
The OpenSSH agent supports some basic optional constraints on key usage.
|
|
||||||
At present there are two constraints defined.
|
|
||||||
|
|
||||||
The first constraint limits the validity duration of a key. It is
|
|
||||||
encoded as:
|
|
||||||
|
|
||||||
byte SSH_AGENT_CONSTRAIN_LIFETIME
|
|
||||||
uint32 seconds
|
|
||||||
|
|
||||||
Where "seconds" contains the number of seconds that the key shall remain
|
|
||||||
valid measured from the moment that the agent receives it. After the
|
|
||||||
validity period has expired, OpenSSH's agent will erase these keys from
|
|
||||||
memory.
|
|
||||||
|
|
||||||
The second constraint requires the agent to seek explicit user
|
|
||||||
confirmation before performing private key operations with the loaded
|
|
||||||
key. This constraint is encoded as:
|
|
||||||
|
|
||||||
byte SSH_AGENT_CONSTRAIN_CONFIRM
|
|
||||||
|
|
||||||
Zero or more constraints may be specified when adding a key with one
|
|
||||||
of the *_CONSTRAINED requests. Multiple constraints are appended
|
|
||||||
consecutively to the end of the request:
|
|
||||||
|
|
||||||
byte constraint1_type
|
|
||||||
.... constraint1_data
|
|
||||||
byte constraint2_type
|
|
||||||
.... constraint2_data
|
|
||||||
....
|
|
||||||
byte constraintN_type
|
|
||||||
.... constraintN_data
|
|
||||||
|
|
||||||
Such a sequence of zero or more constraints will be referred to below
|
|
||||||
as "constraint[]". Agents may determine whether there are constraints
|
|
||||||
by checking whether additional data exists in the "add key" request
|
|
||||||
after the key data itself. OpenSSH will refuse to add a key if it
|
|
||||||
contains unknown constraints.
|
|
||||||
|
|
||||||
2.2.2 Add protocol 1 key
|
|
||||||
|
|
||||||
A client may add a protocol 1 key to an agent with the following
|
|
||||||
request:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_ADD_RSA_IDENTITY or
|
|
||||||
SSH_AGENTC_ADD_RSA_ID_CONSTRAINED
|
|
||||||
uint32 ignored
|
|
||||||
mpint1 rsa_n
|
|
||||||
mpint1 rsa_e
|
|
||||||
mpint1 rsa_d
|
|
||||||
mpint1 rsa_iqmp
|
|
||||||
mpint1 rsa_q
|
|
||||||
mpint1 rsa_p
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
Note that there is some redundancy in the key parameters; a key could be
|
|
||||||
fully specified using just rsa_q, rsa_p and rsa_e at the cost of extra
|
|
||||||
computation.
|
|
||||||
|
|
||||||
"key_constraints" may only be present if the request type is
|
|
||||||
SSH_AGENTC_ADD_RSA_ID_CONSTRAINED.
|
|
||||||
|
|
||||||
The agent will reply with a SSH_AGENT_SUCCESS if the key has been
|
|
||||||
successfully added or a SSH_AGENT_FAILURE if an error occurred.
|
|
||||||
|
|
||||||
2.2.3 Add protocol 2 key
|
|
||||||
|
|
||||||
The OpenSSH agent supports DSA, ECDSA and RSA keys for protocol 2. DSA
|
|
||||||
keys may be added using the following request
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-dss"
|
|
||||||
mpint dsa_p
|
|
||||||
mpint dsa_q
|
|
||||||
mpint dsa_g
|
|
||||||
mpint dsa_public_key
|
|
||||||
mpint dsa_private_key
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
DSA certificates may be added with:
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-dss-cert-v00@openssh.com"
|
|
||||||
string certificate
|
|
||||||
mpint dsa_private_key
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
ECDSA keys may be added using the following request
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ecdsa-sha2-nistp256" |
|
|
||||||
"ecdsa-sha2-nistp384" |
|
|
||||||
"ecdsa-sha2-nistp521"
|
|
||||||
string ecdsa_curve_name
|
|
||||||
string ecdsa_public_key
|
|
||||||
mpint ecdsa_private
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
ECDSA certificates may be added with:
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ecdsa-sha2-nistp256-cert-v01@openssh.com" |
|
|
||||||
"ecdsa-sha2-nistp384-cert-v01@openssh.com" |
|
|
||||||
"ecdsa-sha2-nistp521-cert-v01@openssh.com"
|
|
||||||
string certificate
|
|
||||||
mpint ecdsa_private_key
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
ED25519 keys may be added using the following request
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-ed25519"
|
|
||||||
string ed25519_public_key
|
|
||||||
string ed25519_private_key || ed25519_public_key
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
ED25519 certificates may be added with:
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-ed25519-cert-v01@openssh.com"
|
|
||||||
string certificate
|
|
||||||
string ed25519_public_key
|
|
||||||
string ed25519_private_key || ed25519_public_key
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
For both ssh-ed25519 and ssh-ed25519-cert-v01@openssh.com keys, the private
|
|
||||||
key has the public key appended (for historical reasons).
|
|
||||||
|
|
||||||
RSA keys may be added with this request:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-rsa"
|
|
||||||
mpint rsa_n
|
|
||||||
mpint rsa_e
|
|
||||||
mpint rsa_d
|
|
||||||
mpint rsa_iqmp
|
|
||||||
mpint rsa_p
|
|
||||||
mpint rsa_q
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
RSA certificates may be added with this request:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_ADD_IDENTITY or
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED
|
|
||||||
string "ssh-rsa-cert-v00@openssh.com"
|
|
||||||
string certificate
|
|
||||||
mpint rsa_d
|
|
||||||
mpint rsa_iqmp
|
|
||||||
mpint rsa_p
|
|
||||||
mpint rsa_q
|
|
||||||
string key_comment
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
Note that the 'rsa_p' and 'rsa_q' parameters are sent in the reverse
|
|
||||||
order to the protocol 1 add keys message. As with the corresponding
|
|
||||||
protocol 1 "add key" request, the private key is overspecified to avoid
|
|
||||||
redundant processing.
|
|
||||||
|
|
||||||
For DSA, ECDSA and RSA key add requests, "key_constraints" may only be
|
|
||||||
present if the request type is SSH2_AGENTC_ADD_ID_CONSTRAINED.
|
|
||||||
|
|
||||||
The agent will reply with a SSH_AGENT_SUCCESS if the key has been
|
|
||||||
successfully added or a SSH_AGENT_FAILURE if an error occurred.
|
|
||||||
|
|
||||||
2.2.4 Loading keys from a smartcard
|
|
||||||
|
|
||||||
The OpenSSH agent may have optional smartcard support built in to it. If
|
|
||||||
so, it supports an operation to load keys from a smartcard. Technically,
|
|
||||||
only the public components of the keys are loaded into the agent so
|
|
||||||
this operation really arranges for future private key operations to be
|
|
||||||
delegated to the smartcard.
|
|
||||||
|
|
||||||
byte SSH_AGENTC_ADD_SMARTCARD_KEY or
|
|
||||||
SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED
|
|
||||||
string reader_id
|
|
||||||
string pin
|
|
||||||
constraint[] key_constraints
|
|
||||||
|
|
||||||
"reader_id" is an identifier to a smartcard reader and "pin"
|
|
||||||
is a PIN or passphrase used to unlock the private key(s) on the
|
|
||||||
device. "key_constraints" may only be present if the request type is
|
|
||||||
SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED.
|
|
||||||
|
|
||||||
This operation may load all SSH keys that are unlocked using the
|
|
||||||
"pin" on the specified reader. The type of key loaded (protocol 1
|
|
||||||
or protocol 2) will be specified by the smartcard itself, it is not
|
|
||||||
client-specified.
|
|
||||||
|
|
||||||
The agent will reply with a SSH_AGENT_SUCCESS if one or more keys have
|
|
||||||
been successfully loaded or a SSH_AGENT_FAILURE if an error occurred.
|
|
||||||
The agent will also return SSH_AGENT_FAILURE if it does not support
|
|
||||||
smartcards.
|
|
||||||
|
|
||||||
2.3 Removing multiple keys
|
|
||||||
|
|
||||||
A client may request that an agent delete all protocol 1 keys using the
|
|
||||||
following request:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES
|
|
||||||
|
|
||||||
This message requests the deletion of all protocol 2 keys:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_REMOVE_ALL_IDENTITIES
|
|
||||||
|
|
||||||
On success, the agent will delete all keys of the requested type and
|
|
||||||
reply with a SSH_AGENT_SUCCESS message. If an error occurred, the agent
|
|
||||||
will reply with SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
Note that, to delete all keys (both protocol 1 and 2), a client
|
|
||||||
must send both a SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES and a
|
|
||||||
SSH2_AGENTC_REMOVE_ALL_IDENTITIES request.
|
|
||||||
|
|
||||||
2.4 Removing specific keys
|
|
||||||
|
|
||||||
2.4.1 Removing a protocol 1 key
|
|
||||||
|
|
||||||
Removal of a protocol 1 key may be requested with the following message:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_REMOVE_RSA_IDENTITY
|
|
||||||
uint32 key_bits
|
|
||||||
mpint1 rsa_e
|
|
||||||
mpint1 rsa_n
|
|
||||||
|
|
||||||
Note that key_bits is strictly redundant, as it may be inferred by the
|
|
||||||
length of rsa_n.
|
|
||||||
|
|
||||||
The agent will delete any private key matching the specified public key
|
|
||||||
and return SSH_AGENT_SUCCESS. If no such key was found, the agent will
|
|
||||||
return SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
2.4.2 Removing a protocol 2 key
|
|
||||||
|
|
||||||
Protocol 2 keys may be removed with the following request:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_REMOVE_IDENTITY
|
|
||||||
string key_blob
|
|
||||||
|
|
||||||
Where "key_blob" is encoded as per RFC 4253 section 6.6 "Public Key
|
|
||||||
Algorithms" for any of the supported protocol 2 key types.
|
|
||||||
|
|
||||||
The agent will delete any private key matching the specified public key
|
|
||||||
and return SSH_AGENT_SUCCESS. If no such key was found, the agent will
|
|
||||||
return SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
2.4.3 Removing keys loaded from a smartcard
|
|
||||||
|
|
||||||
A client may request that a server remove one or more smartcard-hosted
|
|
||||||
keys using this message:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_REMOVE_SMARTCARD_KEY
|
|
||||||
string reader_id
|
|
||||||
string pin
|
|
||||||
|
|
||||||
"reader_id" the an identifier to a smartcard reader and "pin" is a PIN
|
|
||||||
or passphrase used to unlock the private key(s) on the device.
|
|
||||||
|
|
||||||
When this message is received, and if the agent supports
|
|
||||||
smartcard-hosted keys, it will delete all keys that are hosted on the
|
|
||||||
specified smartcard that may be accessed with the given "pin".
|
|
||||||
|
|
||||||
The agent will reply with a SSH_AGENT_SUCCESS if one or more keys have
|
|
||||||
been successfully removed or a SSH_AGENT_FAILURE if an error occurred.
|
|
||||||
The agent will also return SSH_AGENT_FAILURE if it does not support
|
|
||||||
smartcards.
|
|
||||||
|
|
||||||
2.5 Requesting a list of known keys
|
|
||||||
|
|
||||||
An agent may be requested to list which keys it holds. Different
|
|
||||||
requests exist for protocol 1 and protocol 2 keys.
|
|
||||||
|
|
||||||
2.5.1 Requesting a list of protocol 1 keys
|
|
||||||
|
|
||||||
To request a list of protocol 1 keys that are held in the agent, a
|
|
||||||
client may send the following message:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_REQUEST_RSA_IDENTITIES
|
|
||||||
|
|
||||||
The agent will reply with the following message:
|
|
||||||
|
|
||||||
byte SSH_AGENT_RSA_IDENTITIES_ANSWER
|
|
||||||
uint32 num_keys
|
|
||||||
|
|
||||||
Followed by zero or more consecutive keys, encoded as:
|
|
||||||
|
|
||||||
uint32 bits
|
|
||||||
mpint1 rsa_e
|
|
||||||
mpint1 rsa_n
|
|
||||||
string key_comment
|
|
||||||
|
|
||||||
2.5.2 Requesting a list of protocol 2 keys
|
|
||||||
|
|
||||||
A client may send the following message to request a list of
|
|
||||||
protocol 2 keys that are stored in the agent:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_REQUEST_IDENTITIES
|
|
||||||
|
|
||||||
The agent will reply with the following message header:
|
|
||||||
|
|
||||||
byte SSH2_AGENT_IDENTITIES_ANSWER
|
|
||||||
uint32 num_keys
|
|
||||||
|
|
||||||
Followed by zero or more consecutive keys, encoded as:
|
|
||||||
|
|
||||||
string key_blob
|
|
||||||
string key_comment
|
|
||||||
|
|
||||||
Where "key_blob" is encoded as per RFC 4253 section 6.6 "Public Key
|
|
||||||
Algorithms" for any of the supported protocol 2 key types.
|
|
||||||
|
|
||||||
2.6 Private key operations
|
|
||||||
|
|
||||||
The purpose of the agent is to perform private key operations, such as
|
|
||||||
signing and encryption without requiring a passphrase to unlock the
|
|
||||||
key and without allowing the private key itself to be exposed. There
|
|
||||||
are separate requests for the protocol 1 and protocol 2 private key
|
|
||||||
operations.
|
|
||||||
|
|
||||||
2.6.1 Protocol 1 private key challenge
|
|
||||||
|
|
||||||
The private key operation used in version 1 of the SSH protocol is
|
|
||||||
decrypting a challenge that has been encrypted with a public key.
|
|
||||||
It may be requested using this message:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_RSA_CHALLENGE
|
|
||||||
uint32 ignored
|
|
||||||
mpint1 rsa_e
|
|
||||||
mpint1 rsa_n
|
|
||||||
mpint1 encrypted_challenge
|
|
||||||
byte[16] session_id
|
|
||||||
uint32 response_type /* must be 1 */
|
|
||||||
|
|
||||||
"rsa_e" and "rsa_n" are used to identify which private key to use.
|
|
||||||
"encrypted_challenge" is a challenge blob that has (presumably)
|
|
||||||
been encrypted with the public key and must be in the range
|
|
||||||
1 <= encrypted_challenge < 2^256. "session_id" is the SSH protocol 1
|
|
||||||
session ID (computed from the server host key, the server semi-ephemeral
|
|
||||||
key and the session cookie).
|
|
||||||
|
|
||||||
"ignored" and "response_type" exist for compatibility with legacy
|
|
||||||
implementations. "response_type" must be equal to 1; other response
|
|
||||||
types are not supported.
|
|
||||||
|
|
||||||
On receiving this request, the server decrypts the "encrypted_challenge"
|
|
||||||
using the private key matching the supplied (rsa_e, rsa_n) values. For
|
|
||||||
the response derivation, the decrypted challenge is represented as an
|
|
||||||
unsigned, big-endian integer encoded in a 32 byte buffer (i.e. values
|
|
||||||
smaller than 2^248 will have leading 0 bytes).
|
|
||||||
|
|
||||||
The response value is then calculated as:
|
|
||||||
|
|
||||||
response = MD5(decrypted_challenge || session_id)
|
|
||||||
|
|
||||||
and returned in the following message
|
|
||||||
|
|
||||||
byte SSH_AGENT_RSA_RESPONSE
|
|
||||||
byte[16] response
|
|
||||||
|
|
||||||
If the agent cannot find the key specified by the supplied (rsa_e,
|
|
||||||
rsa_n) then it will return SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
2.6.2 Protocol 2 private key signature request
|
|
||||||
|
|
||||||
A client may use the following message to request signing of data using
|
|
||||||
a protocol 2 key:
|
|
||||||
|
|
||||||
byte SSH2_AGENTC_SIGN_REQUEST
|
|
||||||
string key_blob
|
|
||||||
string data
|
|
||||||
uint32 flags
|
|
||||||
|
|
||||||
Where "key_blob" is encoded as per RFC 4253 section 6.6 "Public Key
|
|
||||||
Algorithms" for any of the supported protocol 2 key types. "flags" is
|
|
||||||
a bit-mask, but at present only one possible value is defined (see below
|
|
||||||
for its meaning):
|
|
||||||
|
|
||||||
SSH_AGENT_OLD_SIGNATURE 1
|
|
||||||
|
|
||||||
Upon receiving this request, the agent will look up the private key that
|
|
||||||
corresponds to the public key contained in key_blob. It will use this
|
|
||||||
private key to sign the "data" and produce a signature blob using the
|
|
||||||
key type-specific method described in RFC 4253 section 6.6 "Public Key
|
|
||||||
Algorithms".
|
|
||||||
|
|
||||||
An exception to this is for "ssh-dss" keys where the "flags" word
|
|
||||||
contains the value SSH_AGENT_OLD_SIGNATURE. In this case, a legacy
|
|
||||||
signature encoding is used in lieu of the standard one. In this case,
|
|
||||||
the DSA signature blob is encoded as:
|
|
||||||
|
|
||||||
byte[40] signature
|
|
||||||
|
|
||||||
The signature will be returned in the response message:
|
|
||||||
|
|
||||||
byte SSH2_AGENT_SIGN_RESPONSE
|
|
||||||
string signature_blob
|
|
||||||
|
|
||||||
If the agent cannot find the key specified by the supplied key_blob then
|
|
||||||
it will return SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
2.7 Locking or unlocking an agent
|
|
||||||
|
|
||||||
The agent supports temporary locking with a passphrase to suspend
|
|
||||||
processing of sensitive operations until it has been unlocked with the
|
|
||||||
same passphrase. To lock an agent, a client send the following request:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_LOCK
|
|
||||||
string passphrase
|
|
||||||
|
|
||||||
Upon receipt of this message and if the agent is not already locked,
|
|
||||||
it will suspend processing requests and return a SSH_AGENT_SUCCESS
|
|
||||||
reply. If the agent is already locked, it will return SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
While locked, the agent will refuse all requests except
|
|
||||||
SSH_AGENTC_UNLOCK, SSH_AGENTC_REQUEST_RSA_IDENTITIES and
|
|
||||||
SSH2_AGENTC_REQUEST_IDENTITIES. The "request identities" requests are
|
|
||||||
treated specially by a locked agent: it will always return an empty list
|
|
||||||
of keys.
|
|
||||||
|
|
||||||
To unlock an agent, a client may request:
|
|
||||||
|
|
||||||
byte SSH_AGENTC_UNLOCK
|
|
||||||
string passphrase
|
|
||||||
|
|
||||||
If the passphrase matches and the agent is locked, then it will resume
|
|
||||||
processing all requests and return SSH_AGENT_SUCCESS. If the agent
|
|
||||||
is not locked or the passphrase does not match then it will return
|
|
||||||
SSH_AGENT_FAILURE.
|
|
||||||
|
|
||||||
Locking and unlocking affects both protocol 1 and protocol 2 keys.
|
|
||||||
|
|
||||||
3. Protocol message numbers
|
|
||||||
|
|
||||||
3.1 Requests from client to agent for protocol 1 key operations
|
|
||||||
|
|
||||||
SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
|
|
||||||
SSH_AGENTC_RSA_CHALLENGE 3
|
|
||||||
SSH_AGENTC_ADD_RSA_IDENTITY 7
|
|
||||||
SSH_AGENTC_REMOVE_RSA_IDENTITY 8
|
|
||||||
SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9
|
|
||||||
SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24
|
|
||||||
|
|
||||||
3.2 Requests from client to agent for protocol 2 key operations
|
|
||||||
|
|
||||||
SSH2_AGENTC_REQUEST_IDENTITIES 11
|
|
||||||
SSH2_AGENTC_SIGN_REQUEST 13
|
|
||||||
SSH2_AGENTC_ADD_IDENTITY 17
|
|
||||||
SSH2_AGENTC_REMOVE_IDENTITY 18
|
|
||||||
SSH2_AGENTC_REMOVE_ALL_IDENTITIES 19
|
|
||||||
SSH2_AGENTC_ADD_ID_CONSTRAINED 25
|
|
||||||
|
|
||||||
3.3 Key-type independent requests from client to agent
|
|
||||||
|
|
||||||
SSH_AGENTC_ADD_SMARTCARD_KEY 20
|
|
||||||
SSH_AGENTC_REMOVE_SMARTCARD_KEY 21
|
|
||||||
SSH_AGENTC_LOCK 22
|
|
||||||
SSH_AGENTC_UNLOCK 23
|
|
||||||
SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26
|
|
||||||
|
|
||||||
3.4 Generic replies from agent to client
|
|
||||||
|
|
||||||
SSH_AGENT_FAILURE 5
|
|
||||||
SSH_AGENT_SUCCESS 6
|
|
||||||
|
|
||||||
3.5 Replies from agent to client for protocol 1 key operations
|
|
||||||
|
|
||||||
SSH_AGENT_RSA_IDENTITIES_ANSWER 2
|
|
||||||
SSH_AGENT_RSA_RESPONSE 4
|
|
||||||
|
|
||||||
3.6 Replies from agent to client for protocol 2 key operations
|
|
||||||
|
|
||||||
SSH2_AGENT_IDENTITIES_ANSWER 12
|
|
||||||
SSH2_AGENT_SIGN_RESPONSE 14
|
|
||||||
|
|
||||||
3.7 Key constraint identifiers
|
|
||||||
|
|
||||||
SSH_AGENT_CONSTRAIN_LIFETIME 1
|
|
||||||
SSH_AGENT_CONSTRAIN_CONFIRM 2
|
|
||||||
|
|
||||||
$OpenBSD: PROTOCOL.agent,v 1.11 2016/05/19 07:45:32 djm Exp $
|
|
||||||
|
@ -224,6 +224,9 @@ option-specific information (see below). All options are
|
|||||||
"critical", if an implementation does not recognise a option
|
"critical", if an implementation does not recognise a option
|
||||||
then the validating party should refuse to accept the certificate.
|
then the validating party should refuse to accept the certificate.
|
||||||
|
|
||||||
|
Custom options should append the originating author or organisation's
|
||||||
|
domain name to the option name, e.g. "my-option@example.com".
|
||||||
|
|
||||||
No critical options are defined for host certificates at present. The
|
No critical options are defined for host certificates at present. The
|
||||||
supported user certificate options and the contents and structure of
|
supported user certificate options and the contents and structure of
|
||||||
their data fields are:
|
their data fields are:
|
||||||
@ -255,6 +258,9 @@ as is the requirement that each name appear only once.
|
|||||||
If an implementation does not recognise an extension, then it should
|
If an implementation does not recognise an extension, then it should
|
||||||
ignore it.
|
ignore it.
|
||||||
|
|
||||||
|
Custom options should append the originating author or organisation's
|
||||||
|
domain name to the option name, e.g. "my-option@example.com".
|
||||||
|
|
||||||
No extensions are defined for host certificates at present. The
|
No extensions are defined for host certificates at present. The
|
||||||
supported user certificate extensions and the contents and structure of
|
supported user certificate extensions and the contents and structure of
|
||||||
their data fields are:
|
their data fields are:
|
||||||
@ -285,4 +291,4 @@ permit-user-rc empty Flag indicating that execution of
|
|||||||
of this script will not be permitted if
|
of this script will not be permitted if
|
||||||
this option is not present.
|
this option is not present.
|
||||||
|
|
||||||
$OpenBSD: PROTOCOL.certkeys,v 1.11 2017/05/16 16:54:05 djm Exp $
|
$OpenBSD: PROTOCOL.certkeys,v 1.12 2017/05/31 04:29:44 djm Exp $
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: 0.0.15.0.{build}
|
version: 0.0.16.0.{build}
|
||||||
image: Visual Studio 2015
|
image: Visual Studio 2015
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth-options.c,v 1.72 2016/11/30 02:57:40 djm Exp $ */
|
/* $OpenBSD: auth-options.c,v 1.73 2017/05/31 10:54:00 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -119,7 +119,8 @@ match_flag(const char *opt, int allow_negate, char **optsp, const char *msg)
|
|||||||
* side effect: sets key option flags
|
* side effect: sets key option flags
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
|
auth_parse_options(struct passwd *pw, char *opts, const char *file,
|
||||||
|
u_long linenum)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
struct ssh *ssh = active_state; /* XXX */
|
||||||
const char *cp;
|
const char *cp;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth-options.h,v 1.22 2016/11/30 02:57:40 djm Exp $ */
|
/* $OpenBSD: auth-options.h,v 1.23 2017/05/31 10:54:00 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
@ -33,7 +33,7 @@ extern int forced_tun_device;
|
|||||||
extern int key_is_cert_authority;
|
extern int key_is_cert_authority;
|
||||||
extern char *authorized_principals;
|
extern char *authorized_principals;
|
||||||
|
|
||||||
int auth_parse_options(struct passwd *, char *, char *, u_long);
|
int auth_parse_options(struct passwd *, char *, const char *, u_long);
|
||||||
void auth_clear_options(void);
|
void auth_clear_options(void);
|
||||||
int auth_cert_options(struct sshkey *, struct passwd *, const char **);
|
int auth_cert_options(struct sshkey *, struct passwd *, const char **);
|
||||||
|
|
||||||
|
@ -237,6 +237,7 @@ int sys_auth_passwd(Authctxt *authctxt, const char *password)
|
|||||||
DWORD token = 0;
|
DWORD token = 0;
|
||||||
extern int auth_sock;
|
extern int auth_sock;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
int ssh_request_reply(int, struct sshbuf *, struct sshbuf *);
|
||||||
|
|
||||||
msg = sshbuf_new();
|
msg = sshbuf_new();
|
||||||
if (!msg)
|
if (!msg)
|
||||||
|
6
auth.c
6
auth.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth.c,v 1.120 2017/05/17 01:24:17 djm Exp $ */
|
/* $OpenBSD: auth.c,v 1.121 2017/05/30 08:52:19 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -429,7 +429,7 @@ authorized_principals_file(struct passwd *pw)
|
|||||||
|
|
||||||
/* return ok if key exists in sysfile or userfile */
|
/* return ok if key exists in sysfile or userfile */
|
||||||
HostStatus
|
HostStatus
|
||||||
check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
|
check_key_in_hostfiles(struct passwd *pw, struct sshkey *key, const char *host,
|
||||||
const char *sysfile, const char *userfile)
|
const char *sysfile, const char *userfile)
|
||||||
{
|
{
|
||||||
char *user_hostfile;
|
char *user_hostfile;
|
||||||
@ -711,7 +711,7 @@ getpwnamallow(const char *user)
|
|||||||
|
|
||||||
/* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
|
/* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
|
||||||
int
|
int
|
||||||
auth_key_is_revoked(Key *key)
|
auth_key_is_revoked(struct sshkey *key)
|
||||||
{
|
{
|
||||||
char *fp = NULL;
|
char *fp = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
35
auth.h
35
auth.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth.h,v 1.89 2016/08/13 17:47:41 markus Exp $ */
|
/* $OpenBSD: auth.h,v 1.91 2017/05/30 14:29:59 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
@ -91,7 +91,7 @@ struct Authctxt {
|
|||||||
|
|
||||||
struct Authmethod {
|
struct Authmethod {
|
||||||
char *name;
|
char *name;
|
||||||
int (*userauth)(Authctxt *authctxt);
|
int (*userauth)(struct ssh *);
|
||||||
int *enabled;
|
int *enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,9 +117,10 @@ auth_rhosts2(struct passwd *, const char *, const char *, const char *);
|
|||||||
|
|
||||||
int auth_password(Authctxt *, const char *);
|
int auth_password(Authctxt *, const char *);
|
||||||
|
|
||||||
int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
|
int hostbased_key_allowed(struct passwd *, const char *, char *,
|
||||||
int user_key_allowed(struct passwd *, Key *, int);
|
struct sshkey *);
|
||||||
void pubkey_auth_info(Authctxt *, const Key *, const char *, ...)
|
int user_key_allowed(struct passwd *, struct sshkey *, int);
|
||||||
|
void pubkey_auth_info(Authctxt *, const struct sshkey *, const char *, ...)
|
||||||
__attribute__((__format__ (printf, 3, 4)));
|
__attribute__((__format__ (printf, 3, 4)));
|
||||||
void auth2_record_userkey(Authctxt *, struct sshkey *);
|
void auth2_record_userkey(Authctxt *, struct sshkey *);
|
||||||
int auth2_userkey_already_used(Authctxt *, struct sshkey *);
|
int auth2_userkey_already_used(Authctxt *, struct sshkey *);
|
||||||
@ -154,7 +155,7 @@ void auth_info(Authctxt *authctxt, const char *, ...)
|
|||||||
__attribute__((__nonnull__ (2)));
|
__attribute__((__nonnull__ (2)));
|
||||||
void auth_log(Authctxt *, int, int, const char *, const char *);
|
void auth_log(Authctxt *, int, int, const char *, const char *);
|
||||||
void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn));
|
void auth_maxtries_exceeded(Authctxt *) __attribute__((noreturn));
|
||||||
void userauth_finish(Authctxt *, int, const char *, const char *);
|
void userauth_finish(struct ssh *, int, const char *, const char *);
|
||||||
int auth_root_allowed(const char *);
|
int auth_root_allowed(const char *);
|
||||||
|
|
||||||
void userauth_send_banner(const char *);
|
void userauth_send_banner(const char *);
|
||||||
@ -167,8 +168,8 @@ int auth2_method_allowed(Authctxt *, const char *, const char *);
|
|||||||
|
|
||||||
void privsep_challenge_enable(void);
|
void privsep_challenge_enable(void);
|
||||||
|
|
||||||
int auth2_challenge(Authctxt *, char *);
|
int auth2_challenge(struct ssh *, char *);
|
||||||
void auth2_challenge_stop(Authctxt *);
|
void auth2_challenge_stop(struct ssh *);
|
||||||
int bsdauth_query(void *, char **, char **, u_int *, char ***, u_int **);
|
int bsdauth_query(void *, char **, char **, u_int *, char ***, u_int **);
|
||||||
int bsdauth_respond(void *, u_int, char **);
|
int bsdauth_respond(void *, u_int, char **);
|
||||||
int skey_query(void *, char **, char **, u_int *, char ***, u_int **);
|
int skey_query(void *, char **, char **, u_int *, char ***, u_int **);
|
||||||
@ -182,22 +183,22 @@ char *authorized_principals_file(struct passwd *);
|
|||||||
|
|
||||||
FILE *auth_openkeyfile(const char *, struct passwd *, int);
|
FILE *auth_openkeyfile(const char *, struct passwd *, int);
|
||||||
FILE *auth_openprincipals(const char *, struct passwd *, int);
|
FILE *auth_openprincipals(const char *, struct passwd *, int);
|
||||||
int auth_key_is_revoked(Key *);
|
int auth_key_is_revoked(struct sshkey *);
|
||||||
|
|
||||||
const char *auth_get_canonical_hostname(struct ssh *, int);
|
const char *auth_get_canonical_hostname(struct ssh *, int);
|
||||||
|
|
||||||
HostStatus
|
HostStatus
|
||||||
check_key_in_hostfiles(struct passwd *, Key *, const char *,
|
check_key_in_hostfiles(struct passwd *, struct sshkey *, const char *,
|
||||||
const char *, const char *);
|
const char *, const char *);
|
||||||
|
|
||||||
/* hostkey handling */
|
/* hostkey handling */
|
||||||
Key *get_hostkey_by_index(int);
|
struct sshkey *get_hostkey_by_index(int);
|
||||||
Key *get_hostkey_public_by_index(int, struct ssh *);
|
struct sshkey *get_hostkey_public_by_index(int, struct ssh *);
|
||||||
Key *get_hostkey_public_by_type(int, int, struct ssh *);
|
struct sshkey *get_hostkey_public_by_type(int, int, struct ssh *);
|
||||||
Key *get_hostkey_private_by_type(int, int, struct ssh *);
|
struct sshkey *get_hostkey_private_by_type(int, int, struct ssh *);
|
||||||
int get_hostkey_index(Key *, int, struct ssh *);
|
int get_hostkey_index(struct sshkey *, int, struct ssh *);
|
||||||
int sshd_hostkey_sign(Key *, Key *, u_char **, size_t *,
|
int sshd_hostkey_sign(struct sshkey *, struct sshkey *, u_char **,
|
||||||
const u_char *, size_t, const char *, u_int);
|
size_t *, const u_char *, size_t, const char *, u_int);
|
||||||
|
|
||||||
/* debug messages during authentication */
|
/* debug messages during authentication */
|
||||||
void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2)));
|
void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2)));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-chall.c,v 1.44 2016/05/02 08:49:03 djm Exp $ */
|
/* $OpenBSD: auth2-chall.c,v 1.48 2017/05/30 14:29:59 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2001 Per Allansson. All rights reserved.
|
* Copyright (c) 2001 Per Allansson. All rights reserved.
|
||||||
@ -47,9 +47,9 @@
|
|||||||
/* import */
|
/* import */
|
||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
|
|
||||||
static int auth2_challenge_start(Authctxt *);
|
static int auth2_challenge_start(struct ssh *);
|
||||||
static int send_userauth_info_request(Authctxt *);
|
static int send_userauth_info_request(Authctxt *);
|
||||||
static int input_userauth_info_response(int, u_int32_t, void *);
|
static int input_userauth_info_response(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
#ifdef BSD_AUTH
|
#ifdef BSD_AUTH
|
||||||
extern KbdintDevice bsdauth_device;
|
extern KbdintDevice bsdauth_device;
|
||||||
@ -195,8 +195,9 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt)
|
|||||||
* wait for the response.
|
* wait for the response.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
auth2_challenge(Authctxt *authctxt, char *devs)
|
auth2_challenge(struct ssh *ssh, char *devs)
|
||||||
{
|
{
|
||||||
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
debug("auth2_challenge: user=%s devs=%s",
|
debug("auth2_challenge: user=%s devs=%s",
|
||||||
authctxt->user ? authctxt->user : "<nouser>",
|
authctxt->user ? authctxt->user : "<nouser>",
|
||||||
devs ? devs : "<no devs>");
|
devs ? devs : "<no devs>");
|
||||||
@ -205,15 +206,16 @@ auth2_challenge(Authctxt *authctxt, char *devs)
|
|||||||
return 0;
|
return 0;
|
||||||
if (authctxt->kbdintctxt == NULL)
|
if (authctxt->kbdintctxt == NULL)
|
||||||
authctxt->kbdintctxt = kbdint_alloc(devs);
|
authctxt->kbdintctxt = kbdint_alloc(devs);
|
||||||
return auth2_challenge_start(authctxt);
|
return auth2_challenge_start(ssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unregister kbd-int callbacks and context */
|
/* unregister kbd-int callbacks and context */
|
||||||
void
|
void
|
||||||
auth2_challenge_stop(Authctxt *authctxt)
|
auth2_challenge_stop(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
/* unregister callback */
|
/* unregister callback */
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);
|
||||||
if (authctxt->kbdintctxt != NULL) {
|
if (authctxt->kbdintctxt != NULL) {
|
||||||
kbdint_free(authctxt->kbdintctxt);
|
kbdint_free(authctxt->kbdintctxt);
|
||||||
authctxt->kbdintctxt = NULL;
|
authctxt->kbdintctxt = NULL;
|
||||||
@ -222,29 +224,30 @@ auth2_challenge_stop(Authctxt *authctxt)
|
|||||||
|
|
||||||
/* side effect: sets authctxt->postponed if a reply was sent*/
|
/* side effect: sets authctxt->postponed if a reply was sent*/
|
||||||
static int
|
static int
|
||||||
auth2_challenge_start(Authctxt *authctxt)
|
auth2_challenge_start(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
KbdintAuthctxt *kbdintctxt = authctxt->kbdintctxt;
|
KbdintAuthctxt *kbdintctxt = authctxt->kbdintctxt;
|
||||||
|
|
||||||
debug2("auth2_challenge_start: devices %s",
|
debug2("auth2_challenge_start: devices %s",
|
||||||
kbdintctxt->devices ? kbdintctxt->devices : "<empty>");
|
kbdintctxt->devices ? kbdintctxt->devices : "<empty>");
|
||||||
|
|
||||||
if (kbdint_next_device(authctxt, kbdintctxt) == 0) {
|
if (kbdint_next_device(authctxt, kbdintctxt) == 0) {
|
||||||
auth2_challenge_stop(authctxt);
|
auth2_challenge_stop(ssh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
debug("auth2_challenge_start: trying authentication method '%s'",
|
debug("auth2_challenge_start: trying authentication method '%s'",
|
||||||
kbdintctxt->device->name);
|
kbdintctxt->device->name);
|
||||||
|
|
||||||
if ((kbdintctxt->ctxt = kbdintctxt->device->init_ctx(authctxt)) == NULL) {
|
if ((kbdintctxt->ctxt = kbdintctxt->device->init_ctx(authctxt)) == NULL) {
|
||||||
auth2_challenge_stop(authctxt);
|
auth2_challenge_stop(ssh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (send_userauth_info_request(authctxt) == 0) {
|
if (send_userauth_info_request(authctxt) == 0) {
|
||||||
auth2_challenge_stop(authctxt);
|
auth2_challenge_stop(ssh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE,
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_INFO_RESPONSE,
|
||||||
&input_userauth_info_response);
|
&input_userauth_info_response);
|
||||||
|
|
||||||
authctxt->postponed = 1;
|
authctxt->postponed = 1;
|
||||||
@ -285,9 +288,9 @@ send_userauth_info_request(Authctxt *authctxt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
|
input_userauth_info_response(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
KbdintAuthctxt *kbdintctxt;
|
KbdintAuthctxt *kbdintctxt;
|
||||||
int authenticated = 0, res;
|
int authenticated = 0, res;
|
||||||
u_int i, nresp;
|
u_int i, nresp;
|
||||||
@ -340,14 +343,14 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
|
|||||||
devicename = kbdintctxt->device->name;
|
devicename = kbdintctxt->device->name;
|
||||||
if (!authctxt->postponed) {
|
if (!authctxt->postponed) {
|
||||||
if (authenticated) {
|
if (authenticated) {
|
||||||
auth2_challenge_stop(authctxt);
|
auth2_challenge_stop(ssh);
|
||||||
} else {
|
} else {
|
||||||
/* start next device */
|
/* start next device */
|
||||||
/* may set authctxt->postponed */
|
/* may set authctxt->postponed */
|
||||||
auth2_challenge_start(authctxt);
|
auth2_challenge_start(ssh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
userauth_finish(authctxt, authenticated, "keyboard-interactive",
|
userauth_finish(ssh, authenticated, "keyboard-interactive",
|
||||||
devicename);
|
devicename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
67
auth2-gss.c
67
auth2-gss.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-gss.c,v 1.22 2015/01/19 20:07:45 markus Exp $ */
|
/* $OpenBSD: auth2-gss.c,v 1.25 2017/05/30 14:29:59 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
|
* Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
|
||||||
@ -48,18 +48,19 @@
|
|||||||
|
|
||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
|
|
||||||
static int input_gssapi_token(int type, u_int32_t plen, void *ctxt);
|
static int input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh);
|
||||||
static int input_gssapi_mic(int type, u_int32_t plen, void *ctxt);
|
static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh);
|
||||||
static int input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt);
|
static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh);
|
||||||
static int input_gssapi_errtok(int, u_int32_t, void *);
|
static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We only support those mechanisms that we know about (ie ones that we know
|
* We only support those mechanisms that we know about (ie ones that we know
|
||||||
* how to check local user kuserok and the like)
|
* how to check local user kuserok and the like)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
userauth_gssapi(Authctxt *authctxt)
|
userauth_gssapi(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
gss_OID_desc goid = {0, NULL};
|
gss_OID_desc goid = {0, NULL};
|
||||||
Gssctxt *ctxt = NULL;
|
Gssctxt *ctxt = NULL;
|
||||||
int mechs;
|
int mechs;
|
||||||
@ -119,17 +120,17 @@ userauth_gssapi(Authctxt *authctxt)
|
|||||||
packet_send();
|
packet_send();
|
||||||
free(doid);
|
free(doid);
|
||||||
|
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok);
|
||||||
authctxt->postponed = 1;
|
authctxt->postponed = 1;
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_gssapi_token(int type, u_int32_t plen, void *ctxt)
|
input_gssapi_token(int type, u_int32_t plen, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Gssctxt *gssctxt;
|
Gssctxt *gssctxt;
|
||||||
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
|
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
|
||||||
gss_buffer_desc recv_tok;
|
gss_buffer_desc recv_tok;
|
||||||
@ -157,8 +158,8 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
|
|||||||
packet_send();
|
packet_send();
|
||||||
}
|
}
|
||||||
authctxt->postponed = 0;
|
authctxt->postponed = 0;
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
userauth_finish(authctxt, 0, "gssapi-with-mic", NULL);
|
userauth_finish(ssh, 0, "gssapi-with-mic", NULL);
|
||||||
} else {
|
} else {
|
||||||
if (send_tok.length != 0) {
|
if (send_tok.length != 0) {
|
||||||
packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
|
packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
|
||||||
@ -166,12 +167,12 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
|
|||||||
packet_send();
|
packet_send();
|
||||||
}
|
}
|
||||||
if (maj_status == GSS_S_COMPLETE) {
|
if (maj_status == GSS_S_COMPLETE) {
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
if (flags & GSS_C_INTEG_FLAG)
|
if (flags & GSS_C_INTEG_FLAG)
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC,
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC,
|
||||||
&input_gssapi_mic);
|
&input_gssapi_mic);
|
||||||
else
|
else
|
||||||
dispatch_set(
|
ssh_dispatch_set(ssh,
|
||||||
SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
|
SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
|
||||||
&input_gssapi_exchange_complete);
|
&input_gssapi_exchange_complete);
|
||||||
}
|
}
|
||||||
@ -182,9 +183,9 @@ input_gssapi_token(int type, u_int32_t plen, void *ctxt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
|
input_gssapi_errtok(int type, u_int32_t plen, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Gssctxt *gssctxt;
|
Gssctxt *gssctxt;
|
||||||
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
|
gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
|
||||||
gss_buffer_desc recv_tok;
|
gss_buffer_desc recv_tok;
|
||||||
@ -207,8 +208,8 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
|
|||||||
free(recv_tok.value);
|
free(recv_tok.value);
|
||||||
|
|
||||||
/* We can't return anything to the client, even if we wanted to */
|
/* We can't return anything to the client, even if we wanted to */
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
||||||
|
|
||||||
/* The client will have already moved on to the next auth */
|
/* The client will have already moved on to the next auth */
|
||||||
|
|
||||||
@ -223,9 +224,9 @@ input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt)
|
input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
int authenticated;
|
int authenticated;
|
||||||
|
|
||||||
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
|
||||||
@ -241,18 +242,18 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt)
|
|||||||
authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
|
authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
|
||||||
|
|
||||||
authctxt->postponed = 0;
|
authctxt->postponed = 0;
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
||||||
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL);
|
userauth_finish(ssh, authenticated, "gssapi-with-mic", NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_gssapi_mic(int type, u_int32_t plen, void *ctxt)
|
input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Gssctxt *gssctxt;
|
Gssctxt *gssctxt;
|
||||||
int authenticated = 0;
|
int authenticated = 0;
|
||||||
Buffer b;
|
Buffer b;
|
||||||
@ -282,11 +283,11 @@ input_gssapi_mic(int type, u_int32_t plen, void *ctxt)
|
|||||||
free(mic.value);
|
free(mic.value);
|
||||||
|
|
||||||
authctxt->postponed = 0;
|
authctxt->postponed = 0;
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_MIC, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
||||||
userauth_finish(authctxt, authenticated, "gssapi-with-mic", NULL);
|
userauth_finish(ssh, authenticated, "gssapi-with-mic", NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-hostbased.c,v 1.26 2016/03/07 19:02:43 djm Exp $ */
|
/* $OpenBSD: auth2-hostbased.c,v 1.30 2017/05/30 14:29:59 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -39,7 +39,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "servconf.h"
|
#include "servconf.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "key.h"
|
#include "sshkey.h"
|
||||||
#include "hostfile.h"
|
#include "hostfile.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "canohost.h"
|
#include "canohost.h"
|
||||||
@ -48,6 +48,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "monitor_wrap.h"
|
#include "monitor_wrap.h"
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
#include "ssherr.h"
|
||||||
#include "match.h"
|
#include "match.h"
|
||||||
|
|
||||||
/* import */
|
/* import */
|
||||||
@ -56,54 +57,56 @@ extern u_char *session_id2;
|
|||||||
extern u_int session_id2_len;
|
extern u_int session_id2_len;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userauth_hostbased(Authctxt *authctxt)
|
userauth_hostbased(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Buffer b;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Key *key = NULL;
|
struct sshbuf *b;
|
||||||
|
struct sshkey *key = NULL;
|
||||||
char *pkalg, *cuser, *chost, *service;
|
char *pkalg, *cuser, *chost, *service;
|
||||||
u_char *pkblob, *sig;
|
u_char *pkblob, *sig;
|
||||||
u_int alen, blen, slen;
|
size_t alen, blen, slen;
|
||||||
int pktype;
|
int r, pktype, authenticated = 0;
|
||||||
int authenticated = 0;
|
|
||||||
|
|
||||||
if (!authctxt->valid) {
|
if (!authctxt->valid) {
|
||||||
debug2("userauth_hostbased: disabled because of invalid user");
|
debug2("%s: disabled because of invalid user", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pkalg = packet_get_string(&alen);
|
/* XXX use sshkey_froms() */
|
||||||
pkblob = packet_get_string(&blen);
|
if ((r = sshpkt_get_cstring(ssh, &pkalg, &alen)) != 0 ||
|
||||||
chost = packet_get_string(NULL);
|
(r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 ||
|
||||||
cuser = packet_get_string(NULL);
|
(r = sshpkt_get_cstring(ssh, &chost, NULL)) != 0 ||
|
||||||
sig = packet_get_string(&slen);
|
(r = sshpkt_get_cstring(ssh, &cuser, NULL)) != 0 ||
|
||||||
|
(r = sshpkt_get_string(ssh, &sig, &slen)) != 0)
|
||||||
|
fatal("%s: packet parsing: %s", __func__, ssh_err(r));
|
||||||
|
|
||||||
debug("userauth_hostbased: cuser %s chost %s pkalg %s slen %d",
|
debug("%s: cuser %s chost %s pkalg %s slen %zu", __func__,
|
||||||
cuser, chost, pkalg, slen);
|
cuser, chost, pkalg, slen);
|
||||||
#ifdef DEBUG_PK
|
#ifdef DEBUG_PK
|
||||||
debug("signature:");
|
debug("signature:");
|
||||||
buffer_init(&b);
|
sshbuf_dump_data(sig, siglen, stderr);
|
||||||
buffer_append(&b, sig, slen);
|
|
||||||
buffer_dump(&b);
|
|
||||||
buffer_free(&b);
|
|
||||||
#endif
|
#endif
|
||||||
pktype = key_type_from_name(pkalg);
|
pktype = sshkey_type_from_name(pkalg);
|
||||||
if (pktype == KEY_UNSPEC) {
|
if (pktype == KEY_UNSPEC) {
|
||||||
/* this is perfectly legal */
|
/* this is perfectly legal */
|
||||||
logit("userauth_hostbased: unsupported "
|
logit("%s: unsupported public key algorithm: %s",
|
||||||
"public key algorithm: %s", pkalg);
|
__func__, pkalg);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if ((r = sshkey_from_blob(pkblob, blen, &key)) != 0) {
|
||||||
|
error("%s: key_from_blob: %s", __func__, ssh_err(r));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
key = key_from_blob(pkblob, blen);
|
|
||||||
if (key == NULL) {
|
if (key == NULL) {
|
||||||
error("userauth_hostbased: cannot decode key: %s", pkalg);
|
error("%s: cannot decode key: %s", __func__, pkalg);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (key->type != pktype) {
|
if (key->type != pktype) {
|
||||||
error("userauth_hostbased: type mismatch for decoded key "
|
error("%s: type mismatch for decoded key "
|
||||||
"(received %d, expected %d)", key->type, pktype);
|
"(received %d, expected %d)", __func__, key->type, pktype);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (key_type_plain(key->type) == KEY_RSA &&
|
if (sshkey_type_plain(key->type) == KEY_RSA &&
|
||||||
(datafellows & SSH_BUG_RSASIGMD5) != 0) {
|
(ssh->compat & SSH_BUG_RSASIGMD5) != 0) {
|
||||||
error("Refusing RSA key because peer uses unsafe "
|
error("Refusing RSA key because peer uses unsafe "
|
||||||
"signature format");
|
"signature format");
|
||||||
goto done;
|
goto done;
|
||||||
@ -115,21 +118,23 @@ userauth_hostbased(Authctxt *authctxt)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
service = datafellows & SSH_BUG_HBSERVICE ? "ssh-userauth" :
|
service = ssh->compat & SSH_BUG_HBSERVICE ? "ssh-userauth" :
|
||||||
authctxt->service;
|
authctxt->service;
|
||||||
buffer_init(&b);
|
if ((b = sshbuf_new()) == NULL)
|
||||||
buffer_put_string(&b, session_id2, session_id2_len);
|
fatal("%s: sshbuf_new failed", __func__);
|
||||||
/* reconstruct packet */
|
/* reconstruct packet */
|
||||||
buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
|
if ((r = sshbuf_put_string(b, session_id2, session_id2_len)) != 0 ||
|
||||||
buffer_put_cstring(&b, authctxt->user);
|
(r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||
|
||||||
buffer_put_cstring(&b, service);
|
(r = sshbuf_put_cstring(b, authctxt->user)) != 0 ||
|
||||||
buffer_put_cstring(&b, "hostbased");
|
(r = sshbuf_put_cstring(b, service)) != 0 ||
|
||||||
buffer_put_string(&b, pkalg, alen);
|
(r = sshbuf_put_cstring(b, "hostbased")) != 0 ||
|
||||||
buffer_put_string(&b, pkblob, blen);
|
(r = sshbuf_put_string(b, pkalg, alen)) != 0 ||
|
||||||
buffer_put_cstring(&b, chost);
|
(r = sshbuf_put_string(b, pkblob, blen)) != 0 ||
|
||||||
buffer_put_cstring(&b, cuser);
|
(r = sshbuf_put_cstring(b, chost)) != 0 ||
|
||||||
|
(r = sshbuf_put_cstring(b, cuser)) != 0)
|
||||||
|
fatal("%s: buffer error: %s", __func__, ssh_err(r));
|
||||||
#ifdef DEBUG_PK
|
#ifdef DEBUG_PK
|
||||||
buffer_dump(&b);
|
sshbuf_dump(b, stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pubkey_auth_info(authctxt, key,
|
pubkey_auth_info(authctxt, key,
|
||||||
@ -138,15 +143,15 @@ userauth_hostbased(Authctxt *authctxt)
|
|||||||
/* test for allowed key and correct signature */
|
/* test for allowed key and correct signature */
|
||||||
authenticated = 0;
|
authenticated = 0;
|
||||||
if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
|
if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
|
||||||
PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
|
PRIVSEP(sshkey_verify(key, sig, slen,
|
||||||
buffer_len(&b))) == 1)
|
sshbuf_ptr(b), sshbuf_len(b), ssh->compat)) == 0)
|
||||||
authenticated = 1;
|
authenticated = 1;
|
||||||
|
|
||||||
buffer_free(&b);
|
sshbuf_free(b);
|
||||||
done:
|
done:
|
||||||
debug2("userauth_hostbased: authenticated %d", authenticated);
|
debug2("%s: authenticated %d", __func__, authenticated);
|
||||||
if (key != NULL)
|
if (key != NULL)
|
||||||
key_free(key);
|
sshkey_free(key);
|
||||||
free(pkalg);
|
free(pkalg);
|
||||||
free(pkblob);
|
free(pkblob);
|
||||||
free(cuser);
|
free(cuser);
|
||||||
@ -158,7 +163,7 @@ done:
|
|||||||
/* return 1 if given hostkey is allowed */
|
/* return 1 if given hostkey is allowed */
|
||||||
int
|
int
|
||||||
hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
|
hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
|
||||||
Key *key)
|
struct sshkey *key)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
struct ssh *ssh = active_state; /* XXX */
|
||||||
const char *resolvedname, *ipaddr, *lookup, *reason;
|
const char *resolvedname, *ipaddr, *lookup, *reason;
|
||||||
@ -203,8 +208,8 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
|
|||||||
}
|
}
|
||||||
debug2("%s: access allowed by auth_rhosts2", __func__);
|
debug2("%s: access allowed by auth_rhosts2", __func__);
|
||||||
|
|
||||||
if (key_is_cert(key) &&
|
if (sshkey_is_cert(key) &&
|
||||||
key_cert_check_authority(key, 1, 0, lookup, &reason)) {
|
sshkey_cert_check_authority(key, 1, 0, lookup, &reason)) {
|
||||||
error("%s", reason);
|
error("%s", reason);
|
||||||
auth_debug_add("%s", reason);
|
auth_debug_add("%s", reason);
|
||||||
return 0;
|
return 0;
|
||||||
@ -223,20 +228,20 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (host_status == HOST_OK) {
|
if (host_status == HOST_OK) {
|
||||||
if (key_is_cert(key)) {
|
if (sshkey_is_cert(key)) {
|
||||||
if ((fp = sshkey_fingerprint(key->cert->signature_key,
|
if ((fp = sshkey_fingerprint(key->cert->signature_key,
|
||||||
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
||||||
fatal("%s: sshkey_fingerprint fail", __func__);
|
fatal("%s: sshkey_fingerprint fail", __func__);
|
||||||
verbose("Accepted certificate ID \"%s\" signed by "
|
verbose("Accepted certificate ID \"%s\" signed by "
|
||||||
"%s CA %s from %s@%s", key->cert->key_id,
|
"%s CA %s from %s@%s", key->cert->key_id,
|
||||||
key_type(key->cert->signature_key), fp,
|
sshkey_type(key->cert->signature_key), fp,
|
||||||
cuser, lookup);
|
cuser, lookup);
|
||||||
} else {
|
} else {
|
||||||
if ((fp = sshkey_fingerprint(key,
|
if ((fp = sshkey_fingerprint(key,
|
||||||
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
||||||
fatal("%s: sshkey_fingerprint fail", __func__);
|
fatal("%s: sshkey_fingerprint fail", __func__);
|
||||||
verbose("Accepted %s public key %s from %s@%s",
|
verbose("Accepted %s public key %s from %s@%s",
|
||||||
key_type(key), fp, cuser, lookup);
|
sshkey_type(key), fp, cuser, lookup);
|
||||||
}
|
}
|
||||||
free(fp);
|
free(fp);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-kbdint.c,v 1.7 2014/07/15 15:54:14 millert Exp $ */
|
/* $OpenBSD: auth2-kbdint.c,v 1.8 2017/05/30 14:29:59 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -43,7 +43,7 @@
|
|||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userauth_kbdint(Authctxt *authctxt)
|
userauth_kbdint(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int authenticated = 0;
|
int authenticated = 0;
|
||||||
char *lang, *devs;
|
char *lang, *devs;
|
||||||
@ -55,7 +55,7 @@ userauth_kbdint(Authctxt *authctxt)
|
|||||||
debug("keyboard-interactive devs %s", devs);
|
debug("keyboard-interactive devs %s", devs);
|
||||||
|
|
||||||
if (options.challenge_response_authentication)
|
if (options.challenge_response_authentication)
|
||||||
authenticated = auth2_challenge(authctxt, devs);
|
authenticated = auth2_challenge(ssh, devs);
|
||||||
|
|
||||||
free(devs);
|
free(devs);
|
||||||
free(lang);
|
free(lang);
|
||||||
|
14
auth2-none.c
14
auth2-none.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-none.c,v 1.18 2014/07/15 15:54:14 millert Exp $ */
|
/* $OpenBSD: auth2-none.c,v 1.20 2017/05/30 14:29:59 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "key.h"
|
#include "sshkey.h"
|
||||||
#include "hostfile.h"
|
#include "hostfile.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
@ -47,6 +47,7 @@
|
|||||||
#include "servconf.h"
|
#include "servconf.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "ssh2.h"
|
#include "ssh2.h"
|
||||||
|
#include "ssherr.h"
|
||||||
#ifdef GSSAPI
|
#ifdef GSSAPI
|
||||||
#include "ssh-gss.h"
|
#include "ssh-gss.h"
|
||||||
#endif
|
#endif
|
||||||
@ -59,12 +60,15 @@ extern ServerOptions options;
|
|||||||
static int none_enabled = 1;
|
static int none_enabled = 1;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userauth_none(Authctxt *authctxt)
|
userauth_none(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
|
int r;
|
||||||
|
|
||||||
none_enabled = 0;
|
none_enabled = 0;
|
||||||
packet_check_eom();
|
if ((r = sshpkt_get_end(ssh)) != 0)
|
||||||
|
fatal("%s: %s", __func__, ssh_err(r));
|
||||||
if (options.permit_empty_passwd && options.password_authentication)
|
if (options.permit_empty_passwd && options.password_authentication)
|
||||||
return (PRIVSEP(auth_password(authctxt, "")));
|
return (PRIVSEP(auth_password(ssh->authctxt, "")));
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-passwd.c,v 1.12 2014/07/15 15:54:14 millert Exp $ */
|
/* $OpenBSD: auth2-passwd.c,v 1.14 2017/05/30 14:29:59 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -30,10 +30,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "xmalloc.h"
|
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
|
#include "ssherr.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "key.h"
|
#include "sshkey.h"
|
||||||
#include "hostfile.h"
|
#include "hostfile.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -48,26 +48,22 @@
|
|||||||
extern ServerOptions options;
|
extern ServerOptions options;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userauth_passwd(Authctxt *authctxt)
|
userauth_passwd(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
char *password, *newpass;
|
char *password;
|
||||||
int authenticated = 0;
|
int authenticated = 0, r;
|
||||||
int change;
|
u_char change;
|
||||||
u_int len, newlen;
|
size_t len;
|
||||||
|
|
||||||
change = packet_get_char();
|
if ((r = sshpkt_get_u8(ssh, &change)) != 0 ||
|
||||||
password = packet_get_string(&len);
|
(r = sshpkt_get_cstring(ssh, &password, &len)) != 0 ||
|
||||||
if (change) {
|
(change && (r = sshpkt_get_cstring(ssh, NULL, NULL)) != 0) ||
|
||||||
/* discard new password from packet */
|
(r = sshpkt_get_end(ssh)) != 0)
|
||||||
newpass = packet_get_string(&newlen);
|
fatal("%s: %s", __func__, ssh_err(r));
|
||||||
explicit_bzero(newpass, newlen);
|
|
||||||
free(newpass);
|
|
||||||
}
|
|
||||||
packet_check_eom();
|
|
||||||
|
|
||||||
if (change)
|
if (change)
|
||||||
logit("password change not supported");
|
logit("password change not supported");
|
||||||
else if (PRIVSEP(auth_password(authctxt, password)) == 1)
|
else if (PRIVSEP(auth_password(ssh->authctxt, password)) == 1)
|
||||||
authenticated = 1;
|
authenticated = 1;
|
||||||
explicit_bzero(password, len);
|
explicit_bzero(password, len);
|
||||||
free(password);
|
free(password);
|
||||||
|
224
auth2-pubkey.c
224
auth2-pubkey.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2-pubkey.c,v 1.62 2017/01/30 01:03:00 djm Exp $ */
|
/* $OpenBSD: auth2-pubkey.c,v 1.67 2017/05/31 10:54:00 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -52,7 +52,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "servconf.h"
|
#include "servconf.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "key.h"
|
#include "sshkey.h"
|
||||||
#include "hostfile.h"
|
#include "hostfile.h"
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
@ -76,42 +76,52 @@ extern u_char *session_id2;
|
|||||||
extern u_int session_id2_len;
|
extern u_int session_id2_len;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
userauth_pubkey(Authctxt *authctxt)
|
userauth_pubkey(struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Buffer b;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Key *key = NULL;
|
struct sshbuf *b;
|
||||||
char *pkalg, *userstyle, *fp = NULL;
|
struct sshkey *key = NULL;
|
||||||
u_char *pkblob, *sig;
|
char *pkalg, *userstyle = NULL, *fp = NULL;
|
||||||
u_int alen, blen, slen;
|
u_char *pkblob, *sig, have_sig;
|
||||||
int have_sig, pktype;
|
size_t blen, slen;
|
||||||
|
int r, pktype;
|
||||||
int authenticated = 0;
|
int authenticated = 0;
|
||||||
|
|
||||||
if (!authctxt->valid) {
|
if (!authctxt->valid) {
|
||||||
debug2("%s: disabled because of invalid user", __func__);
|
debug2("%s: disabled because of invalid user", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
have_sig = packet_get_char();
|
if ((r = sshpkt_get_u8(ssh, &have_sig)) != 0)
|
||||||
if (datafellows & SSH_BUG_PKAUTH) {
|
fatal("%s: sshpkt_get_u8 failed: %s", __func__, ssh_err(r));
|
||||||
|
if (ssh->compat & SSH_BUG_PKAUTH) {
|
||||||
debug2("%s: SSH_BUG_PKAUTH", __func__);
|
debug2("%s: SSH_BUG_PKAUTH", __func__);
|
||||||
|
if ((b = sshbuf_new()) == NULL)
|
||||||
|
fatal("%s: sshbuf_new failed", __func__);
|
||||||
/* no explicit pkalg given */
|
/* no explicit pkalg given */
|
||||||
pkblob = packet_get_string(&blen);
|
|
||||||
buffer_init(&b);
|
|
||||||
buffer_append(&b, pkblob, blen);
|
|
||||||
/* so we have to extract the pkalg from the pkblob */
|
/* so we have to extract the pkalg from the pkblob */
|
||||||
pkalg = buffer_get_string(&b, &alen);
|
/* XXX use sshbuf_from() */
|
||||||
buffer_free(&b);
|
if ((r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0 ||
|
||||||
|
(r = sshbuf_put(b, pkblob, blen)) != 0 ||
|
||||||
|
(r = sshbuf_get_cstring(b, &pkalg, NULL)) != 0)
|
||||||
|
fatal("%s: failed: %s", __func__, ssh_err(r));
|
||||||
|
sshbuf_free(b);
|
||||||
} else {
|
} else {
|
||||||
pkalg = packet_get_string(&alen);
|
if ((r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 ||
|
||||||
pkblob = packet_get_string(&blen);
|
(r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0)
|
||||||
|
fatal("%s: sshpkt_get_cstring failed: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
}
|
}
|
||||||
pktype = key_type_from_name(pkalg);
|
pktype = sshkey_type_from_name(pkalg);
|
||||||
if (pktype == KEY_UNSPEC) {
|
if (pktype == KEY_UNSPEC) {
|
||||||
/* this is perfectly legal */
|
/* this is perfectly legal */
|
||||||
logit("%s: unsupported public key algorithm: %s",
|
logit("%s: unsupported public key algorithm: %s",
|
||||||
__func__, pkalg);
|
__func__, pkalg);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
key = key_from_blob(pkblob, blen);
|
if ((r = sshkey_from_blob(pkblob, blen, &key)) != 0) {
|
||||||
|
error("%s: could not parse key: %s", __func__, ssh_err(r));
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
if (key == NULL) {
|
if (key == NULL) {
|
||||||
error("%s: cannot decode key: %s", __func__, pkalg);
|
error("%s: cannot decode key: %s", __func__, pkalg);
|
||||||
goto done;
|
goto done;
|
||||||
@ -121,15 +131,15 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
"(received %d, expected %d)", __func__, key->type, pktype);
|
"(received %d, expected %d)", __func__, key->type, pktype);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (key_type_plain(key->type) == KEY_RSA &&
|
if (sshkey_type_plain(key->type) == KEY_RSA &&
|
||||||
(datafellows & SSH_BUG_RSASIGMD5) != 0) {
|
(ssh->compat & SSH_BUG_RSASIGMD5) != 0) {
|
||||||
logit("Refusing RSA key because client uses unsafe "
|
logit("Refusing RSA key because client uses unsafe "
|
||||||
"signature scheme");
|
"signature scheme");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
fp = sshkey_fingerprint(key, options.fingerprint_hash, SSH_FP_DEFAULT);
|
fp = sshkey_fingerprint(key, options.fingerprint_hash, SSH_FP_DEFAULT);
|
||||||
if (auth2_userkey_already_used(authctxt, key)) {
|
if (auth2_userkey_already_used(authctxt, key)) {
|
||||||
logit("refusing previously-used %s key", key_type(key));
|
logit("refusing previously-used %s key", sshkey_type(key));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (match_pattern_list(sshkey_ssh_name(key),
|
if (match_pattern_list(sshkey_ssh_name(key),
|
||||||
@ -142,35 +152,48 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
if (have_sig) {
|
if (have_sig) {
|
||||||
debug3("%s: have signature for %s %s",
|
debug3("%s: have signature for %s %s",
|
||||||
__func__, sshkey_type(key), fp);
|
__func__, sshkey_type(key), fp);
|
||||||
sig = packet_get_string(&slen);
|
if ((r = sshpkt_get_string(ssh, &sig, &slen)) != 0 ||
|
||||||
packet_check_eom();
|
(r = sshpkt_get_end(ssh)) != 0)
|
||||||
buffer_init(&b);
|
fatal("%s: %s", __func__, ssh_err(r));
|
||||||
if (datafellows & SSH_OLD_SESSIONID) {
|
if ((b = sshbuf_new()) == NULL)
|
||||||
buffer_append(&b, session_id2, session_id2_len);
|
fatal("%s: sshbuf_new failed", __func__);
|
||||||
|
if (ssh->compat & SSH_OLD_SESSIONID) {
|
||||||
|
if ((r = sshbuf_put(b, session_id2,
|
||||||
|
session_id2_len)) != 0)
|
||||||
|
fatal("%s: sshbuf_put session id: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
} else {
|
} else {
|
||||||
buffer_put_string(&b, session_id2, session_id2_len);
|
if ((r = sshbuf_put_string(b, session_id2,
|
||||||
|
session_id2_len)) != 0)
|
||||||
|
fatal("%s: sshbuf_put_string session id: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
}
|
}
|
||||||
/* reconstruct packet */
|
/* reconstruct packet */
|
||||||
buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
|
|
||||||
xasprintf(&userstyle, "%s%s%s", authctxt->user,
|
xasprintf(&userstyle, "%s%s%s", authctxt->user,
|
||||||
authctxt->style ? ":" : "",
|
authctxt->style ? ":" : "",
|
||||||
authctxt->style ? authctxt->style : "");
|
authctxt->style ? authctxt->style : "");
|
||||||
buffer_put_cstring(&b, userstyle);
|
if ((r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||
|
||||||
free(userstyle);
|
(r = sshbuf_put_cstring(b, userstyle)) != 0 ||
|
||||||
buffer_put_cstring(&b,
|
(r = sshbuf_put_cstring(b, ssh->compat & SSH_BUG_PKSERVICE ?
|
||||||
datafellows & SSH_BUG_PKSERVICE ?
|
"ssh-userauth" : authctxt->service)) != 0)
|
||||||
"ssh-userauth" :
|
fatal("%s: build packet failed: %s",
|
||||||
authctxt->service);
|
__func__, ssh_err(r));
|
||||||
if (datafellows & SSH_BUG_PKAUTH) {
|
if (ssh->compat & SSH_BUG_PKAUTH) {
|
||||||
buffer_put_char(&b, have_sig);
|
if ((r = sshbuf_put_u8(b, have_sig)) != 0)
|
||||||
|
fatal("%s: build packet failed: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
} else {
|
} else {
|
||||||
buffer_put_cstring(&b, "publickey");
|
if ((r = sshbuf_put_cstring(b, "publickey")) != 0 ||
|
||||||
buffer_put_char(&b, have_sig);
|
(r = sshbuf_put_u8(b, have_sig)) != 0 ||
|
||||||
buffer_put_cstring(&b, pkalg);
|
(r = sshbuf_put_cstring(b, pkalg) != 0))
|
||||||
|
fatal("%s: build packet failed: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
}
|
}
|
||||||
buffer_put_string(&b, pkblob, blen);
|
if ((r = sshbuf_put_string(b, pkblob, blen)) != 0)
|
||||||
|
fatal("%s: build packet failed: %s",
|
||||||
|
__func__, ssh_err(r));
|
||||||
#ifdef DEBUG_PK
|
#ifdef DEBUG_PK
|
||||||
buffer_dump(&b);
|
sshbuf_dump(b, stderr);
|
||||||
#endif
|
#endif
|
||||||
pubkey_auth_info(authctxt, key, NULL);
|
pubkey_auth_info(authctxt, key, NULL);
|
||||||
|
|
||||||
@ -186,6 +209,7 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
DWORD token = 0;
|
DWORD token = 0;
|
||||||
extern int auth_sock;
|
extern int auth_sock;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
int ssh_request_reply(int , struct sshbuf *, struct sshbuf *);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
msg = sshbuf_new();
|
msg = sshbuf_new();
|
||||||
@ -197,7 +221,7 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
(r = sshbuf_put_string(msg, blob, blen)) != 0 ||
|
(r = sshbuf_put_string(msg, blob, blen)) != 0 ||
|
||||||
(r = sshbuf_put_cstring(msg, authctxt->pw->pw_name)) != 0 ||
|
(r = sshbuf_put_cstring(msg, authctxt->pw->pw_name)) != 0 ||
|
||||||
(r = sshbuf_put_string(msg, sig, slen)) != 0 ||
|
(r = sshbuf_put_string(msg, sig, slen)) != 0 ||
|
||||||
(r = sshbuf_put_string(msg, buffer_ptr(&b), buffer_len(&b))) != 0 ||
|
(r = sshbuf_put_string(msg, sshbuf_ptr(b), sshbuf_len(b))) != 0 ||
|
||||||
(r = ssh_request_reply(auth_sock, msg, msg)) != 0 ||
|
(r = ssh_request_reply(auth_sock, msg, msg)) != 0 ||
|
||||||
(r = sshbuf_get_u32(msg, &token)) != 0) {
|
(r = sshbuf_get_u32(msg, &token)) != 0) {
|
||||||
debug("auth agent did not authorize client %s", authctxt->user);
|
debug("auth agent did not authorize client %s", authctxt->user);
|
||||||
@ -222,21 +246,22 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
|
|
||||||
#else /* !WINDOWS */
|
#else /* !WINDOWS */
|
||||||
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 1)) &&
|
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 1)) &&
|
||||||
PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
|
PRIVSEP(sshkey_verify(key, sig, slen, sshbuf_ptr(b),
|
||||||
buffer_len(&b))) == 1) {
|
sshbuf_len(b), ssh->compat)) == 0) {
|
||||||
authenticated = 1;
|
authenticated = 1;
|
||||||
/* Record the successful key to prevent reuse */
|
/* Record the successful key to prevent reuse */
|
||||||
auth2_record_userkey(authctxt, key);
|
auth2_record_userkey(authctxt, key);
|
||||||
key = NULL; /* Don't free below */
|
key = NULL; /* Don't free below */
|
||||||
}
|
}
|
||||||
buffer_free(&b);
|
sshbuf_free(b);
|
||||||
free(sig);
|
free(sig);
|
||||||
#endif /* !WINDOWS */
|
#endif /* !WINDOWS */
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
debug("%s: test whether pkalg/pkblob are acceptable for %s %s",
|
debug("%s: test whether pkalg/pkblob are acceptable for %s %s",
|
||||||
__func__, sshkey_type(key), fp);
|
__func__, sshkey_type(key), fp);
|
||||||
packet_check_eom();
|
if ((r = sshpkt_get_end(ssh)) != 0)
|
||||||
|
fatal("%s: %s", __func__, ssh_err(r));
|
||||||
|
|
||||||
/* XXX fake reply and always send PK_OK ? */
|
/* XXX fake reply and always send PK_OK ? */
|
||||||
/*
|
/*
|
||||||
@ -247,11 +272,13 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
* issue? -markus
|
* issue? -markus
|
||||||
*/
|
*/
|
||||||
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 0))) {
|
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 0))) {
|
||||||
packet_start(SSH2_MSG_USERAUTH_PK_OK);
|
if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_PK_OK))
|
||||||
packet_put_string(pkalg, alen);
|
!= 0 ||
|
||||||
packet_put_string(pkblob, blen);
|
(r = sshpkt_put_cstring(ssh, pkalg)) != 0 ||
|
||||||
packet_send();
|
(r = sshpkt_put_string(ssh, pkblob, blen)) != 0 ||
|
||||||
packet_write_wait();
|
(r = sshpkt_send(ssh)) != 0)
|
||||||
|
fatal("%s: %s", __func__, ssh_err(r));
|
||||||
|
ssh_packet_write_wait(ssh);
|
||||||
authctxt->postponed = 1;
|
authctxt->postponed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -260,7 +287,8 @@ userauth_pubkey(Authctxt *authctxt)
|
|||||||
done:
|
done:
|
||||||
debug2("%s: authenticated %d pkalg %s", __func__, authenticated, pkalg);
|
debug2("%s: authenticated %d pkalg %s", __func__, authenticated, pkalg);
|
||||||
if (key != NULL)
|
if (key != NULL)
|
||||||
key_free(key);
|
sshkey_free(key);
|
||||||
|
free(userstyle);
|
||||||
free(pkalg);
|
free(pkalg);
|
||||||
free(pkblob);
|
free(pkblob);
|
||||||
free(fp);
|
free(fp);
|
||||||
@ -268,7 +296,8 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
pubkey_auth_info(Authctxt *authctxt, const Key *key, const char *fmt, ...)
|
pubkey_auth_info(Authctxt *authctxt, const struct sshkey *key,
|
||||||
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
char *fp, *extra;
|
char *fp, *extra;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
@ -283,20 +312,20 @@ pubkey_auth_info(Authctxt *authctxt, const Key *key, const char *fmt, ...)
|
|||||||
fatal("%s: vasprintf failed", __func__);
|
fatal("%s: vasprintf failed", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key_is_cert(key)) {
|
if (sshkey_is_cert(key)) {
|
||||||
fp = sshkey_fingerprint(key->cert->signature_key,
|
fp = sshkey_fingerprint(key->cert->signature_key,
|
||||||
options.fingerprint_hash, SSH_FP_DEFAULT);
|
options.fingerprint_hash, SSH_FP_DEFAULT);
|
||||||
auth_info(authctxt, "%s ID %s (serial %llu) CA %s %s%s%s",
|
auth_info(authctxt, "%s ID %s (serial %llu) CA %s %s%s%s",
|
||||||
key_type(key), key->cert->key_id,
|
sshkey_type(key), key->cert->key_id,
|
||||||
(unsigned long long)key->cert->serial,
|
(unsigned long long)key->cert->serial,
|
||||||
key_type(key->cert->signature_key),
|
sshkey_type(key->cert->signature_key),
|
||||||
fp == NULL ? "(null)" : fp,
|
fp == NULL ? "(null)" : fp,
|
||||||
extra == NULL ? "" : ", ", extra == NULL ? "" : extra);
|
extra == NULL ? "" : ", ", extra == NULL ? "" : extra);
|
||||||
free(fp);
|
free(fp);
|
||||||
} else {
|
} else {
|
||||||
fp = sshkey_fingerprint(key, options.fingerprint_hash,
|
fp = sshkey_fingerprint(key, options.fingerprint_hash,
|
||||||
SSH_FP_DEFAULT);
|
SSH_FP_DEFAULT);
|
||||||
auth_info(authctxt, "%s %s%s%s", key_type(key),
|
auth_info(authctxt, "%s %s%s%s", sshkey_type(key),
|
||||||
fp == NULL ? "(null)" : fp,
|
fp == NULL ? "(null)" : fp,
|
||||||
extra == NULL ? "" : ", ", extra == NULL ? "" : extra);
|
extra == NULL ? "" : ", ", extra == NULL ? "" : extra);
|
||||||
free(fp);
|
free(fp);
|
||||||
@ -612,7 +641,7 @@ match_principals_option(const char *principal_list, struct sshkey_cert *cert)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
process_principals(FILE *f, char *file, struct passwd *pw,
|
process_principals(FILE *f, const char *file, struct passwd *pw,
|
||||||
const struct sshkey_cert *cert)
|
const struct sshkey_cert *cert)
|
||||||
{
|
{
|
||||||
char line[SSH_MAX_PUBKEY_BYTES], *cp, *ep, *line_opts;
|
char line[SSH_MAX_PUBKEY_BYTES], *cp, *ep, *line_opts;
|
||||||
@ -650,8 +679,7 @@ process_principals(FILE *f, char *file, struct passwd *pw,
|
|||||||
for (i = 0; i < cert->nprincipals; i++) {
|
for (i = 0; i < cert->nprincipals; i++) {
|
||||||
if (strcmp(cp, cert->principals[i]) == 0) {
|
if (strcmp(cp, cert->principals[i]) == 0) {
|
||||||
debug3("%s:%lu: matched principal \"%.100s\"",
|
debug3("%s:%lu: matched principal \"%.100s\"",
|
||||||
file == NULL ? "(command)" : file,
|
file, linenum, cert->principals[i]);
|
||||||
linenum, cert->principals[i]);
|
|
||||||
if (auth_parse_options(pw, line_opts,
|
if (auth_parse_options(pw, line_opts,
|
||||||
file, linenum) != 1)
|
file, linenum) != 1)
|
||||||
continue;
|
continue;
|
||||||
@ -782,7 +810,7 @@ match_principals_command(struct passwd *user_pw, const struct sshkey *key)
|
|||||||
uid_swapped = 1;
|
uid_swapped = 1;
|
||||||
temporarily_use_uid(pw);
|
temporarily_use_uid(pw);
|
||||||
|
|
||||||
ok = process_principals(f, NULL, pw, cert);
|
ok = process_principals(f, "(command)", pw, cert);
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
f = NULL;
|
f = NULL;
|
||||||
@ -814,16 +842,13 @@ match_principals_command(struct passwd *user_pw, const struct sshkey *key)
|
|||||||
* returns 1 if the key is allowed or 0 otherwise.
|
* returns 1 if the key is allowed or 0 otherwise.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
check_authkeys_file(FILE *f, char *file, struct sshkey *key, struct passwd *pw)
|
||||||
{
|
{
|
||||||
char line[SSH_MAX_PUBKEY_BYTES];
|
char line[SSH_MAX_PUBKEY_BYTES];
|
||||||
int found_key = 0;
|
int found_key = 0;
|
||||||
u_long linenum = 0;
|
u_long linenum = 0;
|
||||||
Key *found;
|
struct sshkey *found = NULL;
|
||||||
|
|
||||||
found_key = 0;
|
|
||||||
|
|
||||||
found = NULL;
|
|
||||||
while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
|
while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
|
||||||
char *cp, *key_options = NULL, *fp = NULL;
|
char *cp, *key_options = NULL, *fp = NULL;
|
||||||
const char *reason = NULL;
|
const char *reason = NULL;
|
||||||
@ -832,8 +857,10 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
if (found_key)
|
if (found_key)
|
||||||
continue;
|
continue;
|
||||||
if (found != NULL)
|
if (found != NULL)
|
||||||
key_free(found);
|
sshkey_free(found);
|
||||||
found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
|
found = sshkey_new(sshkey_is_cert(key) ? KEY_UNSPEC : key->type);
|
||||||
|
if (found == NULL)
|
||||||
|
goto done;
|
||||||
auth_clear_options();
|
auth_clear_options();
|
||||||
|
|
||||||
/* Skip leading whitespace, empty and comment lines. */
|
/* Skip leading whitespace, empty and comment lines. */
|
||||||
@ -842,7 +869,7 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
if (!*cp || *cp == '\n' || *cp == '#')
|
if (!*cp || *cp == '\n' || *cp == '#')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (key_read(found, &cp) != 1) {
|
if (sshkey_read(found, &cp) != 0) {
|
||||||
/* no key? check if there are options for this key */
|
/* no key? check if there are options for this key */
|
||||||
int quoted = 0;
|
int quoted = 0;
|
||||||
debug2("user_key_allowed: check options: '%s'", cp);
|
debug2("user_key_allowed: check options: '%s'", cp);
|
||||||
@ -856,14 +883,14 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
/* Skip remaining whitespace. */
|
/* Skip remaining whitespace. */
|
||||||
for (; *cp == ' ' || *cp == '\t'; cp++)
|
for (; *cp == ' ' || *cp == '\t'; cp++)
|
||||||
;
|
;
|
||||||
if (key_read(found, &cp) != 1) {
|
if (sshkey_read(found, &cp) != 0) {
|
||||||
debug2("user_key_allowed: advance: '%s'", cp);
|
debug2("user_key_allowed: advance: '%s'", cp);
|
||||||
/* still no key? advance to next line*/
|
/* still no key? advance to next line*/
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (key_is_cert(key)) {
|
if (sshkey_is_cert(key)) {
|
||||||
if (!key_equal(found, key->cert->signature_key))
|
if (!sshkey_equal(found, key->cert->signature_key))
|
||||||
continue;
|
continue;
|
||||||
if (auth_parse_options(pw, key_options, file,
|
if (auth_parse_options(pw, key_options, file,
|
||||||
linenum) != 1)
|
linenum) != 1)
|
||||||
@ -874,7 +901,7 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
debug("matching CA found: file %s, line %lu, %s %s",
|
debug("matching CA found: file %s, line %lu, %s %s",
|
||||||
file, linenum, key_type(found), fp);
|
file, linenum, sshkey_type(found), fp);
|
||||||
/*
|
/*
|
||||||
* If the user has specified a list of principals as
|
* If the user has specified a list of principals as
|
||||||
* a key option, then prefer that list to matching
|
* a key option, then prefer that list to matching
|
||||||
@ -891,7 +918,7 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
auth_debug_add("%s", reason);
|
auth_debug_add("%s", reason);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (key_cert_check_authority(key, 0, 0,
|
if (sshkey_cert_check_authority(key, 0, 0,
|
||||||
authorized_principals == NULL ? pw->pw_name : NULL,
|
authorized_principals == NULL ? pw->pw_name : NULL,
|
||||||
&reason) != 0)
|
&reason) != 0)
|
||||||
goto fail_reason;
|
goto fail_reason;
|
||||||
@ -900,11 +927,11 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
verbose("Accepted certificate ID \"%s\" (serial %llu) "
|
verbose("Accepted certificate ID \"%s\" (serial %llu) "
|
||||||
"signed by %s CA %s via %s", key->cert->key_id,
|
"signed by %s CA %s via %s", key->cert->key_id,
|
||||||
(unsigned long long)key->cert->serial,
|
(unsigned long long)key->cert->serial,
|
||||||
key_type(found), fp, file);
|
sshkey_type(found), fp, file);
|
||||||
free(fp);
|
free(fp);
|
||||||
found_key = 1;
|
found_key = 1;
|
||||||
break;
|
break;
|
||||||
} else if (key_equal(found, key)) {
|
} else if (sshkey_equal(found, key)) {
|
||||||
if (auth_parse_options(pw, key_options, file,
|
if (auth_parse_options(pw, key_options, file,
|
||||||
linenum) != 1)
|
linenum) != 1)
|
||||||
continue;
|
continue;
|
||||||
@ -914,14 +941,15 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
debug("matching key found: file %s, line %lu %s %s",
|
debug("matching key found: file %s, line %lu %s %s",
|
||||||
file, linenum, key_type(found), fp);
|
file, linenum, sshkey_type(found), fp);
|
||||||
free(fp);
|
free(fp);
|
||||||
found_key = 1;
|
found_key = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
done:
|
||||||
if (found != NULL)
|
if (found != NULL)
|
||||||
key_free(found);
|
sshkey_free(found);
|
||||||
if (!found_key)
|
if (!found_key)
|
||||||
debug2("key not found");
|
debug2("key not found");
|
||||||
return found_key;
|
return found_key;
|
||||||
@ -929,24 +957,24 @@ check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
|
|||||||
|
|
||||||
/* Authenticate a certificate key against TrustedUserCAKeys */
|
/* Authenticate a certificate key against TrustedUserCAKeys */
|
||||||
static int
|
static int
|
||||||
user_cert_trusted_ca(struct passwd *pw, Key *key)
|
user_cert_trusted_ca(struct passwd *pw, struct sshkey *key)
|
||||||
{
|
{
|
||||||
char *ca_fp, *principals_file = NULL;
|
char *ca_fp, *principals_file = NULL;
|
||||||
const char *reason;
|
const char *reason;
|
||||||
int ret = 0, found_principal = 0, use_authorized_principals;
|
int r, ret = 0, found_principal = 0, use_authorized_principals;
|
||||||
|
|
||||||
if (!key_is_cert(key) || options.trusted_user_ca_keys == NULL)
|
if (!sshkey_is_cert(key) || options.trusted_user_ca_keys == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((ca_fp = sshkey_fingerprint(key->cert->signature_key,
|
if ((ca_fp = sshkey_fingerprint(key->cert->signature_key,
|
||||||
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (sshkey_in_file(key->cert->signature_key,
|
if ((r = sshkey_in_file(key->cert->signature_key,
|
||||||
options.trusted_user_ca_keys, 1, 0) != 0) {
|
options.trusted_user_ca_keys, 1, 0)) != 0) {
|
||||||
debug2("%s: CA %s %s is not listed in %s", __func__,
|
debug2("%s: CA %s %s is not listed in %s: %s", __func__,
|
||||||
key_type(key->cert->signature_key), ca_fp,
|
sshkey_type(key->cert->signature_key), ca_fp,
|
||||||
options.trusted_user_ca_keys);
|
options.trusted_user_ca_keys, ssh_err(r));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -971,7 +999,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
|
|||||||
auth_debug_add("%s", reason);
|
auth_debug_add("%s", reason);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (key_cert_check_authority(key, 0, 1,
|
if (sshkey_cert_check_authority(key, 0, 1,
|
||||||
use_authorized_principals ? NULL : pw->pw_name, &reason) != 0)
|
use_authorized_principals ? NULL : pw->pw_name, &reason) != 0)
|
||||||
goto fail_reason;
|
goto fail_reason;
|
||||||
if (auth_cert_options(key, pw, &reason) != 0)
|
if (auth_cert_options(key, pw, &reason) != 0)
|
||||||
@ -980,7 +1008,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
|
|||||||
verbose("Accepted certificate ID \"%s\" (serial %llu) signed by "
|
verbose("Accepted certificate ID \"%s\" (serial %llu) signed by "
|
||||||
"%s CA %s via %s", key->cert->key_id,
|
"%s CA %s via %s", key->cert->key_id,
|
||||||
(unsigned long long)key->cert->serial,
|
(unsigned long long)key->cert->serial,
|
||||||
key_type(key->cert->signature_key), ca_fp,
|
sshkey_type(key->cert->signature_key), ca_fp,
|
||||||
options.trusted_user_ca_keys);
|
options.trusted_user_ca_keys);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
@ -995,7 +1023,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
|
|||||||
* returns 1 if the key is allowed or 0 otherwise.
|
* returns 1 if the key is allowed or 0 otherwise.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
user_key_allowed2(struct passwd *pw, Key *key, char *file)
|
user_key_allowed2(struct passwd *pw, struct sshkey *key, char *file)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int found_key = 0;
|
int found_key = 0;
|
||||||
@ -1018,7 +1046,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
|
|||||||
* returns 1 if the key is allowed or 0 otherwise.
|
* returns 1 if the key is allowed or 0 otherwise.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
user_key_command_allowed2(struct passwd *user_pw, Key *key)
|
user_key_command_allowed2(struct passwd *user_pw, struct sshkey *key)
|
||||||
{
|
{
|
||||||
FILE *f = NULL;
|
FILE *f = NULL;
|
||||||
int r, ok, found_key = 0;
|
int r, ok, found_key = 0;
|
||||||
@ -1141,14 +1169,15 @@ user_key_command_allowed2(struct passwd *user_pw, Key *key)
|
|||||||
* Check whether key authenticates and authorises the user.
|
* Check whether key authenticates and authorises the user.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
user_key_allowed(struct passwd *pw, Key *key, int auth_attempt)
|
user_key_allowed(struct passwd *pw, struct sshkey *key, int auth_attempt)
|
||||||
{
|
{
|
||||||
u_int success, i;
|
u_int success, i;
|
||||||
char *file;
|
char *file;
|
||||||
|
|
||||||
if (auth_key_is_revoked(key))
|
if (auth_key_is_revoked(key))
|
||||||
return 0;
|
return 0;
|
||||||
if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key))
|
if (sshkey_is_cert(key) &&
|
||||||
|
auth_key_is_revoked(key->cert->signature_key))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
success = user_cert_trusted_ca(pw, key);
|
success = user_cert_trusted_ca(pw, key);
|
||||||
@ -1180,9 +1209,10 @@ auth2_record_userkey(Authctxt *authctxt, struct sshkey *key)
|
|||||||
struct sshkey **tmp;
|
struct sshkey **tmp;
|
||||||
|
|
||||||
if (authctxt->nprev_userkeys >= INT_MAX ||
|
if (authctxt->nprev_userkeys >= INT_MAX ||
|
||||||
(tmp = reallocarray(authctxt->prev_userkeys,
|
(tmp = recallocarray(authctxt->prev_userkeys,
|
||||||
authctxt->nprev_userkeys + 1, sizeof(*tmp))) == NULL)
|
authctxt->nprev_userkeys, authctxt->nprev_userkeys + 1,
|
||||||
fatal("%s: reallocarray failed", __func__);
|
sizeof(*tmp))) == NULL)
|
||||||
|
fatal("%s: recallocarray failed", __func__);
|
||||||
authctxt->prev_userkeys = tmp;
|
authctxt->prev_userkeys = tmp;
|
||||||
authctxt->prev_userkeys[authctxt->nprev_userkeys] = key;
|
authctxt->prev_userkeys[authctxt->nprev_userkeys] = key;
|
||||||
authctxt->nprev_userkeys++;
|
authctxt->nprev_userkeys++;
|
||||||
|
42
auth2.c
42
auth2.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: auth2.c,v 1.137 2017/02/03 23:05:57 djm Exp $ */
|
/* $OpenBSD: auth2.c,v 1.142 2017/05/31 07:00:13 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -87,8 +87,8 @@ Authmethod *authmethods[] = {
|
|||||||
|
|
||||||
/* protocol */
|
/* protocol */
|
||||||
|
|
||||||
static int input_service_request(int, u_int32_t, void *);
|
static int input_service_request(int, u_int32_t, struct ssh *);
|
||||||
static int input_userauth_request(int, u_int32_t, void *);
|
static int input_userauth_request(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
/* helper */
|
/* helper */
|
||||||
static Authmethod *authmethod_lookup(Authctxt *, const char *);
|
static Authmethod *authmethod_lookup(Authctxt *, const char *);
|
||||||
@ -168,16 +168,19 @@ done:
|
|||||||
void
|
void
|
||||||
do_authentication2(Authctxt *authctxt)
|
do_authentication2(Authctxt *authctxt)
|
||||||
{
|
{
|
||||||
dispatch_init(&dispatch_protocol_error);
|
struct ssh *ssh = active_state; /* XXX */
|
||||||
dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
|
ssh->authctxt = authctxt; /* XXX move to caller */
|
||||||
dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
|
ssh_dispatch_init(ssh, &dispatch_protocol_error);
|
||||||
|
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_REQUEST, &input_service_request);
|
||||||
|
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success);
|
||||||
|
ssh->authctxt = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
input_service_request(int type, u_int32_t seq, void *ctxt)
|
input_service_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Authctxt *authctxt = ctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
u_int len;
|
u_int len;
|
||||||
int acceptit = 0;
|
int acceptit = 0;
|
||||||
char *service = packet_get_cstring(&len);
|
char *service = packet_get_cstring(&len);
|
||||||
@ -190,7 +193,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
|
|||||||
if (!authctxt->success) {
|
if (!authctxt->success) {
|
||||||
acceptit = 1;
|
acceptit = 1;
|
||||||
/* now we can handle user-auth requests */
|
/* now we can handle user-auth requests */
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* XXX all other service requests are denied */
|
/* XXX all other service requests are denied */
|
||||||
@ -210,10 +213,9 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
input_userauth_request(int type, u_int32_t seq, void *ctxt)
|
input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
Authctxt *authctxt = ctxt;
|
|
||||||
Authmethod *m = NULL;
|
Authmethod *m = NULL;
|
||||||
char *user, *service, *method, *style = NULL;
|
char *user, *service, *method, *style = NULL;
|
||||||
int authenticated = 0;
|
int authenticated = 0;
|
||||||
@ -267,12 +269,12 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
|
|||||||
authctxt->user, authctxt->service, user, service);
|
authctxt->user, authctxt->service, user, service);
|
||||||
}
|
}
|
||||||
/* reset state */
|
/* reset state */
|
||||||
auth2_challenge_stop(authctxt);
|
auth2_challenge_stop(ssh);
|
||||||
|
|
||||||
#ifdef GSSAPI
|
#ifdef GSSAPI
|
||||||
/* XXX move to auth2_gssapi_stop() */
|
/* XXX move to auth2_gssapi_stop() */
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
authctxt->postponed = 0;
|
authctxt->postponed = 0;
|
||||||
@ -282,9 +284,9 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
|
|||||||
m = authmethod_lookup(authctxt, method);
|
m = authmethod_lookup(authctxt, method);
|
||||||
if (m != NULL && authctxt->failures < options.max_authtries) {
|
if (m != NULL && authctxt->failures < options.max_authtries) {
|
||||||
debug2("input_userauth_request: try method %s", method);
|
debug2("input_userauth_request: try method %s", method);
|
||||||
authenticated = m->userauth(authctxt);
|
authenticated = m->userauth(ssh);
|
||||||
}
|
}
|
||||||
userauth_finish(authctxt, authenticated, method, NULL);
|
userauth_finish(ssh, authenticated, method, NULL);
|
||||||
|
|
||||||
free(service);
|
free(service);
|
||||||
free(user);
|
free(user);
|
||||||
@ -293,10 +295,10 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
|
userauth_finish(struct ssh *ssh, int authenticated, const char *method,
|
||||||
const char *submethod)
|
const char *submethod)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
char *methods;
|
char *methods;
|
||||||
int partial = 0;
|
int partial = 0;
|
||||||
|
|
||||||
@ -352,7 +354,7 @@ userauth_finish(Authctxt *authctxt, int authenticated, const char *method,
|
|||||||
|
|
||||||
if (authenticated == 1) {
|
if (authenticated == 1) {
|
||||||
/* turn off userauth */
|
/* turn off userauth */
|
||||||
dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &dispatch_protocol_ignore);
|
ssh_dispatch_set(ssh, SSH2_MSG_USERAUTH_REQUEST, &dispatch_protocol_ignore);
|
||||||
packet_start(SSH2_MSG_USERAUTH_SUCCESS);
|
packet_start(SSH2_MSG_USERAUTH_SUCCESS);
|
||||||
packet_send();
|
packet_send();
|
||||||
packet_write_wait();
|
packet_write_wait();
|
||||||
|
60
authfile.c
60
authfile.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: authfile.c,v 1.124 2017/04/30 23:10:43 djm Exp $ */
|
/* $OpenBSD: authfile.c,v 1.126 2017/05/31 09:15:42 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -101,25 +101,13 @@ sshkey_load_file(int fd, struct sshbuf *blob)
|
|||||||
u_char buf[1024];
|
u_char buf[1024];
|
||||||
size_t len;
|
size_t len;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int r, dontmax = 0;
|
int r;
|
||||||
|
|
||||||
if (fstat(fd, &st) < 0)
|
if (fstat(fd, &st) < 0)
|
||||||
return SSH_ERR_SYSTEM_ERROR;
|
return SSH_ERR_SYSTEM_ERROR;
|
||||||
if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
|
if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
|
||||||
st.st_size > MAX_KEY_FILE_SIZE)
|
st.st_size > MAX_KEY_FILE_SIZE)
|
||||||
return SSH_ERR_INVALID_FORMAT;
|
return SSH_ERR_INVALID_FORMAT;
|
||||||
/*
|
|
||||||
* Pre-allocate the buffer used for the key contents and clamp its
|
|
||||||
* maximum size. This ensures that key contents are never leaked via
|
|
||||||
* implicit realloc() in the sshbuf code.
|
|
||||||
*/
|
|
||||||
if ((st.st_mode & S_IFREG) == 0 || st.st_size <= 0) {
|
|
||||||
st.st_size = 64*1024; /* 64k ought to be enough for anybody. :) */
|
|
||||||
dontmax = 1;
|
|
||||||
}
|
|
||||||
if ((r = sshbuf_allocate(blob, st.st_size)) != 0 ||
|
|
||||||
(dontmax && (r = sshbuf_set_max_size(blob, st.st_size)) != 0))
|
|
||||||
return r;
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
|
if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
|
||||||
if (errno == EPIPE)
|
if (errno == EPIPE)
|
||||||
@ -326,50 +314,48 @@ sshkey_try_load_public(struct sshkey *k, const char *filename, char **commentp)
|
|||||||
return SSH_ERR_INVALID_FORMAT;
|
return SSH_ERR_INVALID_FORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load public key from ssh v1 private or any pubkey file */
|
/* load public key from any pubkey file */
|
||||||
int
|
int
|
||||||
sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp)
|
sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp)
|
||||||
{
|
{
|
||||||
struct sshkey *pub = NULL;
|
struct sshkey *pub = NULL;
|
||||||
char file[PATH_MAX];
|
char *file = NULL;
|
||||||
int r, fd;
|
int r;
|
||||||
|
|
||||||
if (keyp != NULL)
|
if (keyp != NULL)
|
||||||
*keyp = NULL;
|
*keyp = NULL;
|
||||||
if (commentp != NULL)
|
if (commentp != NULL)
|
||||||
*commentp = NULL;
|
*commentp = NULL;
|
||||||
|
|
||||||
/* XXX should load file once and attempt to parse each format */
|
|
||||||
|
|
||||||
if ((fd = open(filename, O_RDONLY)) < 0)
|
|
||||||
goto skip;
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
/* try ssh2 public key */
|
|
||||||
if ((pub = sshkey_new(KEY_UNSPEC)) == NULL)
|
if ((pub = sshkey_new(KEY_UNSPEC)) == NULL)
|
||||||
return SSH_ERR_ALLOC_FAIL;
|
return SSH_ERR_ALLOC_FAIL;
|
||||||
if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) {
|
if ((r = sshkey_try_load_public(pub, filename, commentp)) == 0) {
|
||||||
if (keyp != NULL)
|
if (keyp != NULL) {
|
||||||
*keyp = pub;
|
*keyp = pub;
|
||||||
return 0;
|
pub = NULL;
|
||||||
|
}
|
||||||
|
r = 0;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
sshkey_free(pub);
|
sshkey_free(pub);
|
||||||
|
|
||||||
|
|
||||||
skip:
|
|
||||||
/* try .pub suffix */
|
/* try .pub suffix */
|
||||||
if ((pub = sshkey_new(KEY_UNSPEC)) == NULL)
|
if (asprintf(&file, "%s.pub", filename) == -1)
|
||||||
return SSH_ERR_ALLOC_FAIL;
|
return SSH_ERR_ALLOC_FAIL;
|
||||||
r = SSH_ERR_ALLOC_FAIL; /* in case strlcpy or strlcat fail */
|
if ((pub = sshkey_new(KEY_UNSPEC)) == NULL) {
|
||||||
if ((strlcpy(file, filename, sizeof file) < sizeof(file)) &&
|
r = SSH_ERR_ALLOC_FAIL;
|
||||||
(strlcat(file, ".pub", sizeof file) < sizeof(file)) &&
|
goto out;
|
||||||
(r = sshkey_try_load_public(pub, file, commentp)) == 0) {
|
|
||||||
if (keyp != NULL)
|
|
||||||
*keyp = pub;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
if ((r = sshkey_try_load_public(pub, file, commentp)) == 0) {
|
||||||
|
if (keyp != NULL) {
|
||||||
|
*keyp = pub;
|
||||||
|
pub = NULL;
|
||||||
|
}
|
||||||
|
r = 0;
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
free(file);
|
||||||
sshkey_free(pub);
|
sshkey_free(pub);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
bitmap.c
6
bitmap.c
@ -87,10 +87,10 @@ reserve(struct bitmap *b, u_int n)
|
|||||||
return -1; /* invalid */
|
return -1; /* invalid */
|
||||||
nlen = (n / BITMAP_BITS) + 1;
|
nlen = (n / BITMAP_BITS) + 1;
|
||||||
if (b->len < nlen) {
|
if (b->len < nlen) {
|
||||||
if ((tmp = reallocarray(b->d, nlen, BITMAP_BYTES)) == NULL)
|
if ((tmp = recallocarray(b->d, b->len,
|
||||||
|
nlen, BITMAP_BYTES)) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
b->d = tmp;
|
b->d = tmp;
|
||||||
memset(b->d + b->len, 0, (nlen - b->len) * BITMAP_BYTES);
|
|
||||||
b->len = nlen;
|
b->len = nlen;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -189,7 +189,7 @@ bitmap_from_string(struct bitmap *b, const void *p, size_t l)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
size_t i, offset, shift;
|
size_t i, offset, shift;
|
||||||
u_char *s = (u_char *)p;
|
const u_char *s = (const u_char *)p;
|
||||||
|
|
||||||
if (l > BITMAP_MAX / 8)
|
if (l > BITMAP_MAX / 8)
|
||||||
return -1;
|
return -1;
|
||||||
|
86
channels.c
86
channels.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: channels.c,v 1.359 2017/04/30 23:28:41 djm Exp $ */
|
/* $OpenBSD: channels.c,v 1.365 2017/05/31 08:58:52 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -242,8 +242,6 @@ channel_lookup(int id)
|
|||||||
case SSH_CHANNEL_DYNAMIC:
|
case SSH_CHANNEL_DYNAMIC:
|
||||||
case SSH_CHANNEL_OPENING:
|
case SSH_CHANNEL_OPENING:
|
||||||
case SSH_CHANNEL_OPEN:
|
case SSH_CHANNEL_OPEN:
|
||||||
case SSH_CHANNEL_INPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_OUTPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_ABANDONED:
|
case SSH_CHANNEL_ABANDONED:
|
||||||
case SSH_CHANNEL_MUX_PROXY:
|
case SSH_CHANNEL_MUX_PROXY:
|
||||||
return (c);
|
return (c);
|
||||||
@ -481,8 +479,6 @@ channel_free(Channel *c)
|
|||||||
debug3("channel %d: status: %s", c->self, s);
|
debug3("channel %d: status: %s", c->self, s);
|
||||||
free(s);
|
free(s);
|
||||||
|
|
||||||
if (c->sock != -1)
|
|
||||||
shutdown(c->sock, SHUT_RDWR);
|
|
||||||
channel_close_fds(c);
|
channel_close_fds(c);
|
||||||
buffer_free(&c->input);
|
buffer_free(&c->input);
|
||||||
buffer_free(&c->output);
|
buffer_free(&c->output);
|
||||||
@ -614,9 +610,6 @@ channel_still_open(void)
|
|||||||
case SSH_CHANNEL_MUX_CLIENT:
|
case SSH_CHANNEL_MUX_CLIENT:
|
||||||
case SSH_CHANNEL_MUX_PROXY:
|
case SSH_CHANNEL_MUX_PROXY:
|
||||||
return 1;
|
return 1;
|
||||||
case SSH_CHANNEL_INPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_OUTPUT_DRAINING:
|
|
||||||
fatal("cannot happen: OUT_DRAIN");
|
|
||||||
default:
|
default:
|
||||||
fatal("%s: bad channel type %d", __func__, c->type);
|
fatal("%s: bad channel type %d", __func__, c->type);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
@ -657,9 +650,6 @@ channel_find_open(void)
|
|||||||
case SSH_CHANNEL_OPEN:
|
case SSH_CHANNEL_OPEN:
|
||||||
case SSH_CHANNEL_X11_OPEN:
|
case SSH_CHANNEL_X11_OPEN:
|
||||||
return i;
|
return i;
|
||||||
case SSH_CHANNEL_INPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_OUTPUT_DRAINING:
|
|
||||||
fatal("cannot happen: OUT_DRAIN");
|
|
||||||
default:
|
default:
|
||||||
fatal("%s: bad channel type %d", __func__, c->type);
|
fatal("%s: bad channel type %d", __func__, c->type);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
@ -706,8 +696,6 @@ channel_open_message(void)
|
|||||||
case SSH_CHANNEL_DYNAMIC:
|
case SSH_CHANNEL_DYNAMIC:
|
||||||
case SSH_CHANNEL_OPEN:
|
case SSH_CHANNEL_OPEN:
|
||||||
case SSH_CHANNEL_X11_OPEN:
|
case SSH_CHANNEL_X11_OPEN:
|
||||||
case SSH_CHANNEL_INPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_OUTPUT_DRAINING:
|
|
||||||
case SSH_CHANNEL_MUX_PROXY:
|
case SSH_CHANNEL_MUX_PROXY:
|
||||||
case SSH_CHANNEL_MUX_CLIENT:
|
case SSH_CHANNEL_MUX_CLIENT:
|
||||||
snprintf(buf, sizeof buf,
|
snprintf(buf, sizeof buf,
|
||||||
@ -1085,9 +1073,11 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
|
|||||||
buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
|
buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
|
||||||
have = buffer_len(&c->input);
|
have = buffer_len(&c->input);
|
||||||
p = (char *)buffer_ptr(&c->input);
|
p = (char *)buffer_ptr(&c->input);
|
||||||
if (memchr(p, '\0', have) == NULL)
|
if (memchr(p, '\0', have) == NULL) {
|
||||||
fatal("channel %d: decode socks4: user not nul terminated",
|
error("channel %d: decode socks4: user not nul terminated",
|
||||||
c->self);
|
c->self);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
len = strlen(p);
|
len = strlen(p);
|
||||||
debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
|
debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
|
||||||
len++; /* trailing '\0' */
|
len++; /* trailing '\0' */
|
||||||
@ -1105,13 +1095,15 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
|
|||||||
} else { /* SOCKS4A: two strings */
|
} else { /* SOCKS4A: two strings */
|
||||||
have = buffer_len(&c->input);
|
have = buffer_len(&c->input);
|
||||||
p = (char *)buffer_ptr(&c->input);
|
p = (char *)buffer_ptr(&c->input);
|
||||||
|
if (memchr(p, '\0', have) == NULL) {
|
||||||
|
error("channel %d: decode socks4a: host not nul "
|
||||||
|
"terminated", c->self);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
len = strlen(p);
|
len = strlen(p);
|
||||||
debug2("channel %d: decode socks4a: host %s/%d",
|
debug2("channel %d: decode socks4a: host %s/%d",
|
||||||
c->self, p, len);
|
c->self, p, len);
|
||||||
len++; /* trailing '\0' */
|
len++; /* trailing '\0' */
|
||||||
if (len > have)
|
|
||||||
fatal("channel %d: decode socks4a: len %d > have %d",
|
|
||||||
c->self, len, have);
|
|
||||||
if (len > NI_MAXHOST) {
|
if (len > NI_MAXHOST) {
|
||||||
error("channel %d: hostname \"%.100s\" too long",
|
error("channel %d: hostname \"%.100s\" too long",
|
||||||
c->self, p);
|
c->self, p);
|
||||||
@ -2406,9 +2398,8 @@ channel_proxy_downstream(Channel *downstream)
|
|||||||
* replaces local (proxy) channel ID with downstream channel ID.
|
* replaces local (proxy) channel ID with downstream channel ID.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
channel_proxy_upstream(Channel *c, int type, u_int32_t seq, void *ctxt)
|
channel_proxy_upstream(Channel *c, int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state;
|
|
||||||
struct sshbuf *b = NULL;
|
struct sshbuf *b = NULL;
|
||||||
Channel *downstream;
|
Channel *downstream;
|
||||||
const u_char *cp = NULL;
|
const u_char *cp = NULL;
|
||||||
@ -2488,7 +2479,7 @@ channel_proxy_upstream(Channel *c, int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_data(int type, u_int32_t seq, void *ctxt)
|
channel_input_data(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
const u_char *data;
|
const u_char *data;
|
||||||
@ -2500,7 +2491,7 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
|
|||||||
c = channel_lookup(id);
|
c = channel_lookup(id);
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
packet_disconnect("Received data for nonexistent channel %d.", id);
|
packet_disconnect("Received data for nonexistent channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Ignore any data for non-open channels (might happen on close) */
|
/* Ignore any data for non-open channels (might happen on close) */
|
||||||
@ -2548,7 +2539,7 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
|
channel_input_extended_data(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
char *data;
|
char *data;
|
||||||
@ -2561,7 +2552,7 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
packet_disconnect("Received extended_data for bad channel %d.", id);
|
packet_disconnect("Received extended_data for bad channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
if (c->type != SSH_CHANNEL_OPEN) {
|
if (c->type != SSH_CHANNEL_OPEN) {
|
||||||
logit("channel %d: ext data for non open", id);
|
logit("channel %d: ext data for non open", id);
|
||||||
@ -2598,7 +2589,7 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_ieof(int type, u_int32_t seq, void *ctxt)
|
channel_input_ieof(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
Channel *c;
|
Channel *c;
|
||||||
@ -2608,7 +2599,7 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
|
|||||||
c = channel_lookup(id);
|
c = channel_lookup(id);
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
packet_disconnect("Received ieof for nonexistent channel %d.", id);
|
packet_disconnect("Received ieof for nonexistent channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
chan_rcvd_ieof(c);
|
chan_rcvd_ieof(c);
|
||||||
|
|
||||||
@ -2622,17 +2613,16 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_oclose(int type, u_int32_t seq, void *ctxt)
|
channel_input_oclose(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int id = packet_get_int();
|
int id = packet_get_int();
|
||||||
Channel *c = channel_lookup(id);
|
Channel *c = channel_lookup(id);
|
||||||
|
|
||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
packet_disconnect("Received oclose for nonexistent channel %d.", id);
|
packet_disconnect("Received oclose for nonexistent channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
packet_check_eom();
|
packet_check_eom();
|
||||||
chan_rcvd_oclose(c);
|
chan_rcvd_oclose(c);
|
||||||
@ -2641,27 +2631,7 @@ channel_input_oclose(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt)
|
channel_input_open_confirmation(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
|
||||||
int id = packet_get_int();
|
|
||||||
Channel *c = channel_lookup(id);
|
|
||||||
|
|
||||||
if (c == NULL)
|
|
||||||
packet_disconnect("Received close confirmation for "
|
|
||||||
"out-of-range channel %d.", id);
|
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
|
||||||
return 0;
|
|
||||||
packet_check_eom();
|
|
||||||
if (c->type != SSH_CHANNEL_CLOSED && c->type != SSH_CHANNEL_ABANDONED)
|
|
||||||
packet_disconnect("Received close confirmation for "
|
|
||||||
"non-closed channel %d (type %d).", id, c->type);
|
|
||||||
channel_free(c);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
int
|
|
||||||
channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
|
|
||||||
{
|
{
|
||||||
int id, remote_id;
|
int id, remote_id;
|
||||||
Channel *c;
|
Channel *c;
|
||||||
@ -2672,7 +2642,7 @@ channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
|
|||||||
if (c==NULL)
|
if (c==NULL)
|
||||||
packet_disconnect("Received open confirmation for "
|
packet_disconnect("Received open confirmation for "
|
||||||
"unknown channel %d.", id);
|
"unknown channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
if (c->type != SSH_CHANNEL_OPENING)
|
if (c->type != SSH_CHANNEL_OPENING)
|
||||||
packet_disconnect("Received open confirmation for "
|
packet_disconnect("Received open confirmation for "
|
||||||
@ -2713,7 +2683,7 @@ reason2txt(int reason)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
|
channel_input_open_failure(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
int id, reason;
|
int id, reason;
|
||||||
char *msg = NULL, *lang = NULL;
|
char *msg = NULL, *lang = NULL;
|
||||||
@ -2725,7 +2695,7 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
|
|||||||
if (c==NULL)
|
if (c==NULL)
|
||||||
packet_disconnect("Received open failure for "
|
packet_disconnect("Received open failure for "
|
||||||
"unknown channel %d.", id);
|
"unknown channel %d.", id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
if (c->type != SSH_CHANNEL_OPENING)
|
if (c->type != SSH_CHANNEL_OPENING)
|
||||||
packet_disconnect("Received open failure for "
|
packet_disconnect("Received open failure for "
|
||||||
@ -2752,7 +2722,7 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
|
channel_input_window_adjust(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Channel *c;
|
Channel *c;
|
||||||
int id;
|
int id;
|
||||||
@ -2766,7 +2736,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
|
|||||||
logit("Received window adjust for non-open channel %d.", id);
|
logit("Received window adjust for non-open channel %d.", id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
adjust = packet_get_int();
|
adjust = packet_get_int();
|
||||||
packet_check_eom();
|
packet_check_eom();
|
||||||
@ -2780,7 +2750,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
channel_input_status_confirm(int type, u_int32_t seq, void *ctxt)
|
channel_input_status_confirm(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Channel *c;
|
Channel *c;
|
||||||
struct channel_confirm *cc;
|
struct channel_confirm *cc;
|
||||||
@ -2796,7 +2766,7 @@ channel_input_status_confirm(int type, u_int32_t seq, void *ctxt)
|
|||||||
logit("channel_input_status_confirm: %d: unknown", id);
|
logit("channel_input_status_confirm: %d: unknown", id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
packet_check_eom();
|
packet_check_eom();
|
||||||
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
|
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
|
||||||
@ -3224,7 +3194,7 @@ channel_cancel_lport_listener(struct Forward *fwd, int cport, struct ForwardOpti
|
|||||||
return channel_cancel_lport_listener_tcpip(fwd->listen_host, fwd->listen_port, cport, fwd_opts);
|
return channel_cancel_lport_listener_tcpip(fwd->listen_host, fwd->listen_port, cport, fwd_opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* protocol local port fwd, used by ssh (and sshd in v1) */
|
/* protocol local port fwd, used by ssh */
|
||||||
int
|
int
|
||||||
channel_setup_local_fwd_listener(struct Forward *fwd, struct ForwardOptions *fwd_opts)
|
channel_setup_local_fwd_listener(struct Forward *fwd, struct ForwardOptions *fwd_opts)
|
||||||
{
|
{
|
||||||
|
25
channels.h
25
channels.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: channels.h,v 1.123 2017/04/30 23:28:41 djm Exp $ */
|
/* $OpenBSD: channels.h,v 1.126 2017/05/30 14:23:52 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
@ -46,8 +46,6 @@
|
|||||||
#define SSH_CHANNEL_CLOSED 5 /* waiting for close confirmation */
|
#define SSH_CHANNEL_CLOSED 5 /* waiting for close confirmation */
|
||||||
#define SSH_CHANNEL_AUTH_SOCKET 6 /* authentication socket */
|
#define SSH_CHANNEL_AUTH_SOCKET 6 /* authentication socket */
|
||||||
#define SSH_CHANNEL_X11_OPEN 7 /* reading first X11 packet */
|
#define SSH_CHANNEL_X11_OPEN 7 /* reading first X11 packet */
|
||||||
#define SSH_CHANNEL_INPUT_DRAINING 8 /* sending remaining data to conn */
|
|
||||||
#define SSH_CHANNEL_OUTPUT_DRAINING 9 /* sending remaining data to app */
|
|
||||||
#define SSH_CHANNEL_LARVAL 10 /* larval session */
|
#define SSH_CHANNEL_LARVAL 10 /* larval session */
|
||||||
#define SSH_CHANNEL_RPORT_LISTENER 11 /* Listening to a R-style port */
|
#define SSH_CHANNEL_RPORT_LISTENER 11 /* Listening to a R-style port */
|
||||||
#define SSH_CHANNEL_CONNECTING 12
|
#define SSH_CHANNEL_CONNECTING 12
|
||||||
@ -63,6 +61,7 @@
|
|||||||
|
|
||||||
#define CHANNEL_CANCEL_PORT_STATIC -1
|
#define CHANNEL_CANCEL_PORT_STATIC -1
|
||||||
|
|
||||||
|
struct ssh;
|
||||||
struct Channel;
|
struct Channel;
|
||||||
typedef struct Channel Channel;
|
typedef struct Channel Channel;
|
||||||
|
|
||||||
@ -234,19 +233,19 @@ void channel_send_window_changes(void);
|
|||||||
/* mux proxy support */
|
/* mux proxy support */
|
||||||
|
|
||||||
int channel_proxy_downstream(Channel *mc);
|
int channel_proxy_downstream(Channel *mc);
|
||||||
int channel_proxy_upstream(Channel *, int, u_int32_t, void *);
|
int channel_proxy_upstream(Channel *, int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
/* protocol handler */
|
/* protocol handler */
|
||||||
|
|
||||||
int channel_input_close_confirmation(int, u_int32_t, void *);
|
int channel_input_data(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_data(int, u_int32_t, void *);
|
int channel_input_extended_data(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_extended_data(int, u_int32_t, void *);
|
int channel_input_ieof(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_ieof(int, u_int32_t, void *);
|
int channel_input_oclose(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_oclose(int, u_int32_t, void *);
|
int channel_input_open_confirmation(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_open_confirmation(int, u_int32_t, void *);
|
int channel_input_open_failure(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_open_failure(int, u_int32_t, void *);
|
int channel_input_port_open(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_window_adjust(int, u_int32_t, void *);
|
int channel_input_window_adjust(int, u_int32_t, struct ssh *);
|
||||||
int channel_input_status_confirm(int, u_int32_t, void *);
|
int channel_input_status_confirm(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
/* file descriptor handling (read/write) */
|
/* file descriptor handling (read/write) */
|
||||||
|
|
||||||
|
22
clientloop.c
22
clientloop.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: clientloop.c,v 1.296 2017/05/03 21:08:09 naddy Exp $ */
|
/* $OpenBSD: clientloop.c,v 1.299 2017/05/31 09:15:42 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -459,7 +459,7 @@ client_check_window_change(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
client_global_request_reply(int type, u_int32_t seq, void *ctxt)
|
client_global_request_reply(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct global_confirm *gc;
|
struct global_confirm *gc;
|
||||||
|
|
||||||
@ -1171,7 +1171,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
|
|||||||
static void
|
static void
|
||||||
client_process_buffered_input_packets(void)
|
client_process_buffered_input_packets(void)
|
||||||
{
|
{
|
||||||
dispatch_run(DISPATCH_NONBLOCK, &quit_pending, active_state);
|
ssh_dispatch_run_fatal(active_state, DISPATCH_NONBLOCK, &quit_pending);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* scan buf[] for '~' before sending data to the peer */
|
/* scan buf[] for '~' before sending data to the peer */
|
||||||
@ -1646,7 +1646,7 @@ client_request_tun_fwd(int tun_mode, int local_tun, int remote_tun)
|
|||||||
|
|
||||||
/* XXXX move to generic input handler */
|
/* XXXX move to generic input handler */
|
||||||
static int
|
static int
|
||||||
client_input_channel_open(int type, u_int32_t seq, void *ctxt)
|
client_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Channel *c = NULL;
|
Channel *c = NULL;
|
||||||
char *ctype;
|
char *ctype;
|
||||||
@ -1702,7 +1702,7 @@ client_input_channel_open(int type, u_int32_t seq, void *ctxt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
client_input_channel_req(int type, u_int32_t seq, void *ctxt)
|
client_input_channel_req(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
Channel *c = NULL;
|
Channel *c = NULL;
|
||||||
int exitval, id, reply, success = 0;
|
int exitval, id, reply, success = 0;
|
||||||
@ -1710,7 +1710,7 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
|
|||||||
|
|
||||||
id = packet_get_int();
|
id = packet_get_int();
|
||||||
c = channel_lookup(id);
|
c = channel_lookup(id);
|
||||||
if (channel_proxy_upstream(c, type, seq, ctxt))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
rtype = packet_get_string(NULL);
|
rtype = packet_get_string(NULL);
|
||||||
reply = packet_get_char();
|
reply = packet_get_char();
|
||||||
@ -1816,9 +1816,9 @@ hostkeys_find(struct hostkey_foreach_line *l, void *_ctx)
|
|||||||
/* This line contained a key that not offered by the server */
|
/* This line contained a key that not offered by the server */
|
||||||
debug3("%s: deprecated %s key at %s:%ld", __func__,
|
debug3("%s: deprecated %s key at %s:%ld", __func__,
|
||||||
sshkey_ssh_name(l->key), l->path, l->linenum);
|
sshkey_ssh_name(l->key), l->path, l->linenum);
|
||||||
if ((tmp = reallocarray(ctx->old_keys, ctx->nold + 1,
|
if ((tmp = recallocarray(ctx->old_keys, ctx->nold, ctx->nold + 1,
|
||||||
sizeof(*ctx->old_keys))) == NULL)
|
sizeof(*ctx->old_keys))) == NULL)
|
||||||
fatal("%s: reallocarray failed nold = %zu",
|
fatal("%s: recallocarray failed nold = %zu",
|
||||||
__func__, ctx->nold);
|
__func__, ctx->nold);
|
||||||
ctx->old_keys = tmp;
|
ctx->old_keys = tmp;
|
||||||
ctx->old_keys[ctx->nold++] = l->key;
|
ctx->old_keys[ctx->nold++] = l->key;
|
||||||
@ -2050,9 +2050,9 @@ client_input_hostkeys(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Key is good, record it */
|
/* Key is good, record it */
|
||||||
if ((tmp = reallocarray(ctx->keys, ctx->nkeys + 1,
|
if ((tmp = recallocarray(ctx->keys, ctx->nkeys, ctx->nkeys + 1,
|
||||||
sizeof(*ctx->keys))) == NULL)
|
sizeof(*ctx->keys))) == NULL)
|
||||||
fatal("%s: reallocarray failed nkeys = %zu",
|
fatal("%s: recallocarray failed nkeys = %zu",
|
||||||
__func__, ctx->nkeys);
|
__func__, ctx->nkeys);
|
||||||
ctx->keys = tmp;
|
ctx->keys = tmp;
|
||||||
ctx->keys[ctx->nkeys++] = key;
|
ctx->keys[ctx->nkeys++] = key;
|
||||||
@ -2140,7 +2140,7 @@ client_input_hostkeys(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
client_input_global_request(int type, u_int32_t seq, void *ctxt)
|
client_input_global_request(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
char *rtype;
|
char *rtype;
|
||||||
int want_reply;
|
int want_reply;
|
||||||
|
@ -1678,6 +1678,7 @@ AC_CHECK_FUNCS([ \
|
|||||||
getgrouplist \
|
getgrouplist \
|
||||||
getnameinfo \
|
getnameinfo \
|
||||||
getopt \
|
getopt \
|
||||||
|
getpagesize \
|
||||||
getpeereid \
|
getpeereid \
|
||||||
getpeerucred \
|
getpeerucred \
|
||||||
getpgid \
|
getpgid \
|
||||||
@ -1708,6 +1709,7 @@ AC_CHECK_FUNCS([ \
|
|||||||
readpassphrase \
|
readpassphrase \
|
||||||
reallocarray \
|
reallocarray \
|
||||||
recvmsg \
|
recvmsg \
|
||||||
|
recallocarray \
|
||||||
rresvport_af \
|
rresvport_af \
|
||||||
sendmsg \
|
sendmsg \
|
||||||
setdtablesize \
|
setdtablesize \
|
||||||
@ -3162,7 +3164,8 @@ AC_RUN_IFELSE(
|
|||||||
select_works_with_rlimit=yes],
|
select_works_with_rlimit=yes],
|
||||||
[AC_MSG_RESULT([no])
|
[AC_MSG_RESULT([no])
|
||||||
select_works_with_rlimit=no],
|
select_works_with_rlimit=no],
|
||||||
[AC_MSG_WARN([cross compiling: assuming yes])]
|
[AC_MSG_WARN([cross compiling: assuming yes])
|
||||||
|
select_works_with_rlimit=yes]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([if setrlimit(RLIMIT_NOFILE,{0,0}) works])
|
AC_MSG_CHECKING([if setrlimit(RLIMIT_NOFILE,{0,0}) works])
|
||||||
@ -3188,7 +3191,8 @@ AC_RUN_IFELSE(
|
|||||||
rlimit_nofile_zero_works=yes],
|
rlimit_nofile_zero_works=yes],
|
||||||
[AC_MSG_RESULT([no])
|
[AC_MSG_RESULT([no])
|
||||||
rlimit_nofile_zero_works=no],
|
rlimit_nofile_zero_works=no],
|
||||||
[AC_MSG_WARN([cross compiling: assuming yes])]
|
[AC_MSG_WARN([cross compiling: assuming yes])
|
||||||
|
rlimit_nofile_zero_works=yes]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([if setrlimit RLIMIT_FSIZE works])
|
AC_MSG_CHECKING([if setrlimit RLIMIT_FSIZE works])
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
param ([switch]$Quiet)
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
Import-Module $PSScriptRoot\OpenSSHUtils.psm1 -Force -DisableNameChecking
|
param ()
|
||||||
|
Set-StrictMode -Version 2.0
|
||||||
|
If (!(Test-Path variable:PSScriptRoot)) {$PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition}
|
||||||
|
Import-Module $PSScriptRoot\OpenSSHUtils -Force
|
||||||
|
|
||||||
#check sshd config file
|
#check sshd config file
|
||||||
$sshdConfigPath = join-path $PSScriptRoot "sshd_config"
|
$sshdConfigPath = join-path $PSScriptRoot "sshd_config"
|
||||||
if(Test-Path $sshdConfigPath -PathType Leaf)
|
if(Test-Path $sshdConfigPath -PathType Leaf)
|
||||||
{
|
{
|
||||||
Fix-HostSSHDConfigPermissions -FilePath $sshdConfigPath @psBoundParameters
|
Repair-SshdConfigPermission -FilePath $sshdConfigPath @psBoundParameters
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -13,16 +16,16 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
#check host keys
|
#check host keys
|
||||||
<#$result = 'n'
|
<#
|
||||||
if (-not $Quiet) {
|
$warning = @"
|
||||||
Do
|
To keep the host private keys secure, it is recommended to register them with ssh-agent following
|
||||||
{
|
steps in link https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH.
|
||||||
$input = Read-Host -Prompt "Did you register host private keys with ssh-agent? [Yes] Y; [No] N"
|
If you choose not to register the keys with ssh-agent, please grant sshd read access to the private host keys after run this script.
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
"@
|
||||||
$result = $Matches[0]
|
$prompt = "Did you register host private keys with ssh-agent?"
|
||||||
}
|
$description = "Grant sshd read access to the private host keys"
|
||||||
|
|
||||||
if($result.ToLower().Startswith('n'))
|
if($pscmdlet.ShouldProcess($description, $prompt, $warning))
|
||||||
{
|
{
|
||||||
$warning = @"
|
$warning = @"
|
||||||
To keep the host private keys secure, it is recommended to register them with ssh-agent following
|
To keep the host private keys secure, it is recommended to register them with ssh-agent following
|
||||||
@ -33,18 +36,23 @@ If you choose not to register the keys with ssh-agent, please grant sshd read ac
|
|||||||
Write-Host " "
|
Write-Host " "
|
||||||
}#>
|
}#>
|
||||||
|
|
||||||
Get-ChildItem $PSScriptRoot\ssh_host_*_key -ErrorAction Ignore | % {
|
Get-ChildItem $PSScriptRoot\ssh_host_*_key -ErrorAction SilentlyContinue | % {
|
||||||
Fix-HostKeyPermissions -FilePath $_.FullName @psBoundParameters
|
Repair-SshdHostKeyPermission -FilePath $_.FullName @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#check authorized_keys
|
#check authorized_keys
|
||||||
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" -ErrorAction Ignore | % {
|
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" -ErrorAction SilentlyContinue | % {
|
||||||
$userProfilePath = Get-ItemPropertyValue $_.pspath -Name ProfileImagePath -ErrorAction Ignore
|
$properties = Get-ItemProperty $_.pspath -ErrorAction SilentlyContinue
|
||||||
|
$userProfilePath = ""
|
||||||
|
if($properties)
|
||||||
|
{
|
||||||
|
$userProfilePath = $properties.ProfileImagePath
|
||||||
|
}
|
||||||
$filePath = Join-Path $userProfilePath .ssh\authorized_keys
|
$filePath = Join-Path $userProfilePath .ssh\authorized_keys
|
||||||
if(Test-Path $filePath -PathType Leaf)
|
if(Test-Path $filePath -PathType Leaf)
|
||||||
{
|
{
|
||||||
Fix-AuthorizedKeyPermissions -FilePath $filePath @psBoundParameters
|
Repair-AuthorizedKeyPermission -FilePath $filePath @psBoundParameters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
param ([switch]$Quiet)
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
Import-Module $PSScriptRoot\OpenSSHUtils.psm1 -Force -DisableNameChecking
|
param ()
|
||||||
|
Set-StrictMode -Version 2.0
|
||||||
|
If (!(Test-Path variable:PSScriptRoot)) {$PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition}
|
||||||
|
|
||||||
|
Import-Module $PSScriptRoot\OpenSSHUtils -Force
|
||||||
|
|
||||||
if(Test-Path ~\.ssh\config -PathType Leaf)
|
if(Test-Path ~\.ssh\config -PathType Leaf)
|
||||||
{
|
{
|
||||||
Fix-UserSSHConfigPermissions -FilePath ~\.ssh\config @psBoundParameters
|
Repair-UserSshConfigPermission -FilePath ~\.ssh\config @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
Get-ChildItem ~\.ssh\* -Include "id_rsa","id_dsa" -ErrorAction Ignore | % {
|
Get-ChildItem ~\.ssh\* -Include "id_rsa","id_dsa" -ErrorAction SilentlyContinue | % {
|
||||||
Fix-UserKeyPermissions -FilePath $_.FullName @psBoundParameters
|
Repair-UserKeyPermission -FilePath $_.FullName @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host " Done."
|
Write-Host " Done."
|
||||||
|
@ -7,7 +7,8 @@ Import-Module $PSScriptRoot\OpenSSHCommonUtils.psm1 -force -DisableNameChecking
|
|||||||
[System.IO.DirectoryInfo] $script:gitRoot = $null
|
[System.IO.DirectoryInfo] $script:gitRoot = $null
|
||||||
[bool] $script:Verbose = $false
|
[bool] $script:Verbose = $false
|
||||||
[string] $script:BuildLogFile = $null
|
[string] $script:BuildLogFile = $null
|
||||||
|
[string] $script:libreSSLSDKStr = "LibreSSLSDK"
|
||||||
|
[string] $script:win32OpenSSHPath = $null
|
||||||
<#
|
<#
|
||||||
Called by Write-BuildMsg to write to the build log, if it exists.
|
Called by Write-BuildMsg to write to the build log, if it exists.
|
||||||
#>
|
#>
|
||||||
@ -248,31 +249,36 @@ function Clone-Win32OpenSSH
|
|||||||
{
|
{
|
||||||
[bool] $silent = -not $script:Verbose
|
[bool] $silent = -not $script:Verbose
|
||||||
|
|
||||||
$win32OpenSSHPath = join-path $script:gitRoot "Win32-OpenSSH"
|
if (-not (Test-Path -Path $script:win32OpenSSHPath -PathType Container))
|
||||||
if (-not (Test-Path -Path $win32OpenSSHPath -PathType Container))
|
|
||||||
{
|
{
|
||||||
Write-BuildMsg -AsInfo -Message "clone repo Win32-OpenSSH" -Silent:$silent
|
Write-BuildMsg -AsInfo -Message "clone repo Win32-OpenSSH" -Silent:$silent
|
||||||
Push-Location $gitRoot
|
Push-Location $gitRoot
|
||||||
git clone -q --recursive https://github.com/PowerShell/Win32-OpenSSH.git $win32OpenSSHPath
|
git clone -q --recursive https://github.com/PowerShell/Win32-OpenSSH.git $script:win32OpenSSHPath
|
||||||
Pop-Location
|
Pop-Location
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-BuildMsg -AsInfo -Message "pull latest from repo Win32-OpenSSH" -Silent:$silent
|
Write-BuildMsg -AsInfo -Message "pull latest from repo Win32-OpenSSH" -Silent:$silent
|
||||||
Push-Location $win32OpenSSHPath
|
Push-Location $script:win32OpenSSHPath
|
||||||
git fetch -q origin
|
git fetch -q origin
|
||||||
git checkout -qf L1-Prod
|
git checkout -qf L1-Prod
|
||||||
Pop-Location
|
Pop-Location
|
||||||
}
|
}
|
||||||
|
|
||||||
function Copy-OpenSSLSDK
|
function Delete-Win32OpenSSH
|
||||||
|
{
|
||||||
|
Remove-Item -Path $script:win32OpenSSHPath -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
function Copy-LibreSSLSDK
|
||||||
{
|
{
|
||||||
[bool] $silent = -not $script:Verbose
|
[bool] $silent = -not $script:Verbose
|
||||||
|
|
||||||
$sourcePath = Join-Path $script:gitRoot "Win32-OpenSSH\contrib\win32\openssh\OpenSSLSDK"
|
$sourcePath = Join-Path $script:win32OpenSSHPath "contrib\win32\openssh\LibreSSLSDK"
|
||||||
Write-BuildMsg -AsInfo -Message "copying $sourcePath" -Silent:$silent
|
Write-BuildMsg -AsInfo -Message "copying $sourcePath" -Silent:$silent
|
||||||
Copy-Item -Container -Path $sourcePath -Destination $PSScriptRoot -Recurse -Force -ErrorAction SilentlyContinue -ErrorVariable e
|
Copy-Item -Container -Path $sourcePath -Destination $PSScriptRoot -Recurse -Force -ErrorAction SilentlyContinue -ErrorVariable e
|
||||||
if($e -ne $null)
|
if($e -ne $null)
|
||||||
{
|
{
|
||||||
Write-BuildMsg -AsError -ErrorAction Stop -Message "Copy OpenSSL from $sourcePath failed "
|
Write-BuildMsg -AsError -ErrorAction Stop -Message "Copy LibreSSLSDK from $sourcePath to $PSScriptRoot failed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,13 +304,15 @@ function Package-OpenSSH
|
|||||||
{
|
{
|
||||||
$folderName = "Win32"
|
$folderName = "Win32"
|
||||||
}
|
}
|
||||||
|
|
||||||
$buildDir = Join-Path $repositoryRoot ("bin\" + $folderName + "\" + $Configuration)
|
$buildDir = Join-Path $repositoryRoot ("bin\" + $folderName + "\" + $Configuration)
|
||||||
$payload = "sshd.exe", "ssh.exe", "ssh-agent.exe", "ssh-add.exe", "sftp.exe"
|
$payload = "sshd.exe", "ssh.exe", "ssh-agent.exe", "ssh-add.exe", "sftp.exe"
|
||||||
$payload += "sftp-server.exe", "scp.exe", "ssh-shellhost.exe", "ssh-keygen.exe", "ssh-keyscan.exe"
|
$payload += "sftp-server.exe", "scp.exe", "ssh-shellhost.exe", "ssh-keygen.exe", "ssh-keyscan.exe"
|
||||||
$payload += "sshd_config", "install-sshd.ps1", "uninstall-sshd.ps1", "FixHostFilePermissions.ps1", "FixUserFilePermissions.ps1", "OpenSSHUtils.psm1"
|
$payload += "sshd_config", "install-sshd.ps1", "uninstall-sshd.ps1"
|
||||||
|
$payload +="FixHostFilePermissions.ps1", "FixUserFilePermissions.ps1", "OpenSSHUtils.psm1", "OpenSSHUtils.psd1", "ssh-add-hostkey.ps1"
|
||||||
|
|
||||||
$packageName = "OpenSSH-Win64"
|
$packageName = "OpenSSH-Win64"
|
||||||
if ($NativeHostArch -eq 'x86') {
|
if ($NativeHostArch -ieq 'x86') {
|
||||||
$packageName = "OpenSSH-Win32"
|
$packageName = "OpenSSH-Win32"
|
||||||
}
|
}
|
||||||
while((($service = Get-Service ssh-agent -ErrorAction Ignore) -ne $null) -and ($service.Status -ine 'Stopped'))
|
while((($service = Get-Service ssh-agent -ErrorAction Ignore) -ne $null) -and ($service.Status -ine 'Stopped'))
|
||||||
@ -337,6 +345,10 @@ function Package-OpenSSH
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#copy libcrypto-41 dll
|
||||||
|
$libreSSLSDKPath = Join-Path $PSScriptRoot $script:libreSSLSDKStr
|
||||||
|
Copy-Item -Path $(Join-Path $libreSSLSDKPath "$NativeHostArch\libcrypto-41.dll") -Destination $packageDir -Force -ErrorAction Stop
|
||||||
|
|
||||||
if ($DestinationPath -ne "") {
|
if ($DestinationPath -ne "") {
|
||||||
if (Test-Path $DestinationPath) {
|
if (Test-Path $DestinationPath) {
|
||||||
Remove-Item $DestinationPath\* -Force -Recurse -ErrorAction SilentlyContinue
|
Remove-Item $DestinationPath\* -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
@ -345,20 +357,24 @@ function Package-OpenSSH
|
|||||||
New-Item -ItemType Directory $DestinationPath -Force | Out-Null
|
New-Item -ItemType Directory $DestinationPath -Force | Out-Null
|
||||||
}
|
}
|
||||||
Copy-Item -Path $packageDir\* -Destination $DestinationPath -Force -Recurse
|
Copy-Item -Path $packageDir\* -Destination $DestinationPath -Force -Recurse
|
||||||
|
Write-BuildMsg -AsInfo -Message "Copied payload to $DestinationPath"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Remove-Item ($packageDir + '.zip') -Force -ErrorAction SilentlyContinue
|
Remove-Item ($packageDir + '.zip') -Force -ErrorAction SilentlyContinue
|
||||||
Compress-Archive -Path $packageDir -DestinationPath ($packageDir + '.zip')
|
Compress-Archive -Path $packageDir -DestinationPath ($packageDir + '.zip')
|
||||||
|
Write-BuildMsg -AsInfo -Message "Packaged Payload - '$packageDir'.zip"
|
||||||
}
|
}
|
||||||
Remove-Item $packageDir -Recurse -Force -ErrorAction SilentlyContinue
|
Remove-Item $packageDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
|
||||||
if ($DestinationPath -ne "") {
|
if ($DestinationPath -ne "") {
|
||||||
Copy-Item -Path $symbolsDir\* -Destination $DestinationPath -Force -Recurse
|
Copy-Item -Path $symbolsDir\* -Destination $DestinationPath -Force -Recurse
|
||||||
|
Write-BuildMsg -AsInfo -Message "Copied symbols to $DestinationPath"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Remove-Item ($symbolsDir + '.zip') -Force -ErrorAction SilentlyContinue
|
Remove-Item ($symbolsDir + '.zip') -Force -ErrorAction SilentlyContinue
|
||||||
Compress-Archive -Path $symbolsDir -DestinationPath ($symbolsDir + '.zip')
|
Compress-Archive -Path $symbolsDir -DestinationPath ($symbolsDir + '.zip')
|
||||||
|
Write-BuildMsg -AsInfo -Message "Packaged Symbols - '$symbolsDir'.zip"
|
||||||
}
|
}
|
||||||
Remove-Item $symbolsDir -Recurse -Force -ErrorAction SilentlyContinue
|
Remove-Item $symbolsDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
@ -401,10 +417,12 @@ function Build-OpenSSH
|
|||||||
|
|
||||||
Start-OpenSSHBootstrap
|
Start-OpenSSHBootstrap
|
||||||
|
|
||||||
if (-not (Test-Path (Join-Path $PSScriptRoot OpenSSLSDK)))
|
$script:win32OpenSSHPath = join-path $script:gitRoot "Win32-OpenSSH"
|
||||||
|
if (-not (Test-Path (Join-Path $PSScriptRoot LibreSSLSDK)))
|
||||||
{
|
{
|
||||||
Clone-Win32OpenSSH
|
Clone-Win32OpenSSH
|
||||||
Copy-OpenSSLSDK
|
Copy-LibreSSLSDK
|
||||||
|
Delete-Win32OpenSSH
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($NoOpenSSL)
|
if ($NoOpenSSL)
|
||||||
@ -433,7 +451,7 @@ function Build-OpenSSH
|
|||||||
Write-BuildMsg -AsError -ErrorAction Stop -Message "Build failed for OpenSSH.`nExitCode: $error."
|
Write-BuildMsg -AsError -ErrorAction Stop -Message "Build failed for OpenSSH.`nExitCode: $error."
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-BuildMsg -AsInfo -Message "SSH build passed." -Silent:$silent
|
Write-BuildMsg -AsInfo -Message "SSH build successful."
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-BuildLogFile
|
function Get-BuildLogFile
|
||||||
@ -506,7 +524,6 @@ function Install-OpenSSH
|
|||||||
Adjust-HostKeyFileACL -FilePath $_.FullName
|
Adjust-HostKeyFileACL -FilePath $_.FullName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#machine will be reboot after Install-openssh anyway
|
#machine will be reboot after Install-openssh anyway
|
||||||
$machinePath = [Environment]::GetEnvironmentVariable('Path', 'MACHINE')
|
$machinePath = [Environment]::GetEnvironmentVariable('Path', 'MACHINE')
|
||||||
$newMachineEnvironmentPath = $machinePath
|
$newMachineEnvironmentPath = $machinePath
|
||||||
@ -523,7 +540,6 @@ function Install-OpenSSH
|
|||||||
|
|
||||||
Set-Service sshd -StartupType Automatic
|
Set-Service sshd -StartupType Automatic
|
||||||
Set-Service ssh-agent -StartupType Automatic
|
Set-Service ssh-agent -StartupType Automatic
|
||||||
Start-Service sshd
|
|
||||||
|
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Write-Log -Message "OpenSSH installed!"
|
Write-Log -Message "OpenSSH installed!"
|
||||||
@ -535,7 +551,6 @@ function Install-OpenSSH
|
|||||||
#>
|
#>
|
||||||
function UnInstall-OpenSSH
|
function UnInstall-OpenSSH
|
||||||
{
|
{
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
@ -561,15 +576,29 @@ function UnInstall-OpenSSH
|
|||||||
$env:Path = $env:Path.Replace("$OpenSSHDir;", '')
|
$env:Path = $env:Path.Replace("$OpenSSHDir;", '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Test-Path -Path $OpenSSHDir)
|
||||||
|
{
|
||||||
|
Push-Location $OpenSSHDir
|
||||||
|
&( "$OpenSSHDir\uninstall-sshd.ps1")
|
||||||
|
|
||||||
|
$machinePath = [Environment]::GetEnvironmentVariable('Path', 'MACHINE')
|
||||||
|
$newMachineEnvironmentPath = $machinePath
|
||||||
|
if ($machinePath.ToLower().Contains($OpenSSHDir.ToLower()))
|
||||||
|
{
|
||||||
|
$newMachineEnvironmentPath.Replace("$OpenSSHDir;", '')
|
||||||
|
$env:Path = $env:Path.Replace("$OpenSSHDir;", '')
|
||||||
|
}
|
||||||
|
|
||||||
# Update machine environment path
|
# Update machine environment path
|
||||||
# machine will be reboot after Uninstall-OpenSSH
|
# machine will be reboot after Uninstall-OpenSSH
|
||||||
if ($newMachineEnvironmentPath -ne $machinePath)
|
if ($newMachineEnvironmentPath -ne $machinePath)
|
||||||
{
|
{
|
||||||
[Environment]::SetEnvironmentVariable('Path', $newMachineEnvironmentPath, 'MACHINE')
|
[Environment]::SetEnvironmentVariable('Path', $newMachineEnvironmentPath, 'MACHINE')
|
||||||
}
|
}
|
||||||
|
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
||||||
|
Remove-Item -Path $OpenSSHDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Export-ModuleMember -Function Build-OpenSSH, Get-BuildLogFile, Install-OpenSSH, UnInstall-OpenSSH, Package-OpenSSH
|
Export-ModuleMember -Function Build-OpenSSH, Get-BuildLogFile, Install-OpenSSH, UnInstall-OpenSSH, Package-OpenSSH
|
||||||
|
@ -158,6 +158,8 @@ WARNING: Following changes will be made to OpenSSH configuration
|
|||||||
# copy new sshd_config
|
# copy new sshd_config
|
||||||
Copy-Item (Join-Path $Script:E2ETestDirectory sshd_config) (Join-Path $script:OpenSSHBinPath sshd_config) -Force
|
Copy-Item (Join-Path $Script:E2ETestDirectory sshd_config) (Join-Path $script:OpenSSHBinPath sshd_config) -Force
|
||||||
|
|
||||||
|
Start-Service ssh-agent
|
||||||
|
|
||||||
#copy sshtest keys
|
#copy sshtest keys
|
||||||
Copy-Item "$($Script:E2ETestDirectory)\sshtest*hostkey*" $script:OpenSSHBinPath -Force
|
Copy-Item "$($Script:E2ETestDirectory)\sshtest*hostkey*" $script:OpenSSHBinPath -Force
|
||||||
Get-ChildItem "$($script:OpenSSHBinPath)\sshtest*hostkey*"| % {
|
Get-ChildItem "$($script:OpenSSHBinPath)\sshtest*hostkey*"| % {
|
||||||
@ -165,17 +167,11 @@ WARNING: Following changes will be made to OpenSSH configuration
|
|||||||
(Get-Content $_.FullName -Raw).Replace("`r`n","`n") | Set-Content $_.FullName -Force
|
(Get-Content $_.FullName -Raw).Replace("`r`n","`n") | Set-Content $_.FullName -Force
|
||||||
Adjust-HostKeyFileACL -FilePath $_.FullName
|
Adjust-HostKeyFileACL -FilePath $_.FullName
|
||||||
if (-not ($_.Name.EndsWith(".pub"))) {
|
if (-not ($_.Name.EndsWith(".pub"))) {
|
||||||
Add-PermissionToFileACL -FilePath $_.FullName -User "NT Service\sshd" -Perm "Read"
|
#register private key with agent
|
||||||
|
ssh-add-hostkey.ps1 $_.FullName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#register host keys with agent
|
|
||||||
<#Get-ChildItem "$($script:OpenSSHBinPath)\sshtest*hostkey*"| % {
|
|
||||||
if (-not ($_.Name.EndsWith(".pub"))) {
|
|
||||||
& "$env:ProgramData\chocolatey\lib\sysinternals\tools\psexec" -accepteula -nobanner -i -s -w $($script:OpenSSHBinPath) cmd.exe /c "ssh-add $_"
|
|
||||||
Add-PermissionToFileACL -FilePath $_.FullName -User "NT Service\sshd" -Perm "Read"
|
|
||||||
}
|
|
||||||
}#>
|
|
||||||
Restart-Service sshd -Force
|
Restart-Service sshd -Force
|
||||||
|
|
||||||
#Backup existing known_hosts and replace with test version
|
#Backup existing known_hosts and replace with test version
|
||||||
@ -255,7 +251,6 @@ function Get-LocalUserProfile
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
This function installs the tools required by our tests
|
This function installs the tools required by our tests
|
||||||
1) Pester for running the tests
|
1) Pester for running the tests
|
||||||
2) sysinternals required by the tests on windows.
|
|
||||||
#>
|
#>
|
||||||
function Install-OpenSSHTestDependencies
|
function Install-OpenSSHTestDependencies
|
||||||
{
|
{
|
||||||
@ -275,11 +270,6 @@ function Install-OpenSSHTestDependencies
|
|||||||
Write-Log -Message "Installing Pester..."
|
Write-Log -Message "Installing Pester..."
|
||||||
choco install Pester -y --force --limitoutput 2>&1 >> $Script:TestSetupLogFile
|
choco install Pester -y --force --limitoutput 2>&1 >> $Script:TestSetupLogFile
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( -not (Test-Path "$env:ProgramData\chocolatey\lib\sysinternals\tools" ) ) {
|
|
||||||
Write-Log -Message "sysinternals not present. Installing sysinternals."
|
|
||||||
choco install sysinternals -y --force --limitoutput 2>&1 >> $Script:TestSetupLogFile
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
@ -310,25 +300,29 @@ function Get-UserSID
|
|||||||
#>
|
#>
|
||||||
function Cleanup-OpenSSHTestEnvironment
|
function Cleanup-OpenSSHTestEnvironment
|
||||||
{
|
{
|
||||||
|
if($Global:OpenSSHTestInfo -eq $null) {
|
||||||
|
throw "OpenSSHTestInfo is not set. Did you run Setup-OpenSShTestEnvironment?"
|
||||||
|
}
|
||||||
|
|
||||||
|
$sshBinPath = $Global:OpenSSHTestInfo["OpenSSHBinPath"]
|
||||||
|
|
||||||
# .exe - Windows specific. TODO - PAL
|
# .exe - Windows specific. TODO - PAL
|
||||||
if (-not (Test-Path (Join-Path $script:OpenSSHBinPath ssh.exe) -PathType Leaf))
|
if (-not (Test-Path (Join-Path $sshBinPath ssh.exe) -PathType Leaf))
|
||||||
{
|
{
|
||||||
Throw "Cannot find OpenSSH binaries under $script:OpenSSHBinPath. "
|
Throw "Cannot find OpenSSH binaries under $script:OpenSSHBinPath. "
|
||||||
}
|
}
|
||||||
|
|
||||||
#unregister test host keys from agent
|
#unregister test host keys from agent
|
||||||
Get-ChildItem "$($script:OpenSSHBinPath)\sshtest*hostkey*.pub"| % {
|
Get-ChildItem "$sshBinPath\sshtest*hostkey*.pub"| % {
|
||||||
$cmd = "cmd /c `"$env:ProgramData\chocolatey\lib\sysinternals\tools\psexec -accepteula -nobanner -s -w $($script:OpenSSHBinPath) ssh-add -d $_ 2> tmp.txt`""
|
ssh-add-hostkey.ps1 -Delete_key $_.FullName
|
||||||
iex $cmd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Remove-Item $sshBinPath\sshtest*hostkey* -Force -ErrorAction SilentlyContinue
|
||||||
#Restore sshd_config
|
#Restore sshd_config
|
||||||
$backupConfigPath = Join-Path $Script:OpenSSHBinPath sshd_config.ori
|
$backupConfigPath = Join-Path $sshBinPath sshd_config.ori
|
||||||
if (Test-Path $backupConfigPath -PathType Leaf) {
|
if (Test-Path $backupConfigPath -PathType Leaf) {
|
||||||
Copy-Item $backupConfigPath (Join-Path $Script:OpenSSHBinPath sshd_config) -Force -ErrorAction SilentlyContinue
|
Copy-Item $backupConfigPath (Join-Path $sshBinPath sshd_config) -Force -ErrorAction SilentlyContinue
|
||||||
Remove-Item (Join-Path $Script:OpenSSHBinPath sshd_config.ori) -Force -ErrorAction SilentlyContinue
|
Remove-Item (Join-Path $sshBinPath sshd_config.ori) -Force -ErrorAction SilentlyContinue
|
||||||
Remove-Item $Script:OpenSSHBinPath\sshtest*hostkey* -Force -ErrorAction SilentlyContinue
|
|
||||||
Restart-Service sshd
|
Restart-Service sshd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
44
contrib/win32/openssh/OpenSSHUtils.psd1
Normal file
44
contrib/win32/openssh/OpenSSHUtils.psd1
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#
|
||||||
|
# Module manifest for module 'OpenSSHUtils'
|
||||||
|
#
|
||||||
|
# Generated on: 6/9/2017
|
||||||
|
#
|
||||||
|
|
||||||
|
@{
|
||||||
|
|
||||||
|
# Script module or binary module file associated with this manifest
|
||||||
|
ModuleToProcess = 'OpenSSHUtils.psm1'
|
||||||
|
|
||||||
|
# Version number of this module.
|
||||||
|
ModuleVersion = '1.0.0.1'
|
||||||
|
|
||||||
|
# ID used to uniquely identify this module
|
||||||
|
GUID = '08285dee-3d08-476b-8948-1a7e2562c079'
|
||||||
|
|
||||||
|
# Author of this module
|
||||||
|
Author = 'Yanbing Wang'
|
||||||
|
|
||||||
|
# Company or vendor of this module
|
||||||
|
CompanyName = ''
|
||||||
|
|
||||||
|
# Copyright statement for this module
|
||||||
|
Copyright = ''
|
||||||
|
|
||||||
|
# Description of the functionality provided by this module
|
||||||
|
Description = 'Configure OpenSSH for Windows related security settings like file owner and permissions.'
|
||||||
|
|
||||||
|
# Functions to export from this module
|
||||||
|
FunctionsToExport = '*'
|
||||||
|
|
||||||
|
# Cmdlets to export from this module
|
||||||
|
CmdletsToExport = '*'
|
||||||
|
|
||||||
|
# Variables to export from this module
|
||||||
|
VariablesToExport = '*'
|
||||||
|
|
||||||
|
# Aliases to export from this module
|
||||||
|
AliasesToExport = '*'
|
||||||
|
|
||||||
|
# Minimum version of the Windows PowerShell engine required by this module
|
||||||
|
PowerShellVersion = '2.0'
|
||||||
|
}
|
@ -1,61 +1,117 @@
|
|||||||
$systemAccount = New-Object System.Security.Principal.NTAccount("NT AUTHORITY", "SYSTEM")
|
Set-StrictMode -Version 2.0
|
||||||
|
$systemAccount = New-Object System.Security.Principal.NTAccount("NT AUTHORITY", "SYSTEM")
|
||||||
$adminsAccount = New-Object System.Security.Principal.NTAccount("BUILTIN","Administrators")
|
$adminsAccount = New-Object System.Security.Principal.NTAccount("BUILTIN","Administrators")
|
||||||
$currentUser = New-Object System.Security.Principal.NTAccount($($env:USERDOMAIN), $($env:USERNAME))
|
$currentUser = New-Object System.Security.Principal.NTAccount($($env:USERDOMAIN), $($env:USERNAME))
|
||||||
$everyone = New-Object System.Security.Principal.NTAccount("EveryOne")
|
$everyone = New-Object System.Security.Principal.NTAccount("EveryOne")
|
||||||
$sshdAccount = New-Object System.Security.Principal.NTAccount("NT SERVICE","sshd")
|
$sshdAccount = New-Object System.Security.Principal.NTAccount("NT SERVICE","sshd")
|
||||||
|
|
||||||
|
#Taken from P/Invoke.NET with minor adjustments.
|
||||||
|
$definition = @'
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class AdjPriv
|
||||||
|
{
|
||||||
|
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
|
||||||
|
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
|
||||||
|
ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);
|
||||||
|
[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)]
|
||||||
|
internal static extern IntPtr GetCurrentProcess();
|
||||||
|
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
|
||||||
|
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);
|
||||||
|
[DllImport("advapi32.dll", SetLastError = true)]
|
||||||
|
internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
|
internal struct TokPriv1Luid
|
||||||
|
{
|
||||||
|
public int Count;
|
||||||
|
public long Luid;
|
||||||
|
public int Attr;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
|
||||||
|
internal const int SE_PRIVILEGE_DISABLED = 0x00000000;
|
||||||
|
internal const int TOKEN_QUERY = 0x00000008;
|
||||||
|
internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
|
||||||
|
public static bool EnablePrivilege(string privilege, bool disable)
|
||||||
|
{
|
||||||
|
bool retVal;
|
||||||
|
TokPriv1Luid tp;
|
||||||
|
IntPtr hproc = GetCurrentProcess();
|
||||||
|
IntPtr htok = IntPtr.Zero;
|
||||||
|
retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
|
||||||
|
tp.Count = 1;
|
||||||
|
tp.Luid = 0;
|
||||||
|
if(disable)
|
||||||
|
{
|
||||||
|
tp.Attr = SE_PRIVILEGE_DISABLED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tp.Attr = SE_PRIVILEGE_ENABLED;
|
||||||
|
}
|
||||||
|
retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
|
||||||
|
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'@
|
||||||
|
|
||||||
|
$type = Add-Type $definition -PassThru -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-HostSSHDConfigPermissions
|
Repair-SshdConfigPermission
|
||||||
fix the file owner and permissions of sshd_config
|
Repair the file owner and Permission of sshd_config
|
||||||
#>
|
#>
|
||||||
function Fix-HostSSHDConfigPermissions
|
function Repair-SshdConfigPermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath)
|
||||||
[switch] $Quiet)
|
|
||||||
|
|
||||||
Fix-FilePermissions -Owners $systemAccount,$adminsAccount -ReadAccessNeeded $sshdAccount @psBoundParameters
|
Repair-FilePermission -Owners $systemAccount,$adminsAccount -ReadAccessNeeded $sshdAccount @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-HostKeyPermissions
|
Repair-SshdHostKeyPermission
|
||||||
fix the file owner and permissions of host private and public key
|
Repair the file owner and Permission of host private and public key
|
||||||
-FilePath: The path of the private host key
|
-FilePath: The path of the private host key
|
||||||
#>
|
#>
|
||||||
function Fix-HostKeyPermissions
|
function Repair-SshdHostKeyPermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath)
|
||||||
[switch] $Quiet)
|
|
||||||
$parameters = $PSBoundParameters
|
|
||||||
if($parameters["FilePath"].EndsWith(".pub"))
|
|
||||||
{
|
|
||||||
$parameters["FilePath"] = $parameters["FilePath"].Replace(".pub", "")
|
|
||||||
}
|
|
||||||
Fix-FilePermissions -Owners $systemAccount,$adminsAccount -ReadAccessNeeded $sshdAccount @psBoundParameters
|
|
||||||
|
|
||||||
$parameters["FilePath"] += ".pub"
|
if($PSBoundParameters["FilePath"].EndsWith(".pub"))
|
||||||
Fix-FilePermissions -Owners $systemAccount,$adminsAccount -ReadAccessOK $everyone -ReadAccessNeeded $sshdAccount @parameters
|
{
|
||||||
|
$PSBoundParameters["FilePath"] = $PSBoundParameters["FilePath"].Replace(".pub", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
Repair-FilePermission -Owners $systemAccount,$adminsAccount -ReadAccessNeeded $sshdAccount @psBoundParameters
|
||||||
|
|
||||||
|
$PSBoundParameters["FilePath"] += ".pub"
|
||||||
|
Repair-FilePermission -Owners $systemAccount,$adminsAccount -ReadAccessOK $everyone -ReadAccessNeeded $sshdAccount @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-AuthorizedKeyPermissions
|
Repair-AuthorizedKeyPermission
|
||||||
fix the file owner and permissions of authorized_keys
|
Repair the file owner and Permission of authorized_keys
|
||||||
#>
|
#>
|
||||||
function Fix-AuthorizedKeyPermissions
|
function Repair-AuthorizedKeyPermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath)
|
||||||
[switch] $Quiet)
|
|
||||||
|
|
||||||
if(-not (Test-Path $FilePath -PathType Leaf))
|
if(-not (Test-Path $FilePath -PathType Leaf))
|
||||||
{
|
{
|
||||||
@ -64,14 +120,27 @@ function Fix-AuthorizedKeyPermissions
|
|||||||
}
|
}
|
||||||
$fullPath = (Resolve-Path $FilePath).Path
|
$fullPath = (Resolve-Path $FilePath).Path
|
||||||
$profileListPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
|
$profileListPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
|
||||||
$profileItem = Get-ChildItem $profileListPath -ErrorAction Ignore | ? {
|
$profileItem = Get-ChildItem $profileListPath -ErrorAction SilentlyContinue | ? {
|
||||||
$fullPath.ToLower().Contains((Get-ItemPropertyValue $_.PSPath -Name ProfileImagePath -ErrorAction Ignore).Tolower())
|
$properties = Get-ItemProperty $_.pspath -ErrorAction SilentlyContinue
|
||||||
|
$userProfilePath = $null
|
||||||
|
if($properties)
|
||||||
|
{
|
||||||
|
$userProfilePath = $properties.ProfileImagePath
|
||||||
|
}
|
||||||
|
$fullPath -ieq "$userProfilePath\.ssh\authorized_keys"
|
||||||
}
|
}
|
||||||
if($profileItem)
|
if($profileItem)
|
||||||
{
|
{
|
||||||
$userSid = $profileItem.PSChildName
|
$userSid = $profileItem.PSChildName
|
||||||
$account = Get-UserAccount -UserSid $userSid
|
$account = Get-UserAccount -UserSid $userSid
|
||||||
Fix-FilePermissions -Owners $account,$adminsAccount,$systemAccount -AnyAccessOK $account -ReadAccessNeeded $sshdAccount @psBoundParameters
|
if($account)
|
||||||
|
{
|
||||||
|
Repair-FilePermission -Owners $account,$adminsAccount,$systemAccount -AnyAccessOK $account -ReadAccessNeeded $sshdAccount @psBoundParameters
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-host "Can't translate $userSid to an account. skip checking $fullPath..." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -81,61 +150,62 @@ function Fix-AuthorizedKeyPermissions
|
|||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-UserKeyPermissions
|
Repair-UserKeyPermission
|
||||||
fix the file owner and permissions of user config
|
Repair the file owner and Permission of user config
|
||||||
-FilePath: The path of the private user key
|
-FilePath: The path of the private user key
|
||||||
|
-User: The user associated with this ssh config
|
||||||
#>
|
#>
|
||||||
function Fix-UserKeyPermissions
|
function Repair-UserKeyPermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true, Position = 0)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath,
|
||||||
[switch] $Quiet)
|
[System.Security.Principal.NTAccount] $User = $currentUser)
|
||||||
|
|
||||||
$parameters = $PSBoundParameters
|
if($PSBoundParameters["FilePath"].EndsWith(".pub"))
|
||||||
if($parameters["FilePath"].EndsWith(".pub"))
|
|
||||||
{
|
{
|
||||||
$parameters["FilePath"] = $parameters["FilePath"].Replace(".pub", "")
|
$PSBoundParameters["FilePath"] = $PSBoundParameters["FilePath"].Replace(".pub", "")
|
||||||
}
|
}
|
||||||
Fix-FilePermissions -Owners $currentUser, $adminsAccount,$systemAccount -AnyAccessOK $currentUser @psBoundParameters
|
Repair-FilePermission -Owners $User, $adminsAccount,$systemAccount -AnyAccessOK $User @psBoundParameters
|
||||||
|
|
||||||
$parameters["FilePath"] += ".pub"
|
$PSBoundParameters["FilePath"] += ".pub"
|
||||||
Fix-FilePermissions -Owners $currentUser, $adminsAccount,$systemAccount -AnyAccessOK $currentUser -ReadAccessOK $everyone @parameters
|
Repair-FilePermission -Owners $User, $adminsAccount,$systemAccount -AnyAccessOK $User -ReadAccessOK $everyone @psBoundParameters
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-UserSSHConfigPermissions
|
Repair-UserSSHConfigPermission
|
||||||
fix the file owner and permissions of user config
|
Repair the file owner and Permission of user config
|
||||||
#>
|
#>
|
||||||
function Fix-UserSSHConfigPermissions
|
function Repair-UserSshConfigPermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath)
|
||||||
[switch] $Quiet)
|
Repair-FilePermission -Owners $currentUser,$adminsAccount,$systemAccount -AnyAccessOK $currentUser @psBoundParameters
|
||||||
Fix-FilePermissions -Owners $currentUser,$adminsAccount,$systemAccount -AnyAccessOK $currentUser @psBoundParameters
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-FilePermissionInternal
|
Repair-FilePermissionInternal
|
||||||
Only validate owner and ACEs of the file
|
Only validate owner and ACEs of the file
|
||||||
#>
|
#>
|
||||||
function Fix-FilePermissions
|
function Repair-FilePermission
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true, Position = 0)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath,
|
||||||
[ValidateNotNull()]
|
[ValidateNotNull()]
|
||||||
[System.Security.Principal.NTAccount[]] $Owners = $currentUser,
|
[System.Security.Principal.NTAccount[]] $Owners = $currentUser,
|
||||||
[System.Security.Principal.NTAccount[]] $AnyAccessOK,
|
[System.Security.Principal.NTAccount[]] $AnyAccessOK,
|
||||||
[System.Security.Principal.NTAccount[]] $ReadAccessOK,
|
[System.Security.Principal.NTAccount[]] $ReadAccessOK,
|
||||||
[System.Security.Principal.NTAccount[]] $ReadAccessNeeded,
|
[System.Security.Principal.NTAccount[]] $ReadAccessNeeded
|
||||||
[switch] $Quiet
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(-not (Test-Path $FilePath -PathType Leaf))
|
if(-not (Test-Path $FilePath -PathType Leaf))
|
||||||
@ -145,67 +215,67 @@ function Fix-FilePermissions
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-host " [*] $FilePath"
|
Write-host " [*] $FilePath"
|
||||||
$return = Fix-FilePermissionInternal @PSBoundParameters
|
$return = Repair-FilePermissionInternal @PSBoundParameters
|
||||||
|
|
||||||
if($return -contains $true)
|
if($return -contains $true)
|
||||||
{
|
{
|
||||||
#Write-host "Re-check the health of file $FilePath"
|
#Write-host "Re-check the health of file $FilePath"
|
||||||
Fix-FilePermissionInternal @PSBoundParameters
|
Repair-FilePermissionInternal @PSBoundParameters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.Synopsis
|
.Synopsis
|
||||||
Fix-FilePermissionInternal
|
Repair-FilePermissionInternal
|
||||||
#>
|
#>
|
||||||
function Fix-FilePermissionInternal {
|
function Repair-FilePermissionInternal {
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true, Position = 0)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$FilePath,
|
[string]$FilePath,
|
||||||
[ValidateNotNull()]
|
[ValidateNotNull()]
|
||||||
[System.Security.Principal.NTAccount[]] $Owners = $currentUser,
|
[System.Security.Principal.NTAccount[]] $Owners = $currentUser,
|
||||||
[System.Security.Principal.NTAccount[]] $AnyAccessOK,
|
[System.Security.Principal.NTAccount[]] $AnyAccessOK,
|
||||||
[System.Security.Principal.NTAccount[]] $ReadAccessOK,
|
[System.Security.Principal.NTAccount[]] $ReadAccessOK,
|
||||||
[System.Security.Principal.NTAccount[]] $ReadAccessNeeded,
|
[System.Security.Principal.NTAccount[]] $ReadAccessNeeded
|
||||||
[switch] $Quiet
|
|
||||||
)
|
)
|
||||||
|
|
||||||
$acl = Get-Acl $FilePath
|
$acl = Get-Acl $FilePath
|
||||||
$needChange = $false
|
$needChange = $false
|
||||||
$health = $true
|
$health = $true
|
||||||
if ($Quiet)
|
$paras = @{}
|
||||||
{
|
$PSBoundParameters.GetEnumerator() | % { if((-not $_.key.Contains("Owners")) -and (-not $_.key.Contains("Access"))) { $paras.Add($_.key,$_.Value) } }
|
||||||
$result = 'Y'
|
|
||||||
}
|
|
||||||
|
|
||||||
if(-not $Owners.Contains([System.Security.Principal.NTAccount]$($acl.Owner)))
|
$validOwner = $owners | ? { $_.equals([System.Security.Principal.NTAccount]$acl.owner)}
|
||||||
|
if($validOwner -eq $null)
|
||||||
{
|
{
|
||||||
if (-not $Quiet) {
|
$caption = "Current owner: '$($acl.Owner)'. '$($Owners[0])' should own '$FilePath'."
|
||||||
$warning = "Current owner: '$($acl.Owner)'. '$($Owners[0])' should own $FilePath."
|
$prompt = "Shall I set the file owner?"
|
||||||
Do {
|
$description = "Set '$($Owners[0])' as owner of '$FilePath'."
|
||||||
Write-Warning $warning
|
if($pscmdlet.ShouldProcess($description, $prompt, $caption))
|
||||||
$input = Read-Host -Prompt "Shall I set the file owner? [Yes] Y; [No] N (default is `"Y`")"
|
|
||||||
if([string]::IsNullOrEmpty($input))
|
|
||||||
{
|
{
|
||||||
$input = 'Y'
|
Enable-Privilege SeRestorePrivilege | out-null
|
||||||
}
|
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
|
||||||
$result = $Matches[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
if($result.ToLower().Startswith('y'))
|
|
||||||
{
|
|
||||||
$needChange = $true
|
|
||||||
$acl.SetOwner($Owners[0])
|
$acl.SetOwner($Owners[0])
|
||||||
Write-Host "'$($Owners[0])' now owns $FilePath. " -ForegroundColor Green
|
Set-Acl -Path $FilePath -AclObject $acl -ErrorVariable e -Confirm:$false
|
||||||
|
if($e)
|
||||||
|
{
|
||||||
|
Write-Warning "Set owner failed with error: $($e[0].ToString())."
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "'$($Owners[0])' now owns '$FilePath'. " -ForegroundColor Green
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$health = $false
|
$health = $false
|
||||||
|
if(-not $PSBoundParameters.ContainsKey("WhatIf"))
|
||||||
|
{
|
||||||
Write-Host "The owner is still set to '$($acl.Owner)'." -ForegroundColor Yellow
|
Write-Host "The owner is still set to '$($acl.Owner)'." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ReadAccessPerm = ([System.UInt32] [System.Security.AccessControl.FileSystemRights]::Read.value__) -bor `
|
$ReadAccessPerm = ([System.UInt32] [System.Security.AccessControl.FileSystemRights]::Read.value__) -bor `
|
||||||
([System.UInt32] [System.Security.AccessControl.FileSystemRights]::Synchronize.value__)
|
([System.UInt32] [System.Security.AccessControl.FileSystemRights]::Synchronize.value__)
|
||||||
@ -219,22 +289,26 @@ function Fix-FilePermissionInternal {
|
|||||||
#this is orginal list requested by the user, the account will be removed from the list if they already part of the dacl
|
#this is orginal list requested by the user, the account will be removed from the list if they already part of the dacl
|
||||||
$realReadAccessNeeded = $ReadAccessNeeded
|
$realReadAccessNeeded = $ReadAccessNeeded
|
||||||
|
|
||||||
|
#'APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES'- can't translate fully qualified name. it is a win32 API bug.
|
||||||
|
#'ALL APPLICATION PACKAGES' exists only on Win2k12 and Win2k16 and 'ALL RESTRICTED APPLICATION PACKAGES' exists only in Win2k16
|
||||||
|
$specialIdRefs = "ALL APPLICATION PACKAGES","ALL RESTRICTED APPLICATION PACKAGES"
|
||||||
|
|
||||||
foreach($a in $acl.Access)
|
foreach($a in $acl.Access)
|
||||||
{
|
{
|
||||||
if(($realAnyAccessOKList -ne $null) -and $realAnyAccessOKList.Contains($a.IdentityReference))
|
if($realAnyAccessOKList -and (($realAnyAccessOKList | ? { $_.equals($a.IdentityReference)}) -ne $null))
|
||||||
{
|
{
|
||||||
#ignore those accounts listed in the AnyAccessOK list.
|
#ignore those accounts listed in the AnyAccessOK list.
|
||||||
}
|
}
|
||||||
#If everyone is in the ReadAccessOK list, any user can have read access;
|
#If everyone is in the ReadAccessOK list, any user can have read access;
|
||||||
# below block make sure they are granted Read access only
|
# below block make sure they are granted Read access only
|
||||||
elseif($realReadAcessOKList -and (($realReadAcessOKList.Contains($everyone)) -or `
|
elseif($realReadAcessOKList -and ((($realReadAcessOKList | ? { $_.Equals($everyone)}) -ne $null) -or `
|
||||||
($realReadAcessOKList.Contains($a.IdentityReference))))
|
(($realReadAcessOKList | ? { $_.equals($a.IdentityReference)}) -ne $null)))
|
||||||
{
|
{
|
||||||
if($realReadAccessNeeded -and ($a.IdentityReference.Equals($everyone)))
|
if($realReadAccessNeeded -and ($a.IdentityReference.Equals($everyone)))
|
||||||
{
|
{
|
||||||
$realReadAccessNeeded.Clear()
|
$realReadAccessNeeded=@()
|
||||||
}
|
}
|
||||||
elseif($realReadAccessNeeded -and $realReadAccessNeeded.Contains($a.IdentityReference))
|
elseif($realReadAccessNeeded)
|
||||||
{
|
{
|
||||||
$realReadAccessNeeded = $realReadAccessNeeded | ? { -not $_.Equals($a.IdentityReference) }
|
$realReadAccessNeeded = $realReadAccessNeeded | ? { -not $_.Equals($a.IdentityReference) }
|
||||||
}
|
}
|
||||||
@ -245,94 +319,116 @@ function Fix-FilePermissionInternal {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$warning = "'$($a.IdentityReference)' has the following access to $($FilePath): '$($a.FileSystemRights)'."
|
|
||||||
if($a.IsInherited)
|
if($a.IsInherited)
|
||||||
{
|
{
|
||||||
if($needChange)
|
if($needChange)
|
||||||
{
|
{
|
||||||
Set-Acl -Path $FilePath -AclObject $acl
|
Enable-Privilege SeRestorePrivilege | out-null
|
||||||
}
|
Set-Acl -Path $FilePath -AclObject $acl -ErrorVariable e -Confirm:$false
|
||||||
|
if($e)
|
||||||
$message = @"
|
|
||||||
$warning
|
|
||||||
Need to remove inheritance to fix it.
|
|
||||||
"@
|
|
||||||
|
|
||||||
return Remove-RuleProtection -FilePath $FilePath -Message $message -Quiet:$Quiet
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not $Quiet) {
|
|
||||||
Do {
|
|
||||||
Write-Warning $warning
|
|
||||||
$input = Read-Host -Prompt "Shall I make it Read only? [Yes] Y; [No] N (default is `"Y`")"
|
|
||||||
if([string]::IsNullOrEmpty($input))
|
|
||||||
{
|
{
|
||||||
$input = 'Y'
|
Write-Warning "Repair permission failed with error: $($e[0].ToString())."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
return Remove-RuleProtection @paras
|
||||||
$result = $Matches[0]
|
|
||||||
}
|
}
|
||||||
|
$caption = "'$($a.IdentityReference)' has the following access to '$FilePath': '$($a.FileSystemRights)'."
|
||||||
|
$prompt = "Shall I make it Read only?"
|
||||||
|
$description = "Set'$($a.IdentityReference)' Read access only to '$FilePath'. "
|
||||||
|
|
||||||
if($result.ToLower().Startswith('y'))
|
if($pscmdlet.ShouldProcess($description, $prompt, $caption))
|
||||||
{
|
{
|
||||||
$needChange = $true
|
$needChange = $true
|
||||||
$sshAce = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
$idRefShortValue = ($a.IdentityReference.Value).split('\')[-1]
|
||||||
|
if ($specialIdRefs -icontains $idRefShortValue )
|
||||||
|
{
|
||||||
|
$ruleIdentity = Get-UserSID -User (New-Object Security.Principal.NTAccount $idRefShortValue)
|
||||||
|
if($ruleIdentity)
|
||||||
|
{
|
||||||
|
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
||||||
|
($ruleIdentity, "Read", "None", "None", "Allow")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Warning "Can't translate '$idRefShortValue'. "
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
||||||
($a.IdentityReference, "Read", "None", "None", "Allow")
|
($a.IdentityReference, "Read", "None", "None", "Allow")
|
||||||
$acl.SetAccessRule($sshAce)
|
}
|
||||||
Write-Host "'$($a.IdentityReference)' now has Read access to $FilePath. " -ForegroundColor Green
|
$acl.SetAccessRule($ace)
|
||||||
|
Write-Host "'$($a.IdentityReference)' now has Read access to '$FilePath'. " -ForegroundColor Green
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$health = $false
|
$health = $false
|
||||||
Write-Host "'$($a.IdentityReference)' still has these access to $($FilePath): '$($a.FileSystemRights)'." -ForegroundColor Yellow
|
if(-not $PSBoundParameters.ContainsKey("WhatIf"))
|
||||||
|
{
|
||||||
|
Write-Host "'$($a.IdentityReference)' still has these access to '$FilePath': '$($a.FileSystemRights)'." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#other than AnyAccessOK and ReadAccessOK list, if any other account is allowed, they should be removed from the dacl
|
#other than AnyAccessOK and ReadAccessOK list, if any other account is allowed, they should be removed from the dacl
|
||||||
elseif($a.AccessControlType.Equals([System.Security.AccessControl.AccessControlType]::Allow))
|
elseif($a.AccessControlType.Equals([System.Security.AccessControl.AccessControlType]::Allow))
|
||||||
{
|
{
|
||||||
|
$caption = "'$($a.IdentityReference)' should not have access to '$FilePath'."
|
||||||
$warning = "'$($a.IdentityReference)' should not have access to '$FilePath'. "
|
|
||||||
if($a.IsInherited)
|
if($a.IsInherited)
|
||||||
{
|
{
|
||||||
if($needChange)
|
if($needChange)
|
||||||
{
|
{
|
||||||
Set-Acl -Path $FilePath -AclObject $acl
|
Enable-Privilege SeRestorePrivilege | out-null
|
||||||
}
|
Set-Acl -Path $FilePath -AclObject $acl -ErrorVariable e -Confirm:$false
|
||||||
$message = @"
|
if($e)
|
||||||
$warning
|
|
||||||
Need to remove inheritance to fix it.
|
|
||||||
"@
|
|
||||||
return Remove-RuleProtection -FilePath $FilePath -Message $message -Quiet:$Quiet
|
|
||||||
}
|
|
||||||
if (-not $Quiet) {
|
|
||||||
Do {
|
|
||||||
Write-Warning $warning
|
|
||||||
$input = Read-Host -Prompt "Shall I remove this access? [Yes] Y; [No] N (default is `"Y`")"
|
|
||||||
if([string]::IsNullOrEmpty($input))
|
|
||||||
{
|
{
|
||||||
$input = 'Y'
|
Write-Warning "Repair permission failed with error: $($e[0].ToString())."
|
||||||
}
|
}
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
}
|
||||||
$result = $Matches[0]
|
return Remove-RuleProtection @paras
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result.ToLower().Startswith('y'))
|
$prompt = "Shall I remove this access?"
|
||||||
|
$description = "Remove access rule of '$($a.IdentityReference)' from '$FilePath'."
|
||||||
|
|
||||||
|
if($pscmdlet.ShouldProcess($description, $prompt, "$caption."))
|
||||||
{
|
{
|
||||||
$needChange = $true
|
$needChange = $true
|
||||||
if(-not ($acl.RemoveAccessRule($a)))
|
$ace = $a
|
||||||
|
$idRefShortValue = ($a.IdentityReference.Value).split('\')[-1]
|
||||||
|
if ($specialIdRefs -icontains $idRefShortValue)
|
||||||
{
|
{
|
||||||
throw "failed to remove access of $($a.IdentityReference) rule to file $FilePath"
|
$ruleIdentity = Get-UserSID -User (New-Object Security.Principal.NTAccount $idRefShortValue)
|
||||||
|
if($ruleIdentity)
|
||||||
|
{
|
||||||
|
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
||||||
|
($ruleIdentity, $a.FileSystemRights, $a.InheritanceFlags, $a.PropagationFlags, $a.AccessControlType)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Host "'$($a.IdentityReference)' has no more access to $FilePath." -ForegroundColor Green
|
Write-Warning "Can't translate '$idRefShortValue'. "
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(-not ($acl.RemoveAccessRule($ace)))
|
||||||
|
{
|
||||||
|
Write-Warning "Failed to remove access of '$($a.IdentityReference)' from '$FilePath'."
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "'$($a.IdentityReference)' has no more access to '$FilePath'." -ForegroundColor Green
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$health = $false
|
$health = $false
|
||||||
Write-Host "'$($a.IdentityReference)' still has access to $FilePath." -ForegroundColor Yellow
|
if(-not $PSBoundParameters.ContainsKey("WhatIf"))
|
||||||
|
{
|
||||||
|
Write-Host "'$($a.IdentityReference)' still has access to '$FilePath'." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,37 +437,31 @@ Need to remove inheritance to fix it.
|
|||||||
if($realReadAccessNeeded)
|
if($realReadAccessNeeded)
|
||||||
{
|
{
|
||||||
$realReadAccessNeeded | % {
|
$realReadAccessNeeded | % {
|
||||||
if([string]::IsNullOrEmpty((Get-UserSID -User $_)))
|
if((Get-UserSID -User $_) -eq $null)
|
||||||
{
|
{
|
||||||
Write-Warning "'$_' needs Read access to $FilePath', but it does not exit on the machine."
|
Write-Warning "'$_' needs Read access to '$FilePath', but it can't be translated on the machine."
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (-not $Quiet) {
|
$caption = "'$_' needs Read access to '$FilePath'."
|
||||||
$warning = "'$_' needs Read access to $FilePath'."
|
$prompt = "Shall I make the above change?"
|
||||||
Do {
|
$description = "Set '$_' Read only access to '$FilePath'. "
|
||||||
Write-Warning $warning
|
|
||||||
$input = Read-Host -Prompt "Shall I make the above change? [Yes] Y; [No] N (default is `"Y`")"
|
|
||||||
if([string]::IsNullOrEmpty($input))
|
|
||||||
{
|
|
||||||
$input = 'Y'
|
|
||||||
}
|
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
|
||||||
$result = $Matches[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
if($result.ToLower().Startswith('y'))
|
if($pscmdlet.ShouldProcess($description, $prompt, $caption))
|
||||||
{
|
{
|
||||||
$needChange = $true
|
$needChange = $true
|
||||||
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
|
||||||
($_, "Read", "None", "None", "Allow")
|
($_, "Read", "None", "None", "Allow")
|
||||||
$acl.AddAccessRule($ace)
|
$acl.AddAccessRule($ace)
|
||||||
Write-Host "'$_' now has Read access to $FilePath. " -ForegroundColor Green
|
Write-Host "'$_' now has Read access to '$FilePath'." -ForegroundColor Green
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$health = $false
|
$health = $false
|
||||||
Write-Host "'$_' does not have Read access to $FilePath." -ForegroundColor Yellow
|
if(-not $PSBoundParameters.ContainsKey("WhatIf"))
|
||||||
|
{
|
||||||
|
Write-Host "'$_' does not have Read access to '$FilePath'." -ForegroundColor Yellow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,13 +469,18 @@ Need to remove inheritance to fix it.
|
|||||||
|
|
||||||
if($needChange)
|
if($needChange)
|
||||||
{
|
{
|
||||||
Set-Acl -Path $FilePath -AclObject $acl
|
Enable-Privilege SeRestorePrivilege | out-null
|
||||||
|
Set-Acl -Path $FilePath -AclObject $acl -ErrorVariable e -Confirm:$false
|
||||||
|
if($e)
|
||||||
|
{
|
||||||
|
Write-Warning "Repair permission failed with error: $($e[0].ToString())."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($health)
|
if($health)
|
||||||
{
|
{
|
||||||
if ($needChange)
|
if ($needChange)
|
||||||
{
|
{
|
||||||
Write-Host " fixed permissions" -ForegroundColor Yellow
|
Write-Host " Repaired permissions" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -401,36 +496,32 @@ Need to remove inheritance to fix it.
|
|||||||
#>
|
#>
|
||||||
function Remove-RuleProtection
|
function Remove-RuleProtection
|
||||||
{
|
{
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
|
||||||
param (
|
param (
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory=$true)]
|
||||||
[string]$FilePath,
|
[string]$FilePath
|
||||||
[string]$Message,
|
|
||||||
[switch] $Quiet
|
|
||||||
)
|
)
|
||||||
if (-not $Quiet) {
|
$message = "Need to remove the inheritance before repair the rules."
|
||||||
Do
|
$prompt = "Shall I remove the inheritace?"
|
||||||
|
$description = "Remove inheritance of '$FilePath'."
|
||||||
|
|
||||||
|
if($pscmdlet.ShouldProcess($description, $prompt, $message))
|
||||||
{
|
{
|
||||||
Write-Warning $Message
|
$acl = Get-acl -Path $FilePath
|
||||||
$input = Read-Host -Prompt "Shall I remove the inheritace? [Yes] Y; [No] N (default is `"Y`")"
|
$acl.SetAccessRuleProtection($True, $True)
|
||||||
if([string]::IsNullOrEmpty($input))
|
Enable-Privilege SeRestorePrivilege | out-null
|
||||||
|
Set-Acl -Path $FilePath -AclObject $acl -ErrorVariable e -Confirm:$false
|
||||||
|
if($e)
|
||||||
{
|
{
|
||||||
$input = 'Y'
|
Write-Warning "Remove-RuleProtection failed with error: $($e[0].ToString())."
|
||||||
}
|
|
||||||
} until ($input -match "^(y(es)?|N(o)?)$")
|
|
||||||
$result = $Matches[0]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result.ToLower().Startswith('y'))
|
Write-Host "Inheritance is removed from '$FilePath'." -ForegroundColor Green
|
||||||
{
|
|
||||||
$acl = Get-ACL $FilePath
|
|
||||||
$acl.SetAccessRuleProtection($True, $True)
|
|
||||||
Set-Acl -Path $FilePath -AclObject $acl
|
|
||||||
Write-Host "inheritance is removed from $FilePath. " -ForegroundColor Green
|
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
else
|
elseif(-not $PSBoundParameters.ContainsKey("WhatIf"))
|
||||||
{
|
{
|
||||||
Write-Host "inheritance is not removed from $FilePath. Skip Checking FilePath." -ForegroundColor Yellow
|
Write-Host "inheritance is not removed from '$FilePath'. Skip Checking FilePath." -ForegroundColor Yellow
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -463,12 +554,34 @@ function Get-UserSID
|
|||||||
param ([System.Security.Principal.NTAccount]$User)
|
param ([System.Security.Principal.NTAccount]$User)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$strSID = $User.Translate([System.Security.Principal.SecurityIdentifier])
|
$User.Translate([System.Security.Principal.SecurityIdentifier])
|
||||||
$strSID.Value
|
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Enable-Privilege {
|
||||||
|
param(
|
||||||
|
#The privilege to adjust. This set is taken from
|
||||||
|
#http://msdn.microsoft.com/en-us/library/bb530716(VS.85).aspx
|
||||||
|
[ValidateSet(
|
||||||
|
"SeAssignPrimaryTokenPrivilege", "SeAuditPrivilege", "SeBackupPrivilege",
|
||||||
|
"SeChangeNotifyPrivilege", "SeCreateGlobalPrivilege", "SeCreatePagefilePrivilege",
|
||||||
|
"SeCreatePermanentPrivilege", "SeCreateSymbolicLinkPrivilege", "SeCreateTokenPrivilege",
|
||||||
|
"SeDebugPrivilege", "SeEnableDelegationPrivilege", "SeImpersonatePrivilege", "SeIncreaseBasePriorityPrivilege",
|
||||||
|
"SeIncreaseQuotaPrivilege", "SeIncreaseWorkingSetPrivilege", "SeLoadDriverPrivilege",
|
||||||
|
"SeLockMemoryPrivilege", "SeMachineAccountPrivilege", "SeManageVolumePrivilege",
|
||||||
|
"SeProfileSingleProcessPrivilege", "SeRelabelPrivilege", "SeRemoteShutdownPrivilege",
|
||||||
|
"SeRestorePrivilege", "SeSecurityPrivilege", "SeShutdownPrivilege", "SeSyncAgentPrivilege",
|
||||||
|
"SeSystemEnvironmentPrivilege", "SeSystemProfilePrivilege", "SeSystemtimePrivilege",
|
||||||
|
"SeTakeOwnershipPrivilege", "SeTcbPrivilege", "SeTimeZonePrivilege", "SeTrustedCredManAccessPrivilege",
|
||||||
|
"SeUndockPrivilege", "SeUnsolicitedInputPrivilege")]
|
||||||
|
$Privilege,
|
||||||
|
# Switch to disable the privilege, rather than enable it.
|
||||||
|
[Switch] $Disable
|
||||||
|
)
|
||||||
|
|
||||||
Export-ModuleMember -Function Fix-HostSSHDConfigPermissions, Fix-HostKeyPermissions, Fix-AuthorizedKeyPermissions, Fix-UserKeyPermissions, Fix-UserSSHConfigPermissions
|
$type[0]::EnablePrivilege($Privilege, $Disable)
|
||||||
|
}
|
||||||
|
|
||||||
|
Export-ModuleMember -Function Repair-FilePermission, Repair-SshdConfigPermission, Repair-SshdHostKeyPermission, Repair-AuthorizedKeyPermission, Repair-UserKeyPermission, Repair-UserSshConfigPermission
|
||||||
|
@ -7,16 +7,6 @@ The custom paths are:
|
|||||||
OpenSSH-Src-Path = The directory path of the OpenSSH root source directory (with trailing slash)
|
OpenSSH-Src-Path = The directory path of the OpenSSH root source directory (with trailing slash)
|
||||||
OpenSSH-Bin-Path = The directory path of the location to which binaries are placed. This is the output of the binary projects
|
OpenSSH-Bin-Path = The directory path of the location to which binaries are placed. This is the output of the binary projects
|
||||||
OpenSSH-Lib-Path = The directory path of the location to which libraries are placed. This is the output of the libary projects
|
OpenSSH-Lib-Path = The directory path of the location to which libraries are placed. This is the output of the libary projects
|
||||||
OpenSSL-Win32-Release-Path = The directory path of OpenSSL statically linked compiled for Win32-Release. This path is used for
|
LibreSSL-x86-Path = The directory path of LibreSSL statically compiled for x86 platform.
|
||||||
include and library paths and for Win32-Release.
|
LibreSSL-x64-Path = The directory path of LibreSSL statically compiled for x64 platform.
|
||||||
OpenSSL-Win32-Debug-Path = The directory path of OpenSSL statically linked compiled for Win32-Debug. This path is used for
|
|
||||||
include and library paths and for Win32-Debug.
|
|
||||||
OpenSSL-x64-Release-Path = The directory path of OpenSSL statically linked compiled for x64-Release. This path is used for
|
|
||||||
include and library paths and for x64-Release.
|
|
||||||
OpenSSL-x64-Debug-Path = The directory path of OpenSSL statically linked compiled for x64-Debug. This path is used for
|
|
||||||
include and library paths and for x64-Debug.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The Release/Debug OpenSSL directories output is the standard 'install' output of OpenSSL compiled under Visual Studio 2015 using static c-runtimes.
|
|
||||||
|
|
||||||
|
@ -189,9 +189,11 @@
|
|||||||
|
|
||||||
/* Define to 1 if you have the `arc4random' function. */
|
/* Define to 1 if you have the `arc4random' function. */
|
||||||
/* #undef HAVE_ARC4RANDOM */
|
/* #undef HAVE_ARC4RANDOM */
|
||||||
|
#define HAVE_ARC4RANDOM 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||||
/* #undef HAVE_ARC4RANDOM_BUF */
|
/* #undef HAVE_ARC4RANDOM_BUF */
|
||||||
|
#define HAVE_ARC4RANDOM_BUF 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `arc4random_uniform' function. */
|
/* Define to 1 if you have the `arc4random_uniform' function. */
|
||||||
/* #undef HAVE_ARC4RANDOM_UNIFORM */
|
/* #undef HAVE_ARC4RANDOM_UNIFORM */
|
||||||
@ -1579,20 +1581,8 @@
|
|||||||
/* type to use in place of socklen_t if not defined */
|
/* type to use in place of socklen_t if not defined */
|
||||||
/* #undef socklen_t */
|
/* #undef socklen_t */
|
||||||
#define WIN32_LEAN_AND_MEAN 1
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
|
||||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
|
||||||
#define WINDOWS 1
|
#define WINDOWS 1
|
||||||
|
|
||||||
/* Define if you must implement a startup_needs function for your platform */
|
|
||||||
#define HAVE_STARTUP_NEEDS 1
|
|
||||||
|
|
||||||
/* Define if your platform uses Winsock instead of BSD sockets (yeah, there are a lot of platforms like this :) */
|
|
||||||
#define HAVE_WINSOCK 1
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
#define snprintf _snprintf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BROKEN_READV_COMPARISON
|
#define BROKEN_READV_COMPARISON
|
||||||
|
|
||||||
/* Override detection of some headers and functions on MinGW */
|
/* Override detection of some headers and functions on MinGW */
|
||||||
@ -1693,10 +1683,7 @@
|
|||||||
|
|
||||||
#define __attribute__(A)
|
#define __attribute__(A)
|
||||||
|
|
||||||
// define building with MS Visual Studio Compiler and runtime and not with MingW/gcc compiler
|
/* disable inclusion of compatability definitions in CRT headers */
|
||||||
#define WIN32_VS 1
|
|
||||||
|
|
||||||
/* disable inclusion of compatability defitnitions in CRT headers */
|
|
||||||
#define __STDC__ 1
|
#define __STDC__ 1
|
||||||
|
|
||||||
#define umac128_new umac_new
|
#define umac128_new umac_new
|
||||||
|
@ -102,14 +102,14 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
||||||
@ -120,10 +120,11 @@
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)OpenSSHUtils.psm1 $(OutDir)
|
copy /Y $(SolutionDir)OpenSSHUtils.ps*1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
||||||
|
copy /Y $(SolutionDir)ssh-add-hostkey.ps1 $(OutDir)
|
||||||
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
||||||
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, and sshd_config (if not already present) to build directory</Message>
|
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, OpenSSHUtils.psd1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, ssh-add-hostkey.ps1, and sshd_config (if not already present) to build directory</Message>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
@ -134,14 +135,14 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
||||||
@ -152,10 +153,11 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)OpenSSHUtils.psm1 $(OutDir)
|
copy /Y $(SolutionDir)OpenSSHUtils.ps*1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
||||||
|
copy /Y $(SolutionDir)ssh-add-hostkey.ps1 $(OutDir)
|
||||||
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
||||||
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, and sshd_config (if not already present) to build directory</Message>
|
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, OpenSSHUtils.psd1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, ssh-add-hostkey.ps1, and sshd_config (if not already present) to build directory</Message>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
@ -168,7 +170,7 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -176,8 +178,8 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
||||||
@ -188,10 +190,11 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)OpenSSHUtils.psm1 $(OutDir)
|
copy /Y $(SolutionDir)OpenSSHUtils.ps*1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
||||||
|
copy /Y $(SolutionDir)ssh-add-hostkey.ps1 $(OutDir)
|
||||||
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
||||||
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, and sshd_config (if not already present) to build directory</Message>
|
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, OpenSSHUtils.psd1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, ssh-add-hostkey.ps1, and sshd_config (if not already present) to build directory</Message>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
@ -204,7 +207,7 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -212,8 +215,8 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
<Command>powershell.exe -Executionpolicy Bypass "$(SolutionDir)config.ps1" -Config_h_vs '$(SolutionDir)config.h.vs' -Config_h '$(OpenSSH-Src-Path)config.h' -VCIncludePath '$(VC_IncludePath)' -OutCRTHeader '$(OpenSSH-Src-Path)contrib\win32\win32compat\inc\crtheaders.h'</Command>
|
||||||
@ -224,10 +227,11 @@ If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</C
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
<Command>copy /Y $(SolutionDir)install-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
copy /Y $(SolutionDir)uninstall-ssh*ps1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)OpenSSHUtils.psm1 $(OutDir)
|
copy /Y $(SolutionDir)OpenSSHUtils.ps*1 $(OutDir)
|
||||||
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
copy /Y $(SolutionDir)Fix*FilePermissions.ps1 $(OutDir)
|
||||||
|
copy /Y $(SolutionDir)ssh-add-hostkey.ps1 $(OutDir)
|
||||||
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
If NOT exist $(OutDir)\sshd_config (copy $(SolutionDir)sshd_config $(OutDir))</Command>
|
||||||
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, and sshd_config (if not already present) to build directory</Message>
|
<Message>Copy install-sshd.ps1, uninstall-sshd.ps1, OpenSSHUtils.psm1, OpenSSHUtils.psd1, FixHostFilePermissions.ps1, FixUserFilePermissions.ps1, ssh-add-hostkey.ps1, and sshd_config (if not already present) to build directory</Message>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="paths.targets" />
|
<Import Project="paths.targets" />
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@ -103,15 +103,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>posix_compat.lib;bcrypt.lib;Netapi32.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -123,15 +123,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>posix_compat.lib;bcrypt.lib;Netapi32.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -153,8 +153,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>posix_compat.lib;bcrypt.lib;Netapi32.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -177,8 +177,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>posix_compat.lib;bcrypt.lib;Netapi32.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ExceptionHandling>false</ExceptionHandling>
|
<ExceptionHandling>false</ExceptionHandling>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<ExceptionHandling>false</ExceptionHandling>
|
<ExceptionHandling>false</ExceptionHandling>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -86,7 +86,286 @@
|
|||||||
<ClCompile Include="..\..\..\kexgexs.c" />
|
<ClCompile Include="..\..\..\kexgexs.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h" />
|
<ClCompile Include="$(OpenSSH-Src-Path)addrmatch.c">
|
||||||
<ClInclude Include="$(OpenSSH-Src-Path)sshfileperm.h" />
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)atomicio.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)authfd.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)authfile.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)bitmap.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)blocks.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)bufaux.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)bufbn.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)bufec.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)buffer.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)canohost.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)chacha.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)channels.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-3des1.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-aes.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-aesctr.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-bf1.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-chachapoly.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher-ctr.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cipher.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)cleanup.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)compat.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)crc32.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)deattack.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)dh.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)digest-libc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)dispatch.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)dns.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ed25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)entropy.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)fatal.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)fe25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ge25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)gss-genr.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)hash.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)hmac.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)hostfile.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kex.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexc25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexc25519c.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexc25519s.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexdh.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexdhc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexdhs.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexecdh.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexecdhc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexecdhs.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexgex.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)kexgexc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)key.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)krl.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)log.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)mac.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)match.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)misc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)moduli.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)monitor_fdpass.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)msg.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)nchan.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)opacket.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)packet.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)poly1305.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)progressmeter.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)readpass.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)rijndael.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)rsa.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sc25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)smult_curve25519_ref.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh-dss.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh-ecdsa.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh-ed25519.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh-pkcs11.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh-rsa.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-getput-basic.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-getput-crypto.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf-misc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sshbuf.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssherr.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sshkey.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)ssh_api.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)umac.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)uuencode.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)verify.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)xmalloc.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)platform-pledge.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)platform-tracing.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)platform.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)sandbox-pledge.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\ttymodes_windows.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)digest-openssl.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)contrib\win32\win32compat\w32-sshfileperm.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="$(OpenSSH-Src-Path)sshfileperm.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -30,6 +30,7 @@
|
|||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-closefrom.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-closefrom.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-cray.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-cray.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-cygwin_util.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-cygwin_util.c" />
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-getpagesize.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-getpeereid.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-getpeereid.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-misc.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-misc.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-nextstep.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\bsd-nextstep.c" />
|
||||||
@ -62,6 +63,7 @@
|
|||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\port-uw.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\readpassphrase.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\reallocarray.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\reallocarray.c" />
|
||||||
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\recallocarray.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\rmd160.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\rmd160.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\rresvport.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\rresvport.c" />
|
||||||
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\setenv.c" />
|
<ClCompile Include="$(OpenSSH-Src-Path)openbsd-compat\setenv.c" />
|
||||||
@ -195,7 +197,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -211,7 +213,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -229,7 +231,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -248,7 +250,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)openbsd-compat;$(OpenSSH-Src-Path)libkrb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
<OpenSSH-Src-Path>$(SolutionDir)..\..\..\</OpenSSH-Src-Path>
|
<OpenSSH-Src-Path>$(SolutionDir)..\..\..\</OpenSSH-Src-Path>
|
||||||
<OpenSSH-Bin-Path>$(SolutionDir)..\..\..\bin\</OpenSSH-Bin-Path>
|
<OpenSSH-Bin-Path>$(SolutionDir)..\..\..\bin\</OpenSSH-Bin-Path>
|
||||||
<OpenSSH-Lib-Path>$(SolutionDir)lib\</OpenSSH-Lib-Path>
|
<OpenSSH-Lib-Path>$(SolutionDir)lib\</OpenSSH-Lib-Path>
|
||||||
<OpenSSL-Path>$(SolutionDir)\OpenSSLSDK\1.0.2d</OpenSSL-Path>
|
<LibreSSL-Path>$(SolutionDir)\LibreSSLSDK\</LibreSSL-Path>
|
||||||
<OpenSSL-Win32-Release-Path>$(SolutionDir)\OpenSSLSDK\1.0.2d\Win32\Release\</OpenSSL-Win32-Release-Path>
|
<LibreSSL-x86-Path>$(SolutionDir)\LibreSSLSDK\x86\</LibreSSL-x86-Path>
|
||||||
<OpenSSL-Win32-Debug-Path>$(SolutionDir)\OpenSSLSDK\1.0.2d\Win32\Debug\</OpenSSL-Win32-Debug-Path>
|
<LibreSSL-x64-Path>$(SolutionDir)\LibreSSLSDK\x64\</LibreSSL-x64-Path>
|
||||||
<OpenSSL-x64-Release-Path>$(SolutionDir)\OpenSSLSDK\1.0.2d\x64\Release\</OpenSSL-x64-Release-Path>
|
|
||||||
<OpenSSL-x64-Debug-Path>$(SolutionDir)\OpenSSLSDK\1.0.2d\x64\Debug\</OpenSSL-x64-Debug-Path>
|
|
||||||
<!-- <UseOpenSSL>false</UseOpenSSL> -->
|
<!-- <UseOpenSSL>false</UseOpenSSL> -->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="paths.targets" />
|
<Import Project="paths.targets" />
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@ -111,14 +111,14 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -130,14 +130,14 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -159,8 +159,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -175,7 +175,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -183,8 +183,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -112,15 +112,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -132,15 +132,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -162,8 +162,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -178,7 +178,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -186,8 +186,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="paths.targets" />
|
<Import Project="paths.targets" />
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@ -115,15 +115,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -135,15 +135,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -165,8 +165,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
96
contrib/win32/openssh/ssh-add-hostkey.ps1
Normal file
96
contrib/win32/openssh/ssh-add-hostkey.ps1
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<#
|
||||||
|
Author: manoj.ampalam@microsoft.com
|
||||||
|
|
||||||
|
Description: ssh-add.exe like Powershell utility to do host key management.
|
||||||
|
Input parameter mimic ssh-add.exe cmdline arguments.
|
||||||
|
|
||||||
|
Host keys on Windows need to be registered as SYSTEM (i.e ssh-add.exe would
|
||||||
|
need to run as SYSTEM while talking to ssh-agent). This typically requires
|
||||||
|
an external utility like psexec.
|
||||||
|
|
||||||
|
This script tries to use the Task scheduler option:
|
||||||
|
- registers a task scheduler task to run ssh-add.exe operation as SYSTEM
|
||||||
|
- actual output of ssh-add.exe is written to file (both stdout and stderr)
|
||||||
|
- Dumps the file contents to console
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
# see https://linux.die.net/man/1/ssh-add for what the arguments mean
|
||||||
|
[CmdletBinding(DefaultParameterSetName='Add_key')]
|
||||||
|
Param(
|
||||||
|
[Parameter(ParameterSetName="List_fingerprints")]
|
||||||
|
[switch]$List_fingerprints, #ssh-add -l
|
||||||
|
[Parameter(ParameterSetName="List_pubkeys")]
|
||||||
|
[switch]$List_pubkeys, #ssh-add -L
|
||||||
|
[Parameter(ParameterSetName="Delete_key")]
|
||||||
|
[switch]$Delete_key, #ssh-add -d
|
||||||
|
[Parameter(ParameterSetName="Delete_all")]
|
||||||
|
[switch]$Delete_all, #ssh-add -D
|
||||||
|
[Parameter(Mandatory, Position=0, ParameterSetName="Delete_key")]
|
||||||
|
[Parameter(Mandatory, Position=0, ParameterSetName="Add_key")]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
|
[string]$key
|
||||||
|
)
|
||||||
|
|
||||||
|
$ssh_add_cmd = get-command ssh-add.exe -ErrorAction Ignore
|
||||||
|
if($ssh_add_cmd -eq $null)
|
||||||
|
{
|
||||||
|
Throw "Cannot find ssh-add.exe."
|
||||||
|
}
|
||||||
|
|
||||||
|
#create ssh-add cmdlinet
|
||||||
|
$ssh_add_cmd_str = $ssh_add_cmd.Path
|
||||||
|
if ($List_fingerprints) { $ssh_add_cmd_str += " -l" }
|
||||||
|
elseif ($List_pubkeys) { $ssh_add_cmd_str += " -L" }
|
||||||
|
elseif ($Delete_key) { $ssh_add_cmd_str += " -d $key" }
|
||||||
|
elseif ($Delete_all) { $ssh_add_cmd_str += " -D" }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( ($key.Length -gt 0) -and (-not($key.Contains("host"))) ) {
|
||||||
|
Do {
|
||||||
|
$input = Read-Host -Prompt "Are you sure the provided key is a host key? [Yes] Y; [No] N (default is `"Y`")"
|
||||||
|
if([string]::IsNullOrEmpty($input))
|
||||||
|
{
|
||||||
|
$input = 'Y'
|
||||||
|
}
|
||||||
|
} until ($input -match "^(y(es)?|N(o)?)$")
|
||||||
|
$result = $Matches[0]
|
||||||
|
if (-not($result.ToLower().Startswith('y'))) { exit }
|
||||||
|
}
|
||||||
|
$ssh_add_cmd_str += " $key"
|
||||||
|
}
|
||||||
|
|
||||||
|
#globals
|
||||||
|
$taskfolder = "\OpenSSHUtils\hostkey_tasks\"
|
||||||
|
$taskname = "hostkey_task"
|
||||||
|
$ssh_add_output = Join-Path (pwd).Path "ssh-add-hostkey-tmp.txt"
|
||||||
|
$task_argument = "/c `"$ssh_add_cmd_str > $ssh_add_output 2>&1 `""
|
||||||
|
|
||||||
|
#create TaskScheduler task
|
||||||
|
$ac = New-ScheduledTaskAction -Execute "cmd.exe" -Argument $task_argument -WorkingDirectory (pwd).path
|
||||||
|
$task = Register-ScheduledTask -TaskName $taskname -User System -Action $ac -TaskPath $taskfolder -Force
|
||||||
|
|
||||||
|
#run the task
|
||||||
|
if (Test-Path $ssh_add_output) {Remove-Item $ssh_add_output -Force}
|
||||||
|
Start-ScheduledTask -TaskPath $taskfolder -TaskName $taskname
|
||||||
|
|
||||||
|
#if still running, wait a little while for task to complete
|
||||||
|
$num = 0
|
||||||
|
while ((Get-ScheduledTask -TaskName $taskname -TaskPath $taskfolder).State -eq "Running")
|
||||||
|
{
|
||||||
|
sleep 1
|
||||||
|
$num++
|
||||||
|
if($num -gt 20) { break }
|
||||||
|
}
|
||||||
|
if (-not(Test-Path $ssh_add_output)) {throw "cannot find task output file. Something went WRONG!!! "}
|
||||||
|
|
||||||
|
#dump output to console
|
||||||
|
Get-Content $ssh_add_output
|
||||||
|
|
||||||
|
#cleanup task and output file
|
||||||
|
Remove-Item $ssh_add_output -Force
|
||||||
|
Unregister-ScheduledTask -TaskPath $taskfolder -TaskName $taskname -Confirm:$false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -113,15 +113,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>posix_compat.lib;Netapi32.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -133,15 +133,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>posix_compat.lib;Netapi32.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>posix_compat.lib;Netapi32.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -179,7 +179,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -187,8 +187,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>posix_compat.lib;Netapi32.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -104,9 +104,9 @@
|
|||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;Crypt32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;Userenv.lib;Crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||||
@ -127,9 +127,9 @@
|
|||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -137,8 +137,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;Crypt32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;Userenv.lib;Crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||||
@ -151,9 +151,9 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -161,8 +161,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;Crypt32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;Userenv.lib;Crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -176,9 +176,9 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories);$(OpenSSH-Src-Path)contrib\win32\ssh-pubkey</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -187,8 +187,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;Crypt32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;Userenv.lib;Crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -102,15 +102,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -124,15 +124,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -156,8 +156,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -174,7 +174,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -183,8 +183,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
@ -124,7 +124,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
@ -158,7 +158,7 @@
|
|||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@ -170,7 +170,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
@ -183,7 +183,7 @@
|
|||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>openbsd_compat.lib;kernel32.lib;user32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -190,8 +190,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -103,15 +103,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
@ -127,15 +127,15 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
@ -153,7 +153,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -161,8 +161,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32_ZLIB_NO;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -190,8 +190,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
<FullProgramDatabaseFile>true</FullProgramDatabaseFile>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -141,8 +141,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -169,8 +169,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -189,7 +189,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -198,8 +198,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -141,8 +141,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -169,8 +169,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -189,7 +189,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -198,8 +198,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -115,8 +115,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -138,8 +138,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -163,8 +163,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -189,8 +189,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libcrypto-41.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
@ -128,8 +128,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
@ -151,8 +151,8 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -176,8 +176,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x86-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
@ -193,7 +193,7 @@
|
|||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x600;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir);$(LibreSSL-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -202,8 +202,8 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(LibreSSL-x64-Path);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>Netapi32.lib;posix_compat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>posix_compat.lib;libssh.lib;openbsd_compat.lib;libcrypto-41.lib;Ws2_32.lib;Netapi32.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>wmainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
|
Binary file not shown.
@ -89,7 +89,7 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@ -105,11 +105,11 @@
|
|||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x600;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<SDLCheck>false</SDLCheck>
|
<SDLCheck>false</SDLCheck>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_LIB;USE_MSCNG;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>
|
||||||
</AdditionalIncludeDirectories>
|
</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_LIB;USE_MSCNG;_WIN32_WINNT=0x600;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level1</WarningLevel>
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
void fatal(const char *, ...);
|
||||||
|
void error(const char *, ...);
|
||||||
|
void verbose(const char *, ...);
|
||||||
|
void debug(const char *, ...);
|
||||||
|
void debug2(const char *, ...);
|
||||||
|
void debug3(const char *, ...);
|
||||||
|
|
||||||
/* Enable the following for verbose logging */
|
/* Enable the following for verbose logging */
|
||||||
#if (0)
|
#if (0)
|
||||||
#define debug4 debug2
|
#define debug4 debug2
|
||||||
|
@ -166,8 +166,6 @@ unsigned char*
|
|||||||
ParseBuffer(unsigned char* pszBuffer, unsigned char* pszBufferEnd, unsigned char **respbuf, size_t *resplen)
|
ParseBuffer(unsigned char* pszBuffer, unsigned char* pszBufferEnd, unsigned char **respbuf, size_t *resplen)
|
||||||
{
|
{
|
||||||
int currentX;
|
int currentX;
|
||||||
int currentY;
|
|
||||||
int bufLen, cmpLen, i;
|
|
||||||
|
|
||||||
if (!fcompletion) {
|
if (!fcompletion) {
|
||||||
if (pszBuffer < pszBufferEnd - 1) {
|
if (pszBuffer < pszBufferEnd - 1) {
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
unsigned char * ParseBuffer(unsigned char* pszBuffer, unsigned char* pszBufferEnd, unsigned char **respbuf, size_t *resplen);
|
unsigned char * ParseBuffer(unsigned char* pszBuffer, unsigned char* pszBufferEnd, unsigned char **respbuf, size_t *resplen);
|
||||||
unsigned char * GetNextChar(unsigned char * pszBuffer, unsigned char *pszBufferEnd);
|
unsigned char * GetNextChar(unsigned char * pszBuffer, unsigned char *pszBufferEnd);
|
||||||
unsigned char * ParseANSI(unsigned char * pszBuffer, unsigned char * pszBufferEnd, unsigned char **respbuf, size_t *resplen);
|
unsigned char * ParseANSI(unsigned char * pszBuffer, unsigned char * pszBufferEnd, unsigned char **respbuf, size_t *resplen);
|
||||||
|
void GoToNextLine();
|
||||||
|
|
||||||
#define true TRUE
|
#define true TRUE
|
||||||
#define false FALSE
|
#define false FALSE
|
||||||
|
@ -35,8 +35,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
#include "ansiprsr.h"
|
||||||
|
|
||||||
HANDLE hOutputConsole = NULL;
|
HANDLE hOutputConsole = NULL;
|
||||||
DWORD dwSavedAttributes = 0;
|
DWORD dwSavedAttributes = 0;
|
||||||
@ -72,16 +75,12 @@ char *consoleTitle = "OpenSSH SSH client";
|
|||||||
int
|
int
|
||||||
ConEnterRawMode(DWORD OutputHandle, BOOL fSmartInit)
|
ConEnterRawMode(DWORD OutputHandle, BOOL fSmartInit)
|
||||||
{
|
{
|
||||||
OSVERSIONINFO os;
|
|
||||||
DWORD dwAttributes = 0;
|
DWORD dwAttributes = 0;
|
||||||
DWORD dwRet = 0;
|
DWORD dwRet = 0;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
static bool bFirstConInit = true;
|
static bool bFirstConInit = true;
|
||||||
|
|
||||||
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
|
||||||
GetVersionEx(&os);
|
|
||||||
|
|
||||||
hOutputConsole = GetStdHandle(OutputHandle);
|
hOutputConsole = GetStdHandle(OutputHandle);
|
||||||
if (hOutputConsole == INVALID_HANDLE_VALUE) {
|
if (hOutputConsole == INVALID_HANDLE_VALUE) {
|
||||||
dwRet = GetLastError();
|
dwRet = GetLastError();
|
||||||
@ -117,8 +116,13 @@ ConEnterRawMode(DWORD OutputHandle, BOOL fSmartInit)
|
|||||||
|
|
||||||
dwAttributes |= (DWORD)ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
dwAttributes |= (DWORD)ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||||
|
|
||||||
if (NULL != getenv("SSH_TERM_CONHOST_PARSER"))
|
char *envValue = NULL;
|
||||||
isConHostParserEnabled = atoi(getenv("SSH_TERM_CONHOST_PARSER"));
|
_dupenv_s(&envValue, NULL, "SSH_TERM_CONHOST_PARSER");
|
||||||
|
|
||||||
|
if (NULL != envValue) {
|
||||||
|
isConHostParserEnabled = atoi(envValue);
|
||||||
|
free(envValue);
|
||||||
|
}
|
||||||
|
|
||||||
/* We use our custom ANSI parser when
|
/* We use our custom ANSI parser when
|
||||||
* a) User sets the environment variable "SSH_TERM_CONHOST_PARSER" to 0
|
* a) User sets the environment variable "SSH_TERM_CONHOST_PARSER" to 0
|
||||||
@ -1077,6 +1081,7 @@ ConMoveVisibleWindow(int offset)
|
|||||||
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
|
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
|
||||||
SMALL_RECT visibleWindowRect;
|
SMALL_RECT visibleWindowRect;
|
||||||
|
|
||||||
|
memset(&visibleWindowRect, 0, sizeof(SMALL_RECT));
|
||||||
if (GetConsoleScreenBufferInfo(hOutputConsole, &consoleInfo)) {
|
if (GetConsoleScreenBufferInfo(hOutputConsole, &consoleInfo)) {
|
||||||
/* Check if applying the offset results in console buffer overflow.
|
/* Check if applying the offset results in console buffer overflow.
|
||||||
* if yes, then scrolldown the console buffer.
|
* if yes, then scrolldown the console buffer.
|
||||||
@ -1087,6 +1092,10 @@ ConMoveVisibleWindow(int offset)
|
|||||||
|
|
||||||
if (GetConsoleScreenBufferInfo(hOutputConsole, &consoleInfo))
|
if (GetConsoleScreenBufferInfo(hOutputConsole, &consoleInfo))
|
||||||
memcpy(&visibleWindowRect, &consoleInfo.srWindow, sizeof(visibleWindowRect));
|
memcpy(&visibleWindowRect, &consoleInfo.srWindow, sizeof(visibleWindowRect));
|
||||||
|
else {
|
||||||
|
error("GetConsoleScreenBufferInfo failed with %d", GetLastError());
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
memcpy(&visibleWindowRect, &consoleInfo.srWindow, sizeof(visibleWindowRect));
|
memcpy(&visibleWindowRect, &consoleInfo.srWindow, sizeof(visibleWindowRect));
|
||||||
visibleWindowRect.Top += offset;
|
visibleWindowRect.Top += offset;
|
||||||
@ -1329,6 +1338,9 @@ ConSaveScreenHandle(SCREEN_HANDLE hScreen)
|
|||||||
|
|
||||||
if (pScreenRec == NULL) {
|
if (pScreenRec == NULL) {
|
||||||
pScreenRec = (PSCREEN_RECORD)malloc(sizeof(SCREEN_RECORD));
|
pScreenRec = (PSCREEN_RECORD)malloc(sizeof(SCREEN_RECORD));
|
||||||
|
if (pScreenRec == NULL)
|
||||||
|
fatal("out of memory");
|
||||||
|
|
||||||
pScreenRec->pScreenBuf = NULL;
|
pScreenRec->pScreenBuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1583,10 +1595,12 @@ get_console_handle(FILE *stream, DWORD * mode)
|
|||||||
if (file_num == -1) {
|
if (file_num == -1) {
|
||||||
return INVALID_HANDLE_VALUE;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
lHandle = _get_osfhandle(file_num);
|
lHandle = _get_osfhandle(file_num);
|
||||||
if (lHandle == -1 && errno == EBADF) {
|
if (lHandle == -1 && errno == EBADF) {
|
||||||
return INVALID_HANDLE_VALUE;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = GetFileType((HANDLE)lHandle);
|
type = GetFileType((HANDLE)lHandle);
|
||||||
if (type == FILE_TYPE_CHAR && file_num >= 0 && file_num <= 2) {
|
if (type == FILE_TYPE_CHAR && file_num >= 0 && file_num <= 2) {
|
||||||
if (file_num == 0)
|
if (file_num == 0)
|
||||||
|
@ -116,7 +116,7 @@ fileio_connect(struct w32_io* pio, char* name)
|
|||||||
wchar_t* name_w = NULL;
|
wchar_t* name_w = NULL;
|
||||||
wchar_t pipe_name[PATH_MAX];
|
wchar_t pipe_name[PATH_MAX];
|
||||||
HANDLE h = INVALID_HANDLE_VALUE;
|
HANDLE h = INVALID_HANDLE_VALUE;
|
||||||
int ret = 0;
|
int ret = 0, r;
|
||||||
|
|
||||||
if (pio->handle != 0 && pio->handle != INVALID_HANDLE_VALUE) {
|
if (pio->handle != 0 && pio->handle != INVALID_HANDLE_VALUE) {
|
||||||
debug3("fileio_connect called in unexpected state, pio = %p", pio);
|
debug3("fileio_connect called in unexpected state, pio = %p", pio);
|
||||||
@ -129,17 +129,27 @@ fileio_connect(struct w32_io* pio, char* name)
|
|||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
_snwprintf(pipe_name, PATH_MAX, L"\\\\.\\pipe\\%ls", name_w);
|
r = _snwprintf_s(pipe_name, PATH_MAX, PATH_MAX, L"\\\\.\\pipe\\%ls", name_w);
|
||||||
h = CreateFileW(pipe_name, GENERIC_READ | GENERIC_WRITE, 0,
|
if (r < 0 || r >= PATH_MAX) {
|
||||||
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
|
debug3("cannot create pipe name with %s", name);
|
||||||
|
errno = EOTHER;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
do {
|
||||||
|
h = CreateFileW(pipe_name, GENERIC_READ | GENERIC_WRITE, 0,
|
||||||
|
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION, NULL);
|
||||||
|
|
||||||
|
if (h != INVALID_HANDLE_VALUE)
|
||||||
|
break;
|
||||||
|
if (GetLastError() != ERROR_PIPE_BUSY)
|
||||||
|
break;
|
||||||
|
|
||||||
/* TODO - support nonblocking connect */
|
|
||||||
/* wait until we have a server pipe instance to connect */
|
|
||||||
while (h == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PIPE_BUSY) {
|
|
||||||
debug4("waiting for agent connection, retrying after 1 sec");
|
debug4("waiting for agent connection, retrying after 1 sec");
|
||||||
if ((ret = wait_for_any_event(NULL, 0, 1000) != 0) != 0)
|
if ((ret = wait_for_any_event(NULL, 0, 1000) != 0) != 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
} while(1);
|
||||||
|
|
||||||
if (h == INVALID_HANDLE_VALUE) {
|
if (h == INVALID_HANDLE_VALUE) {
|
||||||
debug3("unable to connect to pipe %ls, error: %d", name_w, GetLastError());
|
debug3("unable to connect to pipe %ls, error: %d", name_w, GetLastError());
|
||||||
@ -157,7 +167,7 @@ fileio_connect(struct w32_io* pio, char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pio->handle = h;
|
pio->handle = h;
|
||||||
h = NULL;
|
h = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (name_w)
|
if (name_w)
|
||||||
@ -333,7 +343,8 @@ createFile_flags_setup(int flags, u_short mode, struct createFile_flags* cf_flag
|
|||||||
switch (rwflags) {
|
switch (rwflags) {
|
||||||
case O_RDONLY:
|
case O_RDONLY:
|
||||||
cf_flags->dwDesiredAccess = GENERIC_READ;
|
cf_flags->dwDesiredAccess = GENERIC_READ;
|
||||||
cf_flags->dwShareMode = FILE_SHARE_READ;
|
/* refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa363874(v=vs.85).aspx */
|
||||||
|
cf_flags->dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
break;
|
break;
|
||||||
case O_WRONLY:
|
case O_WRONLY:
|
||||||
cf_flags->dwDesiredAccess = GENERIC_WRITE;
|
cf_flags->dwDesiredAccess = GENERIC_WRITE;
|
||||||
@ -355,7 +366,7 @@ createFile_flags_setup(int flags, u_short mode, struct createFile_flags* cf_flag
|
|||||||
if (c_s_flags & O_APPEND)
|
if (c_s_flags & O_APPEND)
|
||||||
cf_flags->dwDesiredAccess = FILE_APPEND_DATA;
|
cf_flags->dwDesiredAccess = FILE_APPEND_DATA;
|
||||||
|
|
||||||
cf_flags->dwFlagsAndAttributes = FILE_FLAG_OVERLAPPED | SECURITY_IMPERSONATION | FILE_FLAG_BACKUP_SEMANTICS;
|
cf_flags->dwFlagsAndAttributes = FILE_FLAG_OVERLAPPED | FILE_FLAG_BACKUP_SEMANTICS;
|
||||||
|
|
||||||
/*map mode*/
|
/*map mode*/
|
||||||
if ((pwd = getpwuid(0)) == NULL)
|
if ((pwd = getpwuid(0)) == NULL)
|
||||||
@ -526,11 +537,12 @@ fileio_ReadFileEx(struct w32_io* pio, unsigned int bytes_requested)
|
|||||||
|
|
||||||
/* read() implementation */
|
/* read() implementation */
|
||||||
int
|
int
|
||||||
fileio_read(struct w32_io* pio, void *dst, unsigned int max)
|
fileio_read(struct w32_io* pio, void *dst, size_t max_bytes)
|
||||||
{
|
{
|
||||||
int bytes_copied;
|
int bytes_copied;
|
||||||
|
|
||||||
debug5("read - io:%p remaining:%d", pio, pio->read_details.remaining);
|
debug5("read - io:%p remaining:%d", pio, pio->read_details.remaining);
|
||||||
|
|
||||||
/* if read is pending */
|
/* if read is pending */
|
||||||
if (pio->read_details.pending) {
|
if (pio->read_details.pending) {
|
||||||
if (w32_io_is_blocking(pio)) {
|
if (w32_io_is_blocking(pio)) {
|
||||||
@ -550,7 +562,7 @@ fileio_read(struct w32_io* pio, void *dst, unsigned int max)
|
|||||||
if (-1 == syncio_initiate_read(pio))
|
if (-1 == syncio_initiate_read(pio))
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
if (-1 == fileio_ReadFileEx(pio, max)) {
|
if (-1 == fileio_ReadFileEx(pio, (int)max_bytes)) {
|
||||||
if ((FILETYPE(pio) == FILE_TYPE_PIPE)
|
if ((FILETYPE(pio) == FILE_TYPE_PIPE)
|
||||||
&& (errno == ERROR_BROKEN_PIPE)) {
|
&& (errno == ERROR_BROKEN_PIPE)) {
|
||||||
/* write end of the pipe closed */
|
/* write end of the pipe closed */
|
||||||
@ -600,7 +612,7 @@ fileio_read(struct w32_io* pio, void *dst, unsigned int max)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_copied = min(max, pio->read_details.remaining);
|
bytes_copied = min((DWORD)max_bytes, pio->read_details.remaining);
|
||||||
memcpy(dst, pio->read_details.buf + pio->read_details.completed, bytes_copied);
|
memcpy(dst, pio->read_details.buf + pio->read_details.completed, bytes_copied);
|
||||||
pio->read_details.remaining -= bytes_copied;
|
pio->read_details.remaining -= bytes_copied;
|
||||||
pio->read_details.completed += bytes_copied;
|
pio->read_details.completed += bytes_copied;
|
||||||
@ -633,7 +645,7 @@ WriteCompletionRoutine(_In_ DWORD dwErrorCode,
|
|||||||
|
|
||||||
/* write() implementation */
|
/* write() implementation */
|
||||||
int
|
int
|
||||||
fileio_write(struct w32_io* pio, const void *buf, unsigned int max)
|
fileio_write(struct w32_io* pio, const void *buf, size_t max_bytes)
|
||||||
{
|
{
|
||||||
int bytes_copied;
|
int bytes_copied;
|
||||||
DWORD pipe_flags = 0, pipe_instances = 0;
|
DWORD pipe_flags = 0, pipe_instances = 0;
|
||||||
@ -673,7 +685,7 @@ fileio_write(struct w32_io* pio, const void *buf, unsigned int max)
|
|||||||
pio->write_details.buf_size = WRITE_BUFFER_SIZE;
|
pio->write_details.buf_size = WRITE_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_copied = min(max, pio->write_details.buf_size);
|
bytes_copied = min((int)max_bytes, pio->write_details.buf_size);
|
||||||
memcpy(pio->write_details.buf, buf, bytes_copied);
|
memcpy(pio->write_details.buf, buf, bytes_copied);
|
||||||
|
|
||||||
if (pio->type == NONSOCK_SYNC_FD || FILETYPE(pio) == FILE_TYPE_CHAR) {
|
if (pio->type == NONSOCK_SYNC_FD || FILETYPE(pio) == FILE_TYPE_CHAR) {
|
||||||
@ -756,7 +768,7 @@ fileio_stat(const char *path, struct _stat64 *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((wpath = utf8_to_utf16(path)) == NULL) {
|
if ((wpath = utf8_to_utf16(path)) == NULL) {
|
||||||
errno = errno_from_Win32LastError();
|
errno = ENOMEM;
|
||||||
debug3("utf8_to_utf16 failed for file:%s error:%d", path, GetLastError());
|
debug3("utf8_to_utf16 failed for file:%s error:%d", path, GetLastError());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -767,7 +779,7 @@ fileio_stat(const char *path, struct _stat64 *buf)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = wcslen(wpath);
|
len = (int)wcslen(wpath);
|
||||||
|
|
||||||
buf->st_ino = 0; /* Has no meaning in the FAT, HPFS, or NTFS file systems*/
|
buf->st_ino = 0; /* Has no meaning in the FAT, HPFS, or NTFS file systems*/
|
||||||
buf->st_gid = 0; /* UNIX - specific; has no meaning on windows */
|
buf->st_gid = 0; /* UNIX - specific; has no meaning on windows */
|
||||||
|
@ -8,3 +8,6 @@
|
|||||||
char *w32_strerror(int);
|
char *w32_strerror(int);
|
||||||
#define strerror w32_strerror
|
#define strerror w32_strerror
|
||||||
#define strdup _strdup
|
#define strdup _strdup
|
||||||
|
#define ERROR_MSG_MAXLEN 94 /* https://msdn.microsoft.com/en-us/library/51sah927.aspx */
|
||||||
|
|
||||||
|
static char errorBuf[ERROR_MSG_MAXLEN];
|
@ -4,6 +4,7 @@
|
|||||||
* POSIX header and needed function definitions
|
* POSIX header and needed function definitions
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <stddef.h>
|
||||||
#include "sys\types.h"
|
#include "sys\types.h"
|
||||||
#include "fcntl.h"
|
#include "fcntl.h"
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ int w32_pipe(int *pfds);
|
|||||||
int w32_read(int fd, void *dst, size_t max);
|
int w32_read(int fd, void *dst, size_t max);
|
||||||
|
|
||||||
#define write w32_write
|
#define write w32_write
|
||||||
int w32_write(int fd, const void *buf, unsigned int max);
|
int w32_write(int fd, const void *buf, size_t max);
|
||||||
|
|
||||||
#define writev w32_writev
|
#define writev w32_writev
|
||||||
int w32_writev(int fd, const struct iovec *iov, int iovcnt);
|
int w32_writev(int fd, const struct iovec *iov, int iovcnt);
|
||||||
@ -78,7 +79,7 @@ int daemon(int nochdir, int noclose);
|
|||||||
char *crypt(const char *key, const char *salt);
|
char *crypt(const char *key, const char *salt);
|
||||||
int link(const char *oldpath, const char *newpath);
|
int link(const char *oldpath, const char *newpath);
|
||||||
int readlink(const char *path, char *link, int linklen);
|
int readlink(const char *path, char *link, int linklen);
|
||||||
int spawn_child(char*, char**, int, int, int, DWORD);
|
int spawn_child(char*, char**, int, int, int, unsigned long);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* readpassphrase.h definitions
|
* readpassphrase.h definitions
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <Shlwapi.h>
|
#include <Shlwapi.h>
|
||||||
|
#include <conio.h>
|
||||||
|
|
||||||
#include "inc\unistd.h"
|
#include "inc\unistd.h"
|
||||||
#include "inc\sys\stat.h"
|
#include "inc\sys\stat.h"
|
||||||
@ -46,6 +47,8 @@
|
|||||||
#include "inc\utf.h"
|
#include "inc\utf.h"
|
||||||
#include "signal_internal.h"
|
#include "signal_internal.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "w32fd.h"
|
||||||
|
#include "inc\string.h"
|
||||||
|
|
||||||
static char* s_programdir = NULL;
|
static char* s_programdir = NULL;
|
||||||
|
|
||||||
@ -266,8 +269,11 @@ w32_fopen_utf8(const char *path, const char *mode)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
f = _wfopen(wpath, wmode);
|
if ((_wfopen_s(&f, wpath, wmode) != 0) || (f == NULL)) {
|
||||||
if (f) {
|
debug3("Failed to open file:%s error:%d", path, errno);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* BOM adjustments for file streams*/
|
/* BOM adjustments for file streams*/
|
||||||
if (mode[0] == 'w' && fseek(f, 0, SEEK_SET) != EBADF) {
|
if (mode[0] == 'w' && fseek(f, 0, SEEK_SET) != EBADF) {
|
||||||
/* write UTF-8 BOM - should we ?*/
|
/* write UTF-8 BOM - should we ?*/
|
||||||
@ -283,7 +289,6 @@ w32_fopen_utf8(const char *path, const char *mode)
|
|||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
@ -334,7 +339,7 @@ char*
|
|||||||
if((actual_read + strlen(str_tmp)) >= n)
|
if((actual_read + strlen(str_tmp)) >= n)
|
||||||
break;
|
break;
|
||||||
memcpy(cp, str_tmp, strlen(str_tmp));
|
memcpy(cp, str_tmp, strlen(str_tmp));
|
||||||
actual_read += strlen(str_tmp);
|
actual_read += (int)strlen(str_tmp);
|
||||||
cp += strlen(str_tmp);
|
cp += strlen(str_tmp);
|
||||||
|
|
||||||
} while ((actual_read < n - 1) && *str_tmp != '\n');
|
} while ((actual_read < n - 1) && *str_tmp != '\n');
|
||||||
@ -386,10 +391,15 @@ w32_setvbuf(FILE *stream, char *buffer, int mode, size_t size) {
|
|||||||
char *
|
char *
|
||||||
w32_programdir()
|
w32_programdir()
|
||||||
{
|
{
|
||||||
|
wchar_t* wpgmptr;
|
||||||
|
|
||||||
if (s_programdir != NULL)
|
if (s_programdir != NULL)
|
||||||
return s_programdir;
|
return s_programdir;
|
||||||
|
|
||||||
if ((s_programdir = utf16_to_utf8(_wpgmptr)) == NULL)
|
if (_get_wpgmptr(&wpgmptr) != 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if ((s_programdir = utf16_to_utf8(wpgmptr)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* null terminate after directory path */
|
/* null terminate after directory path */
|
||||||
@ -440,6 +450,7 @@ w32_ioctl(int d, int request, ...)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* p should be at least 12 bytes long*/
|
||||||
void
|
void
|
||||||
strmode(mode_t mode, char *p)
|
strmode(mode_t mode, char *p)
|
||||||
{
|
{
|
||||||
@ -468,76 +479,13 @@ strmode(mode_t mode, char *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The below code is commented as the group, other is not applicable on the windows.
|
/* The below code is commented as the group, other is not applicable on the windows.
|
||||||
* This will be properly fixed in next releases.
|
|
||||||
* As of now we are keeping "*" for everything.
|
* As of now we are keeping "*" for everything.
|
||||||
|
* TODO - figure out if there is a better option
|
||||||
*/
|
*/
|
||||||
const char *permissions = "********* ";
|
const char *permissions = "********* ";
|
||||||
strncpy(p, permissions, strlen(permissions) + 1);
|
for(int i = 0; i < strlen(permissions); i++)
|
||||||
p = p + strlen(p);
|
*p++ = permissions[i];
|
||||||
/* //usr
|
|
||||||
if (mode & S_IRUSR)
|
|
||||||
*p++ = 'r';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
if (mode & S_IWUSR)
|
|
||||||
*p++ = 'w';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
switch (mode & (S_IXUSR)) {
|
|
||||||
case 0:
|
|
||||||
*p++ = '-';
|
|
||||||
break;
|
|
||||||
case S_IXUSR:
|
|
||||||
*p++ = 'x';
|
|
||||||
break;
|
|
||||||
//case S_ISUID:
|
|
||||||
// *p++ = 'S';
|
|
||||||
// break;
|
|
||||||
//case S_IXUSR | S_ISUID:
|
|
||||||
// *p++ = 's';
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
// group
|
|
||||||
if (mode & S_IRGRP)
|
|
||||||
*p++ = 'r';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
if (mode & S_IWGRP)
|
|
||||||
*p++ = 'w';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
switch (mode & (S_IXGRP)) {
|
|
||||||
case 0:
|
|
||||||
*p++ = '-';
|
|
||||||
break;
|
|
||||||
case S_IXGRP:
|
|
||||||
*p++ = 'x';
|
|
||||||
break;
|
|
||||||
//case S_ISGID:
|
|
||||||
// *p++ = 'S';
|
|
||||||
// break;
|
|
||||||
//case S_IXGRP | S_ISGID:
|
|
||||||
// *p++ = 's';
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
// other
|
|
||||||
if (mode & S_IROTH)
|
|
||||||
*p++ = 'r';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
if (mode & S_IWOTH)
|
|
||||||
*p++ = 'w';
|
|
||||||
else
|
|
||||||
*p++ = '-';
|
|
||||||
switch (mode & (S_IXOTH)) {
|
|
||||||
case 0:
|
|
||||||
*p++ = '-';
|
|
||||||
break;
|
|
||||||
case S_IXOTH:
|
|
||||||
*p++ = 'x';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*p++ = ' '; // will be a '+' if ACL's implemented */
|
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,11 +535,10 @@ static BOOL
|
|||||||
is_root_or_empty(wchar_t * path)
|
is_root_or_empty(wchar_t * path)
|
||||||
{
|
{
|
||||||
wchar_t * path_start;
|
wchar_t * path_start;
|
||||||
BOOL has_drive_letter_and_colon;
|
|
||||||
int len;
|
int len;
|
||||||
if (!path)
|
if (!path)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
len = wcslen(path);
|
len = (int)wcslen(path);
|
||||||
if((len > 1) && __ascii_iswalpha(path[0]) && path[1] == L':')
|
if((len > 1) && __ascii_iswalpha(path[0]) && path[1] == L':')
|
||||||
path_start = path + 2;
|
path_start = path + 2;
|
||||||
else
|
else
|
||||||
@ -713,7 +660,7 @@ w32_rename(const char *old_name, const char *new_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To be consistent with linux rename(),
|
* To be consistent with POSIX rename(),
|
||||||
* 1) if the new_name is file, then delete it so that _wrename will succeed.
|
* 1) if the new_name is file, then delete it so that _wrename will succeed.
|
||||||
* 2) if the new_name is directory and it is empty then delete it so that _wrename will succeed.
|
* 2) if the new_name is directory and it is empty then delete it so that _wrename will succeed.
|
||||||
*/
|
*/
|
||||||
@ -793,11 +740,21 @@ w32_getcwd(char *buffer, int maxlen)
|
|||||||
wchar_t wdirname[PATH_MAX];
|
wchar_t wdirname[PATH_MAX];
|
||||||
char* putf8 = NULL;
|
char* putf8 = NULL;
|
||||||
|
|
||||||
_wgetcwd(&wdirname[0], PATH_MAX);
|
if (_wgetcwd(wdirname, PATH_MAX) == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if ((putf8 = utf16_to_utf8(&wdirname[0])) == NULL)
|
if ((putf8 = utf16_to_utf8(wdirname)) == NULL) {
|
||||||
fatal("failed to convert input arguments");
|
errno = ENOMEM;
|
||||||
strcpy(buffer, putf8);
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(putf8) >= maxlen) {
|
||||||
|
errno = ERANGE;
|
||||||
|
free(putf8);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy_s(buffer, maxlen, putf8);
|
||||||
free(putf8);
|
free(putf8);
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
@ -806,6 +763,7 @@ w32_getcwd(char *buffer, int maxlen)
|
|||||||
int
|
int
|
||||||
w32_mkdir(const char *path_utf8, unsigned short mode)
|
w32_mkdir(const char *path_utf8, unsigned short mode)
|
||||||
{
|
{
|
||||||
|
int curmask;
|
||||||
wchar_t *path_utf16 = utf8_to_utf16(sanitized_path(path_utf8));
|
wchar_t *path_utf16 = utf8_to_utf16(sanitized_path(path_utf8));
|
||||||
if (path_utf16 == NULL) {
|
if (path_utf16 == NULL) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@ -817,8 +775,9 @@ w32_mkdir(const char *path_utf8, unsigned short mode)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode_t curmask = _umask(0);
|
errno_t error = _umask_s(0, &curmask);
|
||||||
_umask(curmask);
|
if(!error)
|
||||||
|
_umask_s(curmask, &curmask);
|
||||||
|
|
||||||
returnStatus = _wchmod(path_utf16, mode & ~curmask & (_S_IREAD | _S_IWRITE));
|
returnStatus = _wchmod(path_utf16, mode & ~curmask & (_S_IREAD | _S_IWRITE));
|
||||||
free(path_utf16);
|
free(path_utf16);
|
||||||
@ -882,11 +841,17 @@ realpath(const char *path, char resolved[PATH_MAX])
|
|||||||
if (!path || !resolved) return NULL;
|
if (!path || !resolved) return NULL;
|
||||||
|
|
||||||
char tempPath[PATH_MAX];
|
char tempPath[PATH_MAX];
|
||||||
|
size_t path_len = strlen(path);
|
||||||
|
|
||||||
if ((path[0] == '/') && path[1] && (path[2] == ':'))
|
if (path_len > PATH_MAX - 1) {
|
||||||
strncpy(resolved, path + 1, PATH_MAX); /* skip the first '/' */
|
errno = EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((path_len >= 2) && (path[0] == '/') && path[1] && (path[2] == ':'))
|
||||||
|
strncpy_s(resolved, PATH_MAX, path + 1, path_len); /* skip the first '/' */
|
||||||
else
|
else
|
||||||
strncpy(resolved, path, PATH_MAX);
|
strncpy_s(resolved, PATH_MAX, path, path_len + 1);
|
||||||
|
|
||||||
if ((resolved[0]) && (resolved[1] == ':') && (resolved[2] == '\0')) { /* make "x:" as "x:\\" */
|
if ((resolved[0]) && (resolved[1] == ':') && (resolved[2] == '\0')) { /* make "x:" as "x:\\" */
|
||||||
resolved[2] = '\\';
|
resolved[2] = '\\';
|
||||||
@ -899,7 +864,8 @@ realpath(const char *path, char resolved[PATH_MAX])
|
|||||||
convertToForwardslash(tempPath);
|
convertToForwardslash(tempPath);
|
||||||
|
|
||||||
resolved[0] = '/'; /* will be our first slash in /x:/users/test1 format */
|
resolved[0] = '/'; /* will be our first slash in /x:/users/test1 format */
|
||||||
strncpy(resolved + 1, tempPath, PATH_MAX - 1);
|
if (strncpy_s(resolved+1, PATH_MAX - 1, tempPath, sizeof(tempPath) - 1) != 0)
|
||||||
|
return NULL;
|
||||||
return resolved;
|
return resolved;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,7 +879,7 @@ sanitized_path(const char *path)
|
|||||||
if (path[0] == '/' && path[1]) {
|
if (path[0] == '/' && path[1]) {
|
||||||
if (path[2] == ':') {
|
if (path[2] == ':') {
|
||||||
if (path[3] == '\0') { /* make "/x:" as "x:\\" */
|
if (path[3] == '\0') { /* make "/x:" as "x:\\" */
|
||||||
strncpy(newPath, path + 1, strlen(path) - 1);
|
strncpy_s(newPath, sizeof(PATH_MAX), path + 1, strlen(path) - 1);
|
||||||
newPath[2] = '\\';
|
newPath[2] = '\\';
|
||||||
newPath[3] = '\0';
|
newPath[3] = '\0';
|
||||||
|
|
||||||
@ -926,70 +892,6 @@ sanitized_path(const char *path)
|
|||||||
return (char *)path;
|
return (char *)path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
|
||||||
ResolveLink(wchar_t * tLink, wchar_t *ret, DWORD * plen, DWORD Flags)
|
|
||||||
{
|
|
||||||
HANDLE fileHandle;
|
|
||||||
BYTE reparseBuffer[MAX_REPARSE_SIZE];
|
|
||||||
PBYTE reparseData;
|
|
||||||
PREPARSE_GUID_DATA_BUFFER reparseInfo = (PREPARSE_GUID_DATA_BUFFER)reparseBuffer;
|
|
||||||
PREPARSE_DATA_BUFFER msReparseInfo = (PREPARSE_DATA_BUFFER)reparseBuffer;
|
|
||||||
DWORD returnedLength;
|
|
||||||
|
|
||||||
if (Flags & FILE_ATTRIBUTE_DIRECTORY) {
|
|
||||||
fileHandle = CreateFileW(tLink, 0,
|
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
|
||||||
OPEN_EXISTING,
|
|
||||||
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* Open the file */
|
|
||||||
fileHandle = CreateFileW(tLink, 0,
|
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
|
||||||
OPEN_EXISTING,
|
|
||||||
FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fileHandle == INVALID_HANDLE_VALUE) {
|
|
||||||
swprintf_s(ret, *plen, L"%ls", tLink);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetFileAttributesW(tLink) & FILE_ATTRIBUTE_REPARSE_POINT) {
|
|
||||||
if (DeviceIoControl(fileHandle, FSCTL_GET_REPARSE_POINT,
|
|
||||||
NULL, 0, reparseInfo, sizeof(reparseBuffer),
|
|
||||||
&returnedLength, NULL)) {
|
|
||||||
if (IsReparseTagMicrosoft(reparseInfo->ReparseTag)) {
|
|
||||||
switch (reparseInfo->ReparseTag) {
|
|
||||||
case 0x80000000 | IO_REPARSE_TAG_SYMBOLIC_LINK:
|
|
||||||
case IO_REPARSE_TAG_MOUNT_POINT:
|
|
||||||
if (*plen >= msReparseInfo->MountPointReparseBuffer.SubstituteNameLength) {
|
|
||||||
reparseData = (PBYTE)&msReparseInfo->SymbolicLinkReparseBuffer.PathBuffer;
|
|
||||||
WCHAR temp[1024];
|
|
||||||
wcsncpy_s(temp, 1024,
|
|
||||||
(PWCHAR)(reparseData + msReparseInfo->MountPointReparseBuffer.SubstituteNameOffset),
|
|
||||||
(size_t)msReparseInfo->MountPointReparseBuffer.SubstituteNameLength);
|
|
||||||
temp[msReparseInfo->MountPointReparseBuffer.SubstituteNameLength] = 0;
|
|
||||||
swprintf_s(ret, *plen, L"%ls", &temp[4]);
|
|
||||||
} else {
|
|
||||||
swprintf_s(ret, *plen, L"%ls", tLink);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
swprintf_s(ret, *plen, L"%ls", tLink);
|
|
||||||
|
|
||||||
CloseHandle(fileHandle);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
statvfs(const char *path, struct statvfs *buf)
|
statvfs(const char *path, struct statvfs *buf)
|
||||||
{
|
{
|
||||||
@ -1042,60 +944,67 @@ w32_strerror(int errnum)
|
|||||||
{
|
{
|
||||||
if (errnum >= EADDRINUSE && errnum <= EWOULDBLOCK)
|
if (errnum >= EADDRINUSE && errnum <= EWOULDBLOCK)
|
||||||
return _sys_errlist_ext[errnum - EADDRINUSE];
|
return _sys_errlist_ext[errnum - EADDRINUSE];
|
||||||
return strerror(errnum);
|
|
||||||
|
strerror_s(errorBuf, ERROR_MSG_MAXLEN, errnum);
|
||||||
|
return errorBuf;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Temporary implementation of readpassphrase.
|
|
||||||
* TODO - this needs to be reimplemented as per
|
|
||||||
* https://linux.die.net/man/3/readpassphrase
|
|
||||||
*/
|
|
||||||
char *
|
char *
|
||||||
readpassphrase(const char *prompt, char *out, size_t out_len, int flags) {
|
readpassphrase(const char *prompt, char *outBuf, size_t outBufLen, int flags) {
|
||||||
char *askpass = NULL;
|
int current_index = 0;
|
||||||
char *ret = NULL;
|
char ch;
|
||||||
|
wchar_t* wtmp = NULL;
|
||||||
|
|
||||||
DWORD mode;
|
if (outBufLen == 0) {
|
||||||
size_t len = 0;
|
errno = EINVAL;
|
||||||
int retr = 0;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* prompt user */
|
while (_kbhit()) _getch();
|
||||||
wchar_t* wtmp = utf8_to_utf16(prompt);
|
|
||||||
|
wtmp = utf8_to_utf16(prompt);
|
||||||
if (wtmp == NULL)
|
if (wtmp == NULL)
|
||||||
fatal("unable to alloc memory");
|
fatal("unable to alloc memory");
|
||||||
|
|
||||||
_cputws(wtmp);
|
_cputws(wtmp);
|
||||||
free(wtmp);
|
free(wtmp);
|
||||||
|
|
||||||
len = retr = 0;
|
while (current_index < outBufLen - 1) {
|
||||||
|
ch = _getch();
|
||||||
|
|
||||||
while (_kbhit())
|
if (ch == '\r') {
|
||||||
_getch();
|
if (_kbhit()) _getch(); /* read linefeed if its there */
|
||||||
|
|
||||||
while (len < out_len) {
|
|
||||||
out[len] = (unsigned char)_getch();
|
|
||||||
|
|
||||||
if (out[len] == '\r') {
|
|
||||||
if (_kbhit()) /* read linefeed if its there */
|
|
||||||
_getch();
|
|
||||||
break;
|
break;
|
||||||
}
|
} else if (ch == '\n') {
|
||||||
else if (out[len] == '\n') {
|
|
||||||
break;
|
break;
|
||||||
|
} else if (ch == '\b') { /* backspace */
|
||||||
|
if (current_index > 0) {
|
||||||
|
if (flags & RPP_ECHO_ON)
|
||||||
|
printf("%c \b", ch);
|
||||||
|
|
||||||
|
current_index--; /* overwrite last character */
|
||||||
}
|
}
|
||||||
else if (out[len] == '\b') { /* backspace */
|
} else if (ch == '\003') { /* exit on Ctrl+C */
|
||||||
if (len > 0)
|
|
||||||
len--; /* overwrite last character */
|
|
||||||
}
|
|
||||||
else if (out[len] == '\003') {
|
|
||||||
/* exit on Ctrl+C */
|
|
||||||
fatal("");
|
fatal("");
|
||||||
|
} else {
|
||||||
|
if (flags & RPP_SEVENBIT)
|
||||||
|
ch &= 0x7f;
|
||||||
|
|
||||||
|
if (isalpha((unsigned char)ch)) {
|
||||||
|
if(flags & RPP_FORCELOWER)
|
||||||
|
ch = tolower((unsigned char)ch);
|
||||||
|
if(flags & RPP_FORCEUPPER)
|
||||||
|
ch = toupper((unsigned char)ch);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
len++; /* keep reading in the loop */
|
outBuf[current_index++] = ch;
|
||||||
|
if(flags & RPP_ECHO_ON)
|
||||||
|
printf("%c", ch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out[len] = '\0'; /* get rid of the cr/lf */
|
outBuf[current_index] = '\0';
|
||||||
_cputs("\n"); /*show a newline as we do not echo password or the line */
|
_cputs("\n");
|
||||||
|
|
||||||
return out;
|
return outBuf;
|
||||||
}
|
}
|
@ -26,5 +26,8 @@ void convertToBackslash(char *str);
|
|||||||
void convertToBackslashW(wchar_t *str);
|
void convertToBackslashW(wchar_t *str);
|
||||||
void convertToForwardslash(char *str);
|
void convertToForwardslash(char *str);
|
||||||
|
|
||||||
|
#define errno_from_Win32LastError() errno_from_Win32Error(GetLastError())
|
||||||
|
int errno_from_Win32Error(int);
|
||||||
void unix_time_to_file_time(ULONG, LPFILETIME);
|
void unix_time_to_file_time(ULONG, LPFILETIME);
|
||||||
void file_time_unix_time(const LPFILETIME, time_t *);
|
void file_time_to_unix_time(const LPFILETIME, time_t *);
|
||||||
|
int file_attr_to_st_mode(wchar_t * path, DWORD attributes);
|
@ -157,7 +157,11 @@ get_passwd(const char *user_utf8, LPWSTR user_sid)
|
|||||||
if (swprintf(reg_path, PATH_MAX, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\%ls", user_sid) == PATH_MAX ||
|
if (swprintf(reg_path, PATH_MAX, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\%ls", user_sid) == PATH_MAX ||
|
||||||
RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_WOW64_64KEY, ®_key) != 0 ||
|
RegOpenKeyExW(HKEY_LOCAL_MACHINE, reg_path, 0, STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_WOW64_64KEY, ®_key) != 0 ||
|
||||||
RegQueryValueExW(reg_key, L"ProfileImagePath", 0, NULL, (LPBYTE)profile_home, &tmp_len) != 0)
|
RegQueryValueExW(reg_key, L"ProfileImagePath", 0, NULL, (LPBYTE)profile_home, &tmp_len) != 0)
|
||||||
GetWindowsDirectoryW(profile_home, PATH_MAX);
|
if (GetWindowsDirectoryW(profile_home, PATH_MAX) == 0) {
|
||||||
|
debug3("GetWindowsDirectoryW failed with %d", GetLastError());
|
||||||
|
errno = EOTHER;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if ((uname_utf8 = utf16_to_utf8(uname_utf16)) == NULL ||
|
if ((uname_utf8 = utf16_to_utf8(uname_utf16)) == NULL ||
|
||||||
(udom_utf16 && (udom_utf8 = utf16_to_utf8(udom_utf16)) == NULL) ||
|
(udom_utf16 && (udom_utf8 = utf16_to_utf8(udom_utf16)) == NULL) ||
|
||||||
@ -167,9 +171,9 @@ get_passwd(const char *user_utf8, LPWSTR user_sid)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
uname_upn_len = strlen(uname_utf8) + 1;
|
uname_upn_len = (DWORD) strlen(uname_utf8) + 1;
|
||||||
if (udom_utf8)
|
if (udom_utf8)
|
||||||
uname_upn_len += strlen(udom_utf8) + 1;
|
uname_upn_len += (DWORD)strlen(udom_utf8) + 1;
|
||||||
|
|
||||||
if ((uname_upn = malloc(uname_upn_len)) == NULL) {
|
if ((uname_upn = malloc(uname_upn_len)) == NULL) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
|
@ -86,52 +86,55 @@ typedef struct consoleEvent {
|
|||||||
} consoleEvent;
|
} consoleEvent;
|
||||||
|
|
||||||
struct key_translation {
|
struct key_translation {
|
||||||
char incoming[6];
|
wchar_t in[6];
|
||||||
int vk;
|
int vk;
|
||||||
char outgoing;
|
wchar_t out;
|
||||||
|
int in_key_len;
|
||||||
} key_translation;
|
} key_translation;
|
||||||
|
|
||||||
|
/* All the substrings (Ex- "\x1b") should be in the end, otherwise ProcessIncomingKeys() will not work as expected */
|
||||||
struct key_translation keys[] = {
|
struct key_translation keys[] = {
|
||||||
{ "\x1b", VK_ESCAPE, '\x1b' },
|
{ L"\r", VK_RETURN, L'\r' , 0},
|
||||||
{ "\r", VK_RETURN, '\r' },
|
{ L"\b", VK_BACK, L'\b' , 0},
|
||||||
{ "\b", VK_BACK, '\b' },
|
{ L"\x7f", VK_BACK, L'\b' , 0},
|
||||||
{ "\x7f", VK_BACK, '\b' },
|
{ L"\t", VK_TAB, L'\t' , 0},
|
||||||
{ "\t", VK_TAB, '\t' },
|
{ L"\x1b[A", VK_UP, 0 , 0},
|
||||||
{ "\x1b[A", VK_UP, 0 },
|
{ L"\x1b[B", VK_DOWN, 0 , 0},
|
||||||
{ "\x1b[B", VK_DOWN, 0 },
|
{ L"\x1b[C", VK_RIGHT, 0 , 0},
|
||||||
{ "\x1b[C", VK_RIGHT, 0 },
|
{ L"\x1b[D", VK_LEFT, 0 , 0},
|
||||||
{ "\x1b[D", VK_LEFT, 0 },
|
{ L"\x1b[1~", VK_HOME, 0 , 0},
|
||||||
{ "\x1b[1~", VK_HOME, 0 },
|
{ L"\x1b[2~", VK_INSERT, 0 , 0},
|
||||||
{ "\x1b[2~", VK_INSERT, 0 },
|
{ L"\x1b[3~", VK_DELETE, 0 , 0},
|
||||||
{ "\x1b[3~", VK_DELETE, 0 },
|
{ L"\x1b[4~", VK_END, 0 , 0},
|
||||||
{ "\x1b[4~", VK_END, 0 },
|
{ L"\x1b[5~", VK_PRIOR, 0 , 0},
|
||||||
{ "\x1b[5~", VK_PRIOR, 0 },
|
{ L"\x1b[6~", VK_NEXT, 0 , 0},
|
||||||
{ "\x1b[6~", VK_NEXT, 0 },
|
{ L"\x1b[11~", VK_F1, 0 , 0},
|
||||||
{ "\x1b[11~", VK_F1, 0 },
|
{ L"\x1b[12~", VK_F2, 0 , 0},
|
||||||
{ "\x1b[12~", VK_F2, 0 },
|
{ L"\x1b[13~", VK_F3, 0 , 0},
|
||||||
{ "\x1b[13~", VK_F3, 0 },
|
{ L"\x1b[14~", VK_F4, 0 , 0},
|
||||||
{ "\x1b[14~", VK_F4, 0 },
|
{ L"\x1b[15~", VK_F5, 0 , 0},
|
||||||
{ "\x1b[15~", VK_F5, 0 },
|
{ L"\x1b[17~", VK_F6, 0 , 0},
|
||||||
{ "\x1b[17~", VK_F6, 0 },
|
{ L"\x1b[18~", VK_F7, 0 , 0},
|
||||||
{ "\x1b[18~", VK_F7, 0 },
|
{ L"\x1b[19~", VK_F8, 0 , 0},
|
||||||
{ "\x1b[19~", VK_F8, 0 },
|
{ L"\x1b[20~", VK_F9, 0 , 0},
|
||||||
{ "\x1b[20~", VK_F9, 0 },
|
{ L"\x1b[21~", VK_F10, 0 , 0},
|
||||||
{ "\x1b[21~", VK_F10, 0 },
|
{ L"\x1b[23~", VK_F11, 0 , 0},
|
||||||
{ "\x1b[23~", VK_F11, 0 },
|
{ L"\x1b[24~", VK_F12, 0 , 0},
|
||||||
{ "\x1b[24~", VK_F12, 0 }
|
{ L"\x1b", VK_ESCAPE, L'\x1b' , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SHORT lastX = 0;
|
static SHORT lastX = 0;
|
||||||
static SHORT lastY = 0;
|
static SHORT lastY = 0;
|
||||||
|
SHORT currentLine = 0;
|
||||||
consoleEvent* head = NULL;
|
consoleEvent* head = NULL;
|
||||||
consoleEvent* tail = NULL;
|
consoleEvent* tail = NULL;
|
||||||
|
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
BOOL bNoScrollRegion = FALSE;
|
BOOL bNoScrollRegion = FALSE;
|
||||||
BOOL bStartup = TRUE;
|
BOOL bStartup = TRUE;
|
||||||
BOOL bAnsi = FALSE;
|
|
||||||
BOOL bHookEvents = FALSE;
|
BOOL bHookEvents = FALSE;
|
||||||
|
BOOL bFullScreen = FALSE;
|
||||||
|
BOOL bUseAnsiEmulation = TRUE;
|
||||||
|
|
||||||
HANDLE child_out = INVALID_HANDLE_VALUE;
|
HANDLE child_out = INVALID_HANDLE_VALUE;
|
||||||
HANDLE child_in = INVALID_HANDLE_VALUE;
|
HANDLE child_in = INVALID_HANDLE_VALUE;
|
||||||
@ -140,32 +143,25 @@ HANDLE pipe_in = INVALID_HANDLE_VALUE;
|
|||||||
HANDLE pipe_out = INVALID_HANDLE_VALUE;
|
HANDLE pipe_out = INVALID_HANDLE_VALUE;
|
||||||
HANDLE pipe_err = INVALID_HANDLE_VALUE;
|
HANDLE pipe_err = INVALID_HANDLE_VALUE;
|
||||||
HANDLE child = INVALID_HANDLE_VALUE;
|
HANDLE child = INVALID_HANDLE_VALUE;
|
||||||
DWORD child_exit_code = 0;
|
|
||||||
HANDLE hConsoleBuffer = INVALID_HANDLE_VALUE;
|
HANDLE hConsoleBuffer = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
HANDLE monitor_thread = INVALID_HANDLE_VALUE;
|
HANDLE monitor_thread = INVALID_HANDLE_VALUE;
|
||||||
HANDLE io_thread = INVALID_HANDLE_VALUE;
|
HANDLE io_thread = INVALID_HANDLE_VALUE;
|
||||||
HANDLE ux_thread = INVALID_HANDLE_VALUE;
|
HANDLE ux_thread = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
|
DWORD child_exit_code = 0;
|
||||||
DWORD hostProcessId = 0;
|
DWORD hostProcessId = 0;
|
||||||
DWORD hostThreadId = 0;
|
DWORD hostThreadId = 0;
|
||||||
DWORD childProcessId = 0;
|
DWORD childProcessId = 0;
|
||||||
DWORD dwStatus = 0;
|
DWORD dwStatus = 0;
|
||||||
DWORD currentLine = 0;
|
DWORD in_cmd_len = 0;
|
||||||
DWORD lastLineLength = 0;
|
DWORD lastLineLength = 0;
|
||||||
|
|
||||||
UINT cp = 0;
|
UINT cp = 0;
|
||||||
|
|
||||||
UINT ViewPortY = 0;
|
UINT ViewPortY = 0;
|
||||||
UINT lastViewPortY = 0;
|
UINT lastViewPortY = 0;
|
||||||
|
|
||||||
BOOL bFullScreen = FALSE;
|
|
||||||
BOOL bUseAnsiEmulation = TRUE;
|
|
||||||
|
|
||||||
UINT savedViewPortY = 0;
|
UINT savedViewPortY = 0;
|
||||||
UINT savedLastViewPortY = 0;
|
UINT savedLastViewPortY = 0;
|
||||||
|
|
||||||
DWORD in_cmd_len = 0;
|
|
||||||
char in_cmd[MAX_CMD_LEN];
|
char in_cmd[MAX_CMD_LEN];
|
||||||
|
|
||||||
CRITICAL_SECTION criticalSection;
|
CRITICAL_SECTION criticalSection;
|
||||||
@ -200,7 +196,7 @@ ConSRWidth()
|
|||||||
* This function will handle the console keystrokes.
|
* This function will handle the console keystrokes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
SendKeyStroke(HANDLE hInput, int keyStroke, char character)
|
SendKeyStroke(HANDLE hInput, int keyStroke, wchar_t character)
|
||||||
{
|
{
|
||||||
DWORD wr = 0;
|
DWORD wr = 0;
|
||||||
INPUT_RECORD ir;
|
INPUT_RECORD ir;
|
||||||
@ -211,32 +207,48 @@ SendKeyStroke(HANDLE hInput, int keyStroke, char character)
|
|||||||
ir.Event.KeyEvent.wVirtualKeyCode = keyStroke;
|
ir.Event.KeyEvent.wVirtualKeyCode = keyStroke;
|
||||||
ir.Event.KeyEvent.wVirtualScanCode = 0;
|
ir.Event.KeyEvent.wVirtualScanCode = 0;
|
||||||
ir.Event.KeyEvent.dwControlKeyState = 0;
|
ir.Event.KeyEvent.dwControlKeyState = 0;
|
||||||
ir.Event.KeyEvent.uChar.UnicodeChar = 0;
|
ir.Event.KeyEvent.uChar.UnicodeChar = character;
|
||||||
ir.Event.KeyEvent.uChar.AsciiChar = character;
|
|
||||||
|
|
||||||
WriteConsoleInputA(hInput, &ir, 1, &wr);
|
WriteConsoleInputW(hInput, &ir, 1, &wr);
|
||||||
|
|
||||||
ir.Event.KeyEvent.bKeyDown = FALSE;
|
ir.Event.KeyEvent.bKeyDown = FALSE;
|
||||||
WriteConsoleInputA(hInput, &ir, 1, &wr);
|
WriteConsoleInputW(hInput, &ir, 1, &wr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
initialize_keylen()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < ARRAYSIZE(keys); i++)
|
||||||
|
keys[i].in_key_len = (int) wcslen(keys[i].in);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessIncomingKeys(char * ansikey)
|
ProcessIncomingKeys(char * ansikey)
|
||||||
{
|
{
|
||||||
int keylen = (int)strlen(ansikey);
|
wchar_t *buf = utf8_to_utf16(ansikey);
|
||||||
|
|
||||||
if (!keylen)
|
if (!buf) {
|
||||||
return;
|
printf("\nFailed to deserialize the client data, error:%d\n", GetLastError());
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
for (int nKey=0; nKey < ARRAYSIZE(keys); nKey++) {
|
loop:
|
||||||
if (strcmp(ansikey, keys[nKey].incoming) == 0) {
|
while (buf && (wcslen(buf) > 0)) {
|
||||||
SendKeyStroke(child_in, keys[nKey].vk, keys[nKey].outgoing);
|
for (int j = 0; j < ARRAYSIZE(keys); j++) {
|
||||||
return;
|
if ( (wcslen(buf) >= keys[j].in_key_len) && (wcsncmp(buf, keys[j].in, keys[j].in_key_len) == 0) ) {
|
||||||
|
SendKeyStroke(child_in, keys[j].vk, keys[j].out);
|
||||||
|
buf += keys[j].in_key_len;
|
||||||
|
goto loop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i < keylen; i++)
|
if (*buf == L'\x3') /*Ctrl+C - Raise Ctrl+C*/
|
||||||
SendKeyStroke(child_in, 0, ansikey[i]);
|
GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);
|
||||||
|
else
|
||||||
|
SendKeyStroke(child_in, 0, *buf);
|
||||||
|
|
||||||
|
buf++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -404,24 +416,25 @@ SendCharacter(HANDLE hInput, WORD attributes, wchar_t character)
|
|||||||
|
|
||||||
StringCbPrintfExA(Next, SizeLeft, &Next, &SizeLeft, 0, ";%u", Color);
|
StringCbPrintfExA(Next, SizeLeft, &Next, &SizeLeft, 0, ";%u", Color);
|
||||||
|
|
||||||
StringCbPrintfExA(Next, SizeLeft, &Next, &SizeLeft, 0, "m", Color);
|
StringCbPrintfExA(Next, SizeLeft, &Next, &SizeLeft, 0, ";%c", 'm');
|
||||||
|
|
||||||
if (bUseAnsiEmulation && attributes != pattributes)
|
if (bUseAnsiEmulation && attributes != pattributes)
|
||||||
WriteFile(hInput, formatted_output, (DWORD)(Next - formatted_output), &wr, NULL);
|
WriteFile(hInput, formatted_output, (DWORD)(Next - formatted_output), &wr, NULL);
|
||||||
|
|
||||||
/* East asian languages have 2 bytes for each character, only use the first */
|
/* East asian languages have 2 bytes for each character, only use the first */
|
||||||
if (!(attributes & COMMON_LVB_TRAILING_BYTE)) {
|
if (!(attributes & COMMON_LVB_TRAILING_BYTE)) {
|
||||||
|
char str[10];
|
||||||
int nSize = WideCharToMultiByte(CP_UTF8,
|
int nSize = WideCharToMultiByte(CP_UTF8,
|
||||||
0,
|
0,
|
||||||
&character,
|
&character,
|
||||||
1,
|
1,
|
||||||
Next,
|
(LPSTR)str,
|
||||||
10,
|
sizeof(str),
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (nSize > 0)
|
if (nSize > 0)
|
||||||
WriteFile(hInput, Next, nSize, &wr, NULL);
|
WriteFile(hInput, str, nSize, &wr, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
pattributes = attributes;
|
pattributes = attributes;
|
||||||
@ -462,7 +475,7 @@ SizeWindow(HANDLE hInput)
|
|||||||
matchingFont.dwFontSize.Y = 16;
|
matchingFont.dwFontSize.Y = 16;
|
||||||
matchingFont.FontFamily = FF_DONTCARE;
|
matchingFont.FontFamily = FF_DONTCARE;
|
||||||
matchingFont.FontWeight = FW_NORMAL;
|
matchingFont.FontWeight = FW_NORMAL;
|
||||||
wcscpy(matchingFont.FaceName, L"Consolas");
|
wcscpy_s(matchingFont.FaceName, LF_FACESIZE, L"Consolas");
|
||||||
|
|
||||||
bSuccess = __SetCurrentConsoleFontEx(child_out, FALSE, &matchingFont);
|
bSuccess = __SetCurrentConsoleFontEx(child_out, FALSE, &matchingFont);
|
||||||
|
|
||||||
@ -481,8 +494,8 @@ SizeWindow(HANDLE hInput)
|
|||||||
inputSi.dwYCountChars = 25;
|
inputSi.dwYCountChars = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
srWindowRect.Right = (SHORT)(min(inputSi.dwXCountChars, (DWORD)coordScreen.X) - 1);
|
srWindowRect.Right = min((SHORT)inputSi.dwXCountChars, coordScreen.X) - 1;
|
||||||
srWindowRect.Bottom = (SHORT)(min(inputSi.dwYCountChars, (DWORD)coordScreen.Y) - 1);
|
srWindowRect.Bottom = min((SHORT)inputSi.dwYCountChars, coordScreen.Y) - 1;
|
||||||
srWindowRect.Left = srWindowRect.Top = (SHORT)0;
|
srWindowRect.Left = srWindowRect.Top = (SHORT)0;
|
||||||
|
|
||||||
/* Define the new console buffer size to be the maximum possible */
|
/* Define the new console buffer size to be the maximum possible */
|
||||||
@ -638,8 +651,8 @@ ProcessEvent(void *p)
|
|||||||
return dwError;
|
return dwError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((DWORD)readRect.Top > currentLine)
|
if (readRect.Top > currentLine)
|
||||||
for (DWORD n = currentLine; n < (DWORD)readRect.Top; n++)
|
for (SHORT n = currentLine; n < readRect.Top; n++)
|
||||||
SendLF(pipe_out);
|
SendLF(pipe_out);
|
||||||
|
|
||||||
/* Set cursor location based on the reported location from the message */
|
/* Set cursor location based on the reported location from the message */
|
||||||
@ -681,6 +694,8 @@ ProcessEvent(void *p)
|
|||||||
int pBufferSize = coordBufSize.X * coordBufSize.Y;
|
int pBufferSize = coordBufSize.X * coordBufSize.Y;
|
||||||
/* Send the one character. Note that a CR doesn't end up here */
|
/* Send the one character. Note that a CR doesn't end up here */
|
||||||
CHAR_INFO *pBuffer = (PCHAR_INFO)malloc(sizeof(CHAR_INFO) * pBufferSize);
|
CHAR_INFO *pBuffer = (PCHAR_INFO)malloc(sizeof(CHAR_INFO) * pBufferSize);
|
||||||
|
if (!pBuffer)
|
||||||
|
return ERROR_INSUFFICIENT_BUFFER;
|
||||||
|
|
||||||
/* Copy the block from the screen buffer to the temp. buffer */
|
/* Copy the block from the screen buffer to the temp. buffer */
|
||||||
if (!ReadConsoleOutput(child_out, pBuffer, coordBufSize, coordBufCoord, &readRect)) {
|
if (!ReadConsoleOutput(child_out, pBuffer, coordBufSize, coordBufCoord, &readRect)) {
|
||||||
@ -741,19 +756,6 @@ ProcessEvent(void *p)
|
|||||||
DWORD WINAPI
|
DWORD WINAPI
|
||||||
ProcessEventQueue(LPVOID p)
|
ProcessEventQueue(LPVOID p)
|
||||||
{
|
{
|
||||||
if (child_in != INVALID_HANDLE_VALUE && child_in != NULL &&
|
|
||||||
child_out != INVALID_HANDLE_VALUE && child_out != NULL) {
|
|
||||||
DWORD dwInputMode;
|
|
||||||
DWORD dwOutputMode;
|
|
||||||
|
|
||||||
if (GetConsoleMode(child_in, &dwInputMode) && GetConsoleMode(child_out, &dwOutputMode))
|
|
||||||
if (((dwOutputMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) == ENABLE_VIRTUAL_TERMINAL_PROCESSING) &&
|
|
||||||
((dwInputMode & ENABLE_VIRTUAL_TERMINAL_INPUT) == ENABLE_VIRTUAL_TERMINAL_INPUT))
|
|
||||||
bAnsi = TRUE;
|
|
||||||
else
|
|
||||||
bAnsi = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
while (head) {
|
while (head) {
|
||||||
EnterCriticalSection(&criticalSection);
|
EnterCriticalSection(&criticalSection);
|
||||||
@ -777,7 +779,6 @@ ProcessEventQueue(LPVOID p)
|
|||||||
|
|
||||||
if (child_in != INVALID_HANDLE_VALUE && child_in != NULL &&
|
if (child_in != INVALID_HANDLE_VALUE && child_in != NULL &&
|
||||||
child_out != INVALID_HANDLE_VALUE && child_out != NULL) {
|
child_out != INVALID_HANDLE_VALUE && child_out != NULL) {
|
||||||
|
|
||||||
ZeroMemory(&consoleInfo, sizeof(consoleInfo));
|
ZeroMemory(&consoleInfo, sizeof(consoleInfo));
|
||||||
consoleInfo.cbSize = sizeof(consoleInfo);
|
consoleInfo.cbSize = sizeof(consoleInfo);
|
||||||
|
|
||||||
@ -859,27 +860,13 @@ ProcessPipes(LPVOID p)
|
|||||||
|
|
||||||
/* process data from pipe_in and route appropriately */
|
/* process data from pipe_in and route appropriately */
|
||||||
while (1) {
|
while (1) {
|
||||||
DWORD rd = 0;
|
|
||||||
ZeroMemory(buf, sizeof(buf));
|
ZeroMemory(buf, sizeof(buf));
|
||||||
|
int rd = 0;
|
||||||
|
|
||||||
GOTO_CLEANUP_ON_FALSE(ReadFile(pipe_in, buf, sizeof(buf) - 1, &rd, NULL)); /* read bufsize-1 */
|
GOTO_CLEANUP_ON_FALSE(ReadFile(pipe_in, buf, sizeof(buf) - 1, &rd, NULL)); /* read bufsize-1 */
|
||||||
bStartup = FALSE;
|
bStartup = FALSE;
|
||||||
for (DWORD i=0; i < rd; i++) {
|
if(rd > 0)
|
||||||
if (buf[i] == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (buf[i] == 3) { /*Ctrl+C - Raise Ctrl+C*/
|
|
||||||
GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bAnsi) {
|
|
||||||
SendKeyStroke(child_in, 0, buf[i]);
|
|
||||||
} else {
|
|
||||||
ProcessIncomingKeys(buf);
|
ProcessIncomingKeys(buf);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -957,13 +944,18 @@ start_with_pty(wchar_t *command)
|
|||||||
{
|
{
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
wchar_t cmd[MAX_CMD_LEN];
|
wchar_t *cmd = (wchar_t *)malloc(sizeof(wchar_t) * MAX_CMD_LEN);
|
||||||
SECURITY_ATTRIBUTES sa;
|
SECURITY_ATTRIBUTES sa;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
DWORD dwStatus;
|
DWORD dwStatus;
|
||||||
HANDLE hEventHook = NULL;
|
HANDLE hEventHook = NULL;
|
||||||
HMODULE hm_kernel32 = NULL, hm_user32 = NULL;
|
HMODULE hm_kernel32 = NULL, hm_user32 = NULL;
|
||||||
|
|
||||||
|
if(cmd == NULL) {
|
||||||
|
printf("ssh-shellhost is out of memory");
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
if ((hm_kernel32 = LoadLibraryW(L"kernel32.dll")) == NULL ||
|
if ((hm_kernel32 = LoadLibraryW(L"kernel32.dll")) == NULL ||
|
||||||
(hm_user32 = LoadLibraryW(L"user32.dll")) == NULL ||
|
(hm_user32 = LoadLibraryW(L"user32.dll")) == NULL ||
|
||||||
(__SetCurrentConsoleFontEx = (__t_SetCurrentConsoleFontEx)GetProcAddress(hm_kernel32, "SetCurrentConsoleFontEx")) == NULL ||
|
(__SetCurrentConsoleFontEx = (__t_SetCurrentConsoleFontEx)GetProcAddress(hm_kernel32, "SetCurrentConsoleFontEx")) == NULL ||
|
||||||
@ -996,6 +988,12 @@ start_with_pty(wchar_t *command)
|
|||||||
hostThreadId = GetCurrentThreadId();
|
hostThreadId = GetCurrentThreadId();
|
||||||
hostProcessId = GetCurrentProcessId();
|
hostProcessId = GetCurrentProcessId();
|
||||||
InitializeCriticalSection(&criticalSection);
|
InitializeCriticalSection(&criticalSection);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ignore the static code analysis warning C6387
|
||||||
|
* as per msdn, third argument can be NULL when we specify WINEVENT_OUTOFCONTEXT
|
||||||
|
*/
|
||||||
|
#pragma warning(suppress: 6387)
|
||||||
hEventHook = __SetWinEventHook(EVENT_CONSOLE_CARET, EVENT_CONSOLE_END_APPLICATION, NULL,
|
hEventHook = __SetWinEventHook(EVENT_CONSOLE_CARET, EVENT_CONSOLE_END_APPLICATION, NULL,
|
||||||
ConsoleEventProc, 0, 0, WINEVENT_OUTOFCONTEXT);
|
ConsoleEventProc, 0, 0, WINEVENT_OUTOFCONTEXT);
|
||||||
memset(&si, 0, sizeof(STARTUPINFO));
|
memset(&si, 0, sizeof(STARTUPINFO));
|
||||||
@ -1038,6 +1036,8 @@ start_with_pty(wchar_t *command)
|
|||||||
/* disable Ctrl+C hander in this process*/
|
/* disable Ctrl+C hander in this process*/
|
||||||
SetConsoleCtrlHandler(NULL, TRUE);
|
SetConsoleCtrlHandler(NULL, TRUE);
|
||||||
|
|
||||||
|
initialize_keylen();
|
||||||
|
|
||||||
io_thread = CreateThread(NULL, 0, ProcessPipes, NULL, 0, NULL);
|
io_thread = CreateThread(NULL, 0, ProcessPipes, NULL, 0, NULL);
|
||||||
if (IS_INVALID_HANDLE(io_thread))
|
if (IS_INVALID_HANDLE(io_thread))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1051,6 +1051,7 @@ cleanup:
|
|||||||
dwStatus = GetLastError();
|
dwStatus = GetLastError();
|
||||||
if (child != INVALID_HANDLE_VALUE)
|
if (child != INVALID_HANDLE_VALUE)
|
||||||
TerminateProcess(child, 0);
|
TerminateProcess(child, 0);
|
||||||
|
|
||||||
if (!IS_INVALID_HANDLE(monitor_thread)) {
|
if (!IS_INVALID_HANDLE(monitor_thread)) {
|
||||||
WaitForSingleObject(monitor_thread, INFINITE);
|
WaitForSingleObject(monitor_thread, INFINITE);
|
||||||
CloseHandle(monitor_thread);
|
CloseHandle(monitor_thread);
|
||||||
@ -1063,16 +1064,23 @@ cleanup:
|
|||||||
TerminateThread(io_thread, 0);
|
TerminateThread(io_thread, 0);
|
||||||
CloseHandle(io_thread);
|
CloseHandle(io_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hEventHook)
|
if (hEventHook)
|
||||||
__UnhookWinEvent(hEventHook);
|
__UnhookWinEvent(hEventHook);
|
||||||
|
|
||||||
FreeConsole();
|
FreeConsole();
|
||||||
|
|
||||||
if (child != INVALID_HANDLE_VALUE) {
|
if (child != INVALID_HANDLE_VALUE) {
|
||||||
CloseHandle(pi.hProcess);
|
CloseHandle(pi.hProcess);
|
||||||
CloseHandle(pi.hThread);
|
CloseHandle(pi.hThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeQueueEvent();
|
FreeQueueEvent();
|
||||||
DeleteCriticalSection(&criticalSection);
|
DeleteCriticalSection(&criticalSection);
|
||||||
|
|
||||||
|
if(cmd != NULL)
|
||||||
|
free(cmd);
|
||||||
|
|
||||||
return child_exit_code;
|
return child_exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1093,13 +1101,18 @@ start_withno_pty(wchar_t *command)
|
|||||||
{
|
{
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
wchar_t cmd[MAX_CMD_LEN];
|
wchar_t *cmd = (wchar_t *) malloc(sizeof(wchar_t) * MAX_CMD_LEN);
|
||||||
SECURITY_ATTRIBUTES sa;
|
SECURITY_ATTRIBUTES sa;
|
||||||
BOOL ret, process_input = FALSE, run_under_cmd = FALSE;
|
BOOL ret, process_input = FALSE, run_under_cmd = FALSE;
|
||||||
size_t command_len;
|
size_t command_len;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
DWORD rd = 0, wr = 0, i = 0;
|
DWORD rd = 0, wr = 0, i = 0;
|
||||||
|
|
||||||
|
if (cmd == NULL) {
|
||||||
|
printf("ssh-shellhost is out of memory");
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
pipe_in = GetStdHandle(STD_INPUT_HANDLE);
|
pipe_in = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
pipe_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
pipe_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
pipe_err = GetStdHandle(STD_ERROR_HANDLE);
|
pipe_err = GetStdHandle(STD_ERROR_HANDLE);
|
||||||
@ -1262,6 +1275,7 @@ start_withno_pty(wchar_t *command)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
||||||
/* close child's stdin first */
|
/* close child's stdin first */
|
||||||
if(!IS_INVALID_HANDLE(child_pipe_write))
|
if(!IS_INVALID_HANDLE(child_pipe_write))
|
||||||
CloseHandle(child_pipe_write);
|
CloseHandle(child_pipe_write);
|
||||||
@ -1347,7 +1361,7 @@ static void setup_session_user_vars()
|
|||||||
to_apply = data_expanded;
|
to_apply = data_expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wcsicmp(name, L"PATH") == 0) {
|
if (_wcsicmp(name, L"PATH") == 0) {
|
||||||
if ((required = GetEnvironmentVariableW(L"PATH", NULL, 0)) != 0) {
|
if ((required = GetEnvironmentVariableW(L"PATH", NULL, 0)) != 0) {
|
||||||
/* "required" includes null term */
|
/* "required" includes null term */
|
||||||
path_value = xmalloc((wcslen(to_apply) + 1 + required) * 2);
|
path_value = xmalloc((wcslen(to_apply) + 1 + required) * 2);
|
||||||
@ -1379,16 +1393,6 @@ wmain(int ac, wchar_t **av)
|
|||||||
{
|
{
|
||||||
int pty_requested = 0;
|
int pty_requested = 0;
|
||||||
wchar_t *cmd = NULL, *cmd_b64 = NULL;
|
wchar_t *cmd = NULL, *cmd_b64 = NULL;
|
||||||
{
|
|
||||||
/* create job to hold all child processes */
|
|
||||||
HANDLE job = CreateJobObject(NULL, NULL);
|
|
||||||
JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info;
|
|
||||||
memset(&job_info, 0, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
|
|
||||||
job_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
|
|
||||||
if (!SetInformationJobObject(job, JobObjectExtendedLimitInformation, &job_info, sizeof(job_info)))
|
|
||||||
return -1;
|
|
||||||
CloseHandle(job);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ac == 1) || (ac == 2 && wcscmp(av[1], L"-nopty"))) {
|
if ((ac == 1) || (ac == 2 && wcscmp(av[1], L"-nopty"))) {
|
||||||
pty_requested = 1;
|
pty_requested = 1;
|
||||||
|
@ -71,8 +71,8 @@ w32_alarm(unsigned int sec)
|
|||||||
/* if timer was already ative, return when it was due */
|
/* if timer was already ative, return when it was due */
|
||||||
if (timer_info.ticks_at_start) {
|
if (timer_info.ticks_at_start) {
|
||||||
sec_passed = (GetTickCount64() - timer_info.ticks_at_start) / 1000;
|
sec_passed = (GetTickCount64() - timer_info.ticks_at_start) / 1000;
|
||||||
if (sec_passed < timer_info.run_time_sec)
|
if (sec_passed < (ULONGLONG)timer_info.run_time_sec)
|
||||||
ret = timer_info.run_time_sec - sec_passed;
|
ret = (int) (timer_info.run_time_sec - sec_passed);
|
||||||
}
|
}
|
||||||
timer_info.ticks_at_start = GetTickCount64();
|
timer_info.ticks_at_start = GetTickCount64();
|
||||||
timer_info.run_time_sec = sec;
|
timer_info.run_time_sec = sec;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "signal_internal.h"
|
#include "signal_internal.h"
|
||||||
#include "inc\sys\wait.h"
|
#include "inc\sys\wait.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "inc\signal.h"
|
||||||
|
|
||||||
struct _children children;
|
struct _children children;
|
||||||
|
|
||||||
@ -135,7 +136,7 @@ w32_kill(int pid, int sig)
|
|||||||
|
|
||||||
/* for child processes - only SIGTERM supported*/
|
/* for child processes - only SIGTERM supported*/
|
||||||
child_index = -1;
|
child_index = -1;
|
||||||
for (i = 0; i < children.num_children; i++)
|
for (i = 0; i < (int)children.num_children; i++)
|
||||||
if (children.process_id[i] == pid) {
|
if (children.process_id[i] == pid) {
|
||||||
child_index = i;
|
child_index = i;
|
||||||
break;
|
break;
|
||||||
@ -187,9 +188,10 @@ waitpid(int pid, int *status, int options)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process = children.handles[index];
|
||||||
|
|
||||||
/* wait if process is still alive */
|
/* wait if process is still alive */
|
||||||
if (index < children.num_children - children.num_zombies) {
|
if (index < children.num_children - children.num_zombies) {
|
||||||
process = children.handles[index];
|
|
||||||
ret = WaitForSingleObject(process, INFINITE);
|
ret = WaitForSingleObject(process, INFINITE);
|
||||||
if (ret != WAIT_OBJECT_0)
|
if (ret != WAIT_OBJECT_0)
|
||||||
DebugBreak();//fatal
|
DebugBreak();//fatal
|
||||||
|
@ -950,12 +950,13 @@ socketio_on_select(struct w32_io* pio, BOOL rd)
|
|||||||
int
|
int
|
||||||
w32_gethostname(char *name_utf8, size_t len)
|
w32_gethostname(char *name_utf8, size_t len)
|
||||||
{
|
{
|
||||||
wchar_t name_utf16[256];
|
|
||||||
char* tmp_name_utf8 = NULL;
|
char* tmp_name_utf8 = NULL;
|
||||||
|
|
||||||
if (IsWindows8OrGreater()) {
|
if (IsWindows8OrGreater()) {
|
||||||
/* TODO - GetHostNameW not present in Win7, do GetProcAddr on Win8+*/
|
/* TODO - GetHostNameW not present in Win7, do GetProcAddr on Win8+*/
|
||||||
/* if (GetHostNameW(name_utf16, 256) == SOCKET_ERROR) {
|
/*
|
||||||
|
wchar_t name_utf16[256];
|
||||||
|
if (GetHostNameW(name_utf16, 256) == SOCKET_ERROR) {
|
||||||
errno = errno_from_WSALastError();
|
errno = errno_from_WSALastError();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -969,9 +970,9 @@ w32_gethostname(char *name_utf8, size_t len)
|
|||||||
memcpy(name_utf8, tmp_name_utf8, strlen(tmp_name_utf8) + 1);
|
memcpy(name_utf8, tmp_name_utf8, strlen(tmp_name_utf8) + 1);
|
||||||
free(tmp_name_utf8);
|
free(tmp_name_utf8);
|
||||||
return 0; */
|
return 0; */
|
||||||
return gethostname(name_utf8, len);
|
return gethostname(name_utf8, (int)len);
|
||||||
} else
|
} else
|
||||||
return gethostname(name_utf8, len);
|
return gethostname(name_utf8, (int)len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -172,6 +172,8 @@ agent_cleanup_connection(struct agent_connection* con)
|
|||||||
UnloadUserProfile(con->auth_token, con->hProfile);
|
UnloadUserProfile(con->auth_token, con->hProfile);
|
||||||
if (con->auth_token)
|
if (con->auth_token)
|
||||||
CloseHandle(con->auth_token);
|
CloseHandle(con->auth_token);
|
||||||
|
if (con->client_impersonation_token)
|
||||||
|
CloseHandle(con->client_impersonation_token);
|
||||||
free(con);
|
free(con);
|
||||||
CloseHandle(ioc_port);
|
CloseHandle(ioc_port);
|
||||||
ioc_port = NULL;
|
ioc_port = NULL;
|
||||||
@ -189,14 +191,19 @@ agent_start(BOOL dbg_mode)
|
|||||||
int r;
|
int r;
|
||||||
HKEY agent_root = NULL;
|
HKEY agent_root = NULL;
|
||||||
DWORD process_id = GetCurrentProcessId();
|
DWORD process_id = GetCurrentProcessId();
|
||||||
|
wchar_t* sddl_str;
|
||||||
|
|
||||||
verbose("%s pid:%d, dbg:%d", __FUNCTION__, process_id, dbg_mode);
|
verbose("%s pid:%d, dbg:%d", __FUNCTION__, process_id, dbg_mode);
|
||||||
debug_mode = dbg_mode;
|
debug_mode = dbg_mode;
|
||||||
|
|
||||||
memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
|
memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
|
||||||
sa.nLength = sizeof(sa);
|
sa.nLength = sizeof(sa);
|
||||||
/* allow access to Authenticated users and Network Service */
|
/*
|
||||||
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:P(A;;GA;;;AU)(A;;GA;;;NS)", SDDL_REVISION_1,
|
* SDDL - GA to System and Builtin/Admins and restricted access to Authenticated users
|
||||||
|
* 0x12019b - FILE_GENERIC_READ/WRITE minus FILE_CREATE_PIPE_INSTANCE
|
||||||
|
*/
|
||||||
|
sddl_str = L"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;0x12019b;;;AU)";
|
||||||
|
if (!ConvertStringSecurityDescriptorToSecurityDescriptorW(sddl_str, SDDL_REVISION_1,
|
||||||
&sa.lpSecurityDescriptor, &sa.nLength))
|
&sa.lpSecurityDescriptor, &sa.nLength))
|
||||||
fatal("cannot convert sddl ERROR:%d", GetLastError());
|
fatal("cannot convert sddl ERROR:%d", GetLastError());
|
||||||
if ((r = RegCreateKeyExW(HKEY_LOCAL_MACHINE, SSH_AGENT_ROOT, 0, 0, 0, KEY_WRITE, &sa, &agent_root, 0)) != ERROR_SUCCESS)
|
if ((r = RegCreateKeyExW(HKEY_LOCAL_MACHINE, SSH_AGENT_ROOT, 0, 0, 0, KEY_WRITE, &sa, &agent_root, 0)) != ERROR_SUCCESS)
|
||||||
@ -212,6 +219,141 @@ agent_start(BOOL dbg_mode)
|
|||||||
agent_listen_loop();
|
agent_listen_loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char*
|
||||||
|
con_type_to_string(struct agent_connection* con)
|
||||||
|
{
|
||||||
|
switch (con->client_type) {
|
||||||
|
case UNKNOWN:
|
||||||
|
return "unknown";
|
||||||
|
case NONADMIN_USER:
|
||||||
|
return "restricted user";
|
||||||
|
case ADMIN_USER:
|
||||||
|
return "administrator";
|
||||||
|
case SSHD_SERVICE:
|
||||||
|
return "sshd service";
|
||||||
|
case SYSTEM:
|
||||||
|
return "system";
|
||||||
|
case SERVICE:
|
||||||
|
return "service";
|
||||||
|
default:
|
||||||
|
return "unexpected";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
get_con_client_info(struct agent_connection* con)
|
||||||
|
{
|
||||||
|
int r = -1;
|
||||||
|
char sid[SECURITY_MAX_SID_SIZE];
|
||||||
|
wchar_t *sshd_act = L"NT SERVICE\\SSHD", *ref_dom = NULL;
|
||||||
|
ULONG client_pid;
|
||||||
|
DWORD reg_dom_len = 0, info_len = 0, sid_size;
|
||||||
|
DWORD sshd_sid_len = 0;
|
||||||
|
PSID sshd_sid = NULL;
|
||||||
|
SID_NAME_USE nuse;
|
||||||
|
HANDLE client_primary_token = NULL, client_impersonation_token = NULL, client_proc_handle = NULL;
|
||||||
|
TOKEN_USER* info = NULL;
|
||||||
|
BOOL isMember = FALSE;
|
||||||
|
|
||||||
|
if (GetNamedPipeClientProcessId(con->pipe_handle, &client_pid) == FALSE ||
|
||||||
|
(client_proc_handle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, client_pid)) == NULL ||
|
||||||
|
OpenProcessToken(client_proc_handle, TOKEN_QUERY | TOKEN_DUPLICATE, &client_primary_token) == FALSE ||
|
||||||
|
DuplicateToken(client_primary_token, SecurityImpersonation, &client_impersonation_token) == FALSE) {
|
||||||
|
error("cannot retrieve client impersonatin token");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetTokenInformation(client_primary_token, TokenUser, NULL, 0, &info_len) == TRUE ||
|
||||||
|
(info = (TOKEN_USER*)malloc(info_len)) == NULL ||
|
||||||
|
GetTokenInformation(client_primary_token, TokenUser, info, info_len, &info_len) == FALSE)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
/* check if its localsystem */
|
||||||
|
if (IsWellKnownSid(info->User.Sid, WinLocalSystemSid)) {
|
||||||
|
con->client_type = SYSTEM;
|
||||||
|
r = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if its SSHD service */
|
||||||
|
{
|
||||||
|
/* Does NT Service/SSHD exist */
|
||||||
|
LookupAccountNameW(NULL, sshd_act, NULL, &sshd_sid_len, NULL, ®_dom_len, &nuse);
|
||||||
|
|
||||||
|
if (GetLastError() == ERROR_NONE_MAPPED)
|
||||||
|
debug3("Cannot look up SSHD account, its likely not installed");
|
||||||
|
else if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
|
||||||
|
error("LookupAccountNameW on SSHD account failed with %d", GetLastError());
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ((sshd_sid = malloc(sshd_sid_len)) == NULL ||
|
||||||
|
(ref_dom = (wchar_t*)malloc(reg_dom_len * 2)) == NULL ||
|
||||||
|
LookupAccountNameW(NULL, sshd_act, sshd_sid, &sshd_sid_len, ref_dom, ®_dom_len, &nuse) == FALSE)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
if (EqualSid(info->User.Sid, sshd_sid)) {
|
||||||
|
con->client_type = SSHD_SERVICE;
|
||||||
|
r = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (CheckTokenMembership(client_impersonation_token, sshd_sid, &isMember) == FALSE)
|
||||||
|
goto done;
|
||||||
|
if (isMember) {
|
||||||
|
con->client_type = SSHD_SERVICE;
|
||||||
|
r = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if its LS or NS */
|
||||||
|
if (IsWellKnownSid(info->User.Sid, WinNetworkServiceSid) ||
|
||||||
|
IsWellKnownSid(info->User.Sid, WinLocalServiceSid)) {
|
||||||
|
con->client_type = SERVICE;
|
||||||
|
r = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if its admin */
|
||||||
|
{
|
||||||
|
sid_size = SECURITY_MAX_SID_SIZE;
|
||||||
|
if (CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, sid, &sid_size) == FALSE)
|
||||||
|
goto done;
|
||||||
|
if (CheckTokenMembership(client_impersonation_token, sid, &isMember) == FALSE)
|
||||||
|
goto done;
|
||||||
|
if (isMember) {
|
||||||
|
con->client_type = ADMIN_USER;
|
||||||
|
r = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* none of above */
|
||||||
|
con->client_type = NONADMIN_USER;
|
||||||
|
r = 0;
|
||||||
|
done:
|
||||||
|
debug("client type: %s", con_type_to_string(con));
|
||||||
|
|
||||||
|
if (sshd_sid)
|
||||||
|
free(sshd_sid);
|
||||||
|
if (ref_dom)
|
||||||
|
free(ref_dom);
|
||||||
|
if (info)
|
||||||
|
free(info);
|
||||||
|
if (client_proc_handle)
|
||||||
|
CloseHandle(client_proc_handle);
|
||||||
|
if (client_primary_token)
|
||||||
|
CloseHandle(client_primary_token);
|
||||||
|
|
||||||
|
if (r == 0)
|
||||||
|
con->client_impersonation_token = client_impersonation_token;
|
||||||
|
else if (client_impersonation_token)
|
||||||
|
CloseHandle(client_impersonation_token);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
agent_process_connection(HANDLE pipe)
|
agent_process_connection(HANDLE pipe)
|
||||||
{
|
{
|
||||||
@ -229,6 +371,10 @@ agent_process_connection(HANDLE pipe)
|
|||||||
if (CreateIoCompletionPort(pipe, ioc_port, (ULONG_PTR)con, 0) != ioc_port)
|
if (CreateIoCompletionPort(pipe, ioc_port, (ULONG_PTR)con, 0) != ioc_port)
|
||||||
fatal("failed to assign pipe to ioc_port");
|
fatal("failed to assign pipe to ioc_port");
|
||||||
|
|
||||||
|
/* get client details */
|
||||||
|
if (get_con_client_info(con) == -1)
|
||||||
|
fatal("failed to retrieve client details");
|
||||||
|
|
||||||
agent_connection_on_io(con, 0, &con->ol);
|
agent_connection_on_io(con, 0, &con->ol);
|
||||||
iocp_work(NULL);
|
iocp_work(NULL);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
struct agent_connection {
|
struct agent_connection {
|
||||||
OVERLAPPED ol;
|
OVERLAPPED ol;
|
||||||
HANDLE pipe_handle;
|
HANDLE pipe_handle;
|
||||||
|
HANDLE client_impersonation_token;
|
||||||
struct {
|
struct {
|
||||||
DWORD num_bytes;
|
DWORD num_bytes;
|
||||||
DWORD transferred;
|
DWORD transferred;
|
||||||
|
@ -42,8 +42,7 @@
|
|||||||
|
|
||||||
#pragma warning(push, 3)
|
#pragma warning(push, 3)
|
||||||
|
|
||||||
int
|
int pubkey_allowed(struct sshkey* pubkey, HANDLE user_token);
|
||||||
pubkey_allowed(struct sshkey*, HANDLE);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
InitLsaString(LSA_STRING *lsa_string, const char *str)
|
InitLsaString(LSA_STRING *lsa_string, const char *str)
|
||||||
|
@ -136,105 +136,6 @@ con_type_to_string(struct agent_connection* con) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
get_con_client_type(struct agent_connection* con)
|
|
||||||
{
|
|
||||||
int r = -1;
|
|
||||||
char sid[SECURITY_MAX_SID_SIZE];
|
|
||||||
wchar_t *sshd_act = L"NT SERVICE\\SSHD", *ref_dom = NULL;
|
|
||||||
DWORD reg_dom_len = 0, info_len = 0, sid_size;
|
|
||||||
DWORD sshd_sid_len = 0;
|
|
||||||
PSID sshd_sid = NULL;
|
|
||||||
SID_NAME_USE nuse;
|
|
||||||
HANDLE token;
|
|
||||||
TOKEN_USER* info = NULL;
|
|
||||||
BOOL isMember = FALSE;
|
|
||||||
|
|
||||||
if (ImpersonateNamedPipeClient(con->pipe_handle) == FALSE)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &token) == FALSE ||
|
|
||||||
GetTokenInformation(token, TokenUser, NULL, 0, &info_len) == TRUE ||
|
|
||||||
(info = (TOKEN_USER*)malloc(info_len)) == NULL ||
|
|
||||||
GetTokenInformation(token, TokenUser, info, info_len, &info_len) == FALSE)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
/* check if its localsystem */
|
|
||||||
if (IsWellKnownSid(info->User.Sid, WinLocalSystemSid)) {
|
|
||||||
con->client_type = SYSTEM;
|
|
||||||
r = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if its SSHD service */
|
|
||||||
{
|
|
||||||
/* Does NT Service/SSHD exist */
|
|
||||||
LookupAccountNameW(NULL, sshd_act, NULL, &sshd_sid_len, NULL, ®_dom_len, &nuse);
|
|
||||||
|
|
||||||
if (GetLastError() == ERROR_NONE_MAPPED)
|
|
||||||
debug3("Cannot look up SSHD account, its likely not installed");
|
|
||||||
else if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
|
|
||||||
error("LookupAccountNameW on SSHD account failed with %d", GetLastError());
|
|
||||||
goto done;
|
|
||||||
} else {
|
|
||||||
if ((sshd_sid = malloc(sshd_sid_len)) == NULL ||
|
|
||||||
(ref_dom = (wchar_t*)malloc(reg_dom_len * 2)) == NULL ||
|
|
||||||
LookupAccountNameW(NULL, sshd_act, sshd_sid, &sshd_sid_len, ref_dom, ®_dom_len, &nuse) == FALSE)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
if (EqualSid(info->User.Sid, sshd_sid)) {
|
|
||||||
con->client_type = SSHD_SERVICE;
|
|
||||||
r = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (CheckTokenMembership(token, sshd_sid, &isMember) == FALSE)
|
|
||||||
goto done;
|
|
||||||
if (isMember) {
|
|
||||||
con->client_type = SSHD_SERVICE;
|
|
||||||
r = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if its LS or NS */
|
|
||||||
if (IsWellKnownSid(info->User.Sid, WinNetworkServiceSid) ||
|
|
||||||
IsWellKnownSid(info->User.Sid, WinLocalServiceSid)) {
|
|
||||||
con->client_type = SERVICE;
|
|
||||||
r = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if its admin */
|
|
||||||
{
|
|
||||||
sid_size = SECURITY_MAX_SID_SIZE;
|
|
||||||
if (CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, sid, &sid_size) == FALSE)
|
|
||||||
goto done;
|
|
||||||
if (CheckTokenMembership(token, sid, &isMember) == FALSE)
|
|
||||||
goto done;
|
|
||||||
if (isMember) {
|
|
||||||
con->client_type = ADMIN_USER;
|
|
||||||
r = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* none of above */
|
|
||||||
con->client_type = NONADMIN_USER;
|
|
||||||
r = 0;
|
|
||||||
done:
|
|
||||||
debug("client type: %s", con_type_to_string(con));
|
|
||||||
|
|
||||||
if (sshd_sid)
|
|
||||||
free(sshd_sid);
|
|
||||||
if (ref_dom)
|
|
||||||
free(ref_dom);
|
|
||||||
if (info)
|
|
||||||
free(info);
|
|
||||||
RevertToSelf();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
process_request(struct agent_connection* con)
|
process_request(struct agent_connection* con)
|
||||||
{
|
{
|
||||||
@ -242,11 +143,6 @@ process_request(struct agent_connection* con)
|
|||||||
struct sshbuf *request = NULL, *response = NULL;
|
struct sshbuf *request = NULL, *response = NULL;
|
||||||
u_char type;
|
u_char type;
|
||||||
|
|
||||||
if (con->client_type == UNKNOWN && get_con_client_type(con) == -1) {
|
|
||||||
debug("unable to get client process type");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
request = sshbuf_from(con->io_buf.buf, con->io_buf.num_bytes);
|
request = sshbuf_from(con->io_buf.buf, con->io_buf.num_bytes);
|
||||||
response = sshbuf_new();
|
response = sshbuf_new();
|
||||||
if ((request == NULL) || (response == NULL))
|
if ((request == NULL) || (response == NULL))
|
||||||
|
@ -51,7 +51,7 @@ get_user_root(struct agent_connection* con, HKEY *root)
|
|||||||
*root = HKEY_LOCAL_MACHINE;
|
*root = HKEY_LOCAL_MACHINE;
|
||||||
|
|
||||||
if (con->client_type <= ADMIN_USER) {
|
if (con->client_type <= ADMIN_USER) {
|
||||||
if (ImpersonateNamedPipeClient(con->pipe_handle) == FALSE)
|
if (ImpersonateLoggedOnUser(con->client_impersonation_token) == FALSE)
|
||||||
return -1;
|
return -1;
|
||||||
*root = NULL;
|
*root = NULL;
|
||||||
/*
|
/*
|
||||||
@ -74,7 +74,7 @@ convert_blob(struct agent_connection* con, const char *blob, DWORD blen, char **
|
|||||||
DATA_BLOB in, out;
|
DATA_BLOB in, out;
|
||||||
|
|
||||||
if (con->client_type <= ADMIN_USER)
|
if (con->client_type <= ADMIN_USER)
|
||||||
if (ImpersonateNamedPipeClient(con->pipe_handle) == FALSE)
|
if (ImpersonateLoggedOnUser(con->client_impersonation_token) == FALSE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
in.cbData = blen;
|
in.cbData = blen;
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include "inc\utf.h"
|
#include "inc\utf.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "tnnet.h"
|
#include "tnnet.h"
|
||||||
|
#include "misc_internal.h"
|
||||||
|
|
||||||
#define TERM_IO_BUF_SIZE 2048
|
#define TERM_IO_BUF_SIZE 2048
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ syncio_initiate_read(struct w32_io* pio)
|
|||||||
|
|
||||||
read_thread = CreateThread(NULL, 0, ReadThread, pio, 0, NULL);
|
read_thread = CreateThread(NULL, 0, ReadThread, pio, 0, NULL);
|
||||||
if (read_thread == NULL) {
|
if (read_thread == NULL) {
|
||||||
errno = errno_from_Win32Error(GetLastError());
|
errno = errno_from_Win32LastError();
|
||||||
debug3("TermRead initiate - ERROR CreateThread %d, io:%p", GetLastError(), pio);
|
debug3("TermRead initiate - ERROR CreateThread %d, io:%p", GetLastError(), pio);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -164,7 +165,7 @@ WriteThread(_In_ LPVOID lpParameter)
|
|||||||
pio->write_details.buf[write_status.to_transfer] = '\0';
|
pio->write_details.buf[write_status.to_transfer] = '\0';
|
||||||
if (0 == in_raw_mode) {
|
if (0 == in_raw_mode) {
|
||||||
wchar_t* t = utf8_to_utf16(pio->write_details.buf);
|
wchar_t* t = utf8_to_utf16(pio->write_details.buf);
|
||||||
WriteConsoleW(WINHANDLE(pio), t, wcslen(t), 0, 0);
|
WriteConsoleW(WINHANDLE(pio), t, (DWORD)wcslen(t), 0, 0);
|
||||||
free(t);
|
free(t);
|
||||||
} else {
|
} else {
|
||||||
processBuffer(WINHANDLE(pio), pio->write_details.buf, write_status.to_transfer, &respbuf, &resplen);
|
processBuffer(WINHANDLE(pio), pio->write_details.buf, write_status.to_transfer, &respbuf, &resplen);
|
||||||
@ -200,7 +201,7 @@ syncio_initiate_write(struct w32_io* pio, DWORD num_bytes)
|
|||||||
write_status.to_transfer = num_bytes;
|
write_status.to_transfer = num_bytes;
|
||||||
write_thread = CreateThread(NULL, 0, WriteThread, pio, 0, NULL);
|
write_thread = CreateThread(NULL, 0, WriteThread, pio, 0, NULL);
|
||||||
if (write_thread == NULL) {
|
if (write_thread == NULL) {
|
||||||
errno = errno_from_Win32Error(GetLastError());
|
errno = errno_from_Win32LastError();
|
||||||
debug3("TermWrite initiate - ERROR CreateThread %d, io:%p", GetLastError(), pio);
|
debug3("TermWrite initiate - ERROR CreateThread %d, io:%p", GetLastError(), pio);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -215,7 +216,6 @@ int
|
|||||||
syncio_close(struct w32_io* pio)
|
syncio_close(struct w32_io* pio)
|
||||||
{
|
{
|
||||||
debug4("syncio_close - pio:%p", pio);
|
debug4("syncio_close - pio:%p", pio);
|
||||||
HANDLE h;
|
|
||||||
CancelIoEx(WINHANDLE(pio), NULL);
|
CancelIoEx(WINHANDLE(pio), NULL);
|
||||||
|
|
||||||
/* If io is pending, let worker threads exit. */
|
/* If io is pending, let worker threads exit. */
|
||||||
|
@ -110,7 +110,6 @@ ReadConsoleForTermEmul(HANDLE hInput, char *destin, int destinlen)
|
|||||||
DWORD dwInput = 0;
|
DWORD dwInput = 0;
|
||||||
DWORD dwControlKeyState = 0;
|
DWORD dwControlKeyState = 0;
|
||||||
DWORD rc = 0;
|
DWORD rc = 0;
|
||||||
unsigned char szResponse[50];
|
|
||||||
unsigned char octets[20];
|
unsigned char octets[20];
|
||||||
char aChar = 0;
|
char aChar = 0;
|
||||||
INPUT_RECORD InputRecord;
|
INPUT_RECORD InputRecord;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "ansiprsr.h"
|
#include "ansiprsr.h"
|
||||||
#include "inc\utf.h"
|
#include "inc\utf.h"
|
||||||
|
#include "console.h"
|
||||||
|
|
||||||
#define dwBuffer 4096
|
#define dwBuffer 4096
|
||||||
|
|
||||||
@ -50,7 +51,6 @@ extern BOOL isAnsiParsingRequired;
|
|||||||
void
|
void
|
||||||
processBuffer(HANDLE handle, char *buf, size_t len, unsigned char **respbuf, size_t *resplen)
|
processBuffer(HANDLE handle, char *buf, size_t len, unsigned char **respbuf, size_t *resplen)
|
||||||
{
|
{
|
||||||
unsigned char szBuffer[dwBuffer + 8];
|
|
||||||
unsigned char* pszNewHead = NULL;
|
unsigned char* pszNewHead = NULL;
|
||||||
unsigned char* pszHead = NULL;
|
unsigned char* pszHead = NULL;
|
||||||
unsigned char* pszTail = NULL;
|
unsigned char* pszTail = NULL;
|
||||||
@ -62,7 +62,7 @@ processBuffer(HANDLE handle, char *buf, size_t len, unsigned char **respbuf, siz
|
|||||||
/* Console has the capability to parse so pass the raw buffer to console directly */
|
/* Console has the capability to parse so pass the raw buffer to console directly */
|
||||||
ConRestoreViewRect(); /* Restore the visible window, otherwise WriteConsoleW() gets messy */
|
ConRestoreViewRect(); /* Restore the visible window, otherwise WriteConsoleW() gets messy */
|
||||||
wchar_t* t = utf8_to_utf16(buf);
|
wchar_t* t = utf8_to_utf16(buf);
|
||||||
WriteConsoleW(handle, t, wcslen(t), 0, 0);
|
WriteConsoleW(handle, t, (DWORD)wcslen(t), 0, 0);
|
||||||
free(t);
|
free(t);
|
||||||
ConSaveViewRect();
|
ConSaveViewRect();
|
||||||
return;
|
return;
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Yanbing Wang <yawang@microsoft.com>
|
* Author: Yanbing Wang <yawang@microsoft.com>
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009, 2011 NoMachine
|
|
||||||
* All rights reserved
|
|
||||||
*
|
|
||||||
* Support file permission check on Win32 based operating systems.
|
* Support file permission check on Win32 based operating systems.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -179,3 +176,4 @@ is_sshd_account(PSID user_sid) {
|
|||||||
wmemcpy(full_name + domain_name_length + 1, user_name, wcslen(user_name)+1);
|
wmemcpy(full_name + domain_name_length + 1, user_name, wcslen(user_name)+1);
|
||||||
return (wcsicmp(full_name, SSHD_ACCOUNT) == 0);
|
return (wcsicmp(full_name, SSHD_ACCOUNT) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,22 +76,46 @@ fd_table_initialize()
|
|||||||
memset(&w32_io_stdin, 0, sizeof(w32_io_stdin));
|
memset(&w32_io_stdin, 0, sizeof(w32_io_stdin));
|
||||||
w32_io_stdin.std_handle = STD_INPUT_HANDLE;
|
w32_io_stdin.std_handle = STD_INPUT_HANDLE;
|
||||||
w32_io_stdin.type = NONSOCK_SYNC_FD;
|
w32_io_stdin.type = NONSOCK_SYNC_FD;
|
||||||
if (getenv(SSH_ASYNC_STDIN) && strcmp(getenv(SSH_ASYNC_STDIN), "1") == 0)
|
|
||||||
|
char *envValue = NULL;
|
||||||
|
_dupenv_s(&envValue, NULL, SSH_ASYNC_STDIN);
|
||||||
|
if (NULL != envValue) {
|
||||||
|
if(strcmp(envValue, "1") == 0)
|
||||||
w32_io_stdin.type = NONSOCK_FD;
|
w32_io_stdin.type = NONSOCK_FD;
|
||||||
|
|
||||||
|
free(envValue);
|
||||||
|
}
|
||||||
|
|
||||||
_putenv_s(SSH_ASYNC_STDIN, "");
|
_putenv_s(SSH_ASYNC_STDIN, "");
|
||||||
fd_table_set(&w32_io_stdin, STDIN_FILENO);
|
fd_table_set(&w32_io_stdin, STDIN_FILENO);
|
||||||
memset(&w32_io_stdout, 0, sizeof(w32_io_stdout));
|
memset(&w32_io_stdout, 0, sizeof(w32_io_stdout));
|
||||||
w32_io_stdout.std_handle = STD_OUTPUT_HANDLE;
|
w32_io_stdout.std_handle = STD_OUTPUT_HANDLE;
|
||||||
w32_io_stdout.type = NONSOCK_SYNC_FD;
|
w32_io_stdout.type = NONSOCK_SYNC_FD;
|
||||||
if (getenv(SSH_ASYNC_STDOUT) && strcmp(getenv(SSH_ASYNC_STDOUT), "1") == 0)
|
|
||||||
|
envValue = NULL;
|
||||||
|
_dupenv_s(&envValue, NULL, SSH_ASYNC_STDOUT);
|
||||||
|
if (NULL != envValue) {
|
||||||
|
if(strcmp(envValue, "1") == 0)
|
||||||
w32_io_stdout.type = NONSOCK_FD;
|
w32_io_stdout.type = NONSOCK_FD;
|
||||||
|
|
||||||
|
free(envValue);
|
||||||
|
}
|
||||||
|
|
||||||
_putenv_s(SSH_ASYNC_STDOUT, "");
|
_putenv_s(SSH_ASYNC_STDOUT, "");
|
||||||
fd_table_set(&w32_io_stdout, STDOUT_FILENO);
|
fd_table_set(&w32_io_stdout, STDOUT_FILENO);
|
||||||
memset(&w32_io_stderr, 0, sizeof(w32_io_stderr));
|
memset(&w32_io_stderr, 0, sizeof(w32_io_stderr));
|
||||||
w32_io_stderr.std_handle = STD_ERROR_HANDLE;
|
w32_io_stderr.std_handle = STD_ERROR_HANDLE;
|
||||||
w32_io_stderr.type = NONSOCK_SYNC_FD;
|
w32_io_stderr.type = NONSOCK_SYNC_FD;
|
||||||
if (getenv(SSH_ASYNC_STDERR) && strcmp(getenv(SSH_ASYNC_STDERR), "1") == 0)
|
|
||||||
|
envValue = NULL;
|
||||||
|
_dupenv_s(&envValue, NULL, SSH_ASYNC_STDERR);
|
||||||
|
if (NULL != envValue) {
|
||||||
|
if(strcmp(envValue, "1") == 0)
|
||||||
w32_io_stderr.type = NONSOCK_FD;
|
w32_io_stderr.type = NONSOCK_FD;
|
||||||
|
|
||||||
|
free(envValue);
|
||||||
|
}
|
||||||
|
|
||||||
_putenv_s(SSH_ASYNC_STDERR, "");
|
_putenv_s(SSH_ASYNC_STDERR, "");
|
||||||
fd_table_set(&w32_io_stderr, STDERR_FILENO);
|
fd_table_set(&w32_io_stderr, STDERR_FILENO);
|
||||||
return 0;
|
return 0;
|
||||||
@ -426,7 +450,7 @@ w32_read(int fd, void *dst, size_t max)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
w32_write(int fd, const void *buf, unsigned int max)
|
w32_write(int fd, const void *buf, size_t max)
|
||||||
{
|
{
|
||||||
CHECK_FD(fd);
|
CHECK_FD(fd);
|
||||||
|
|
||||||
@ -899,14 +923,14 @@ w32_fsync(int fd)
|
|||||||
* this decoration is done only when additional arguments are passed in argv
|
* this decoration is done only when additional arguments are passed in argv
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
spawn_child(char* cmd, char** argv, int in, int out, int err, DWORD flags)
|
spawn_child(char* cmd, char** argv, int in, int out, int err, unsigned long flags)
|
||||||
{
|
{
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
STARTUPINFOW si;
|
STARTUPINFOW si;
|
||||||
BOOL b;
|
BOOL b;
|
||||||
char *cmdline, *t, **t1;
|
char *cmdline, *t, **t1;
|
||||||
DWORD cmdline_len = 0;
|
DWORD cmdline_len = 0;
|
||||||
wchar_t * cmdline_utf16;
|
wchar_t * cmdline_utf16 = NULL;
|
||||||
int add_module_path = 0, ret = -1;
|
int add_module_path = 0, ret = -1;
|
||||||
|
|
||||||
/* should module path be added */
|
/* should module path be added */
|
||||||
@ -923,14 +947,14 @@ spawn_child(char* cmd, char** argv, int in, int out, int err, DWORD flags)
|
|||||||
|
|
||||||
/* compute total cmdline len*/
|
/* compute total cmdline len*/
|
||||||
if (add_module_path)
|
if (add_module_path)
|
||||||
cmdline_len += strlen(w32_programdir()) + 1 + strlen(cmd) + 1 + 2;
|
cmdline_len += (DWORD)strlen(w32_programdir()) + 1 + (DWORD)strlen(cmd) + 1 + 2;
|
||||||
else
|
else
|
||||||
cmdline_len += strlen(cmd) + 1 + 2;
|
cmdline_len += (DWORD)strlen(cmd) + 1 + 2;
|
||||||
|
|
||||||
if (argv) {
|
if (argv) {
|
||||||
t1 = argv;
|
t1 = argv;
|
||||||
while (*t1)
|
while (*t1)
|
||||||
cmdline_len += strlen(*t1++) + 1 + 2;
|
cmdline_len += (DWORD)strlen(*t1++) + 1 + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cmdline = malloc(cmdline_len)) == NULL) {
|
if ((cmdline = malloc(cmdline_len)) == NULL) {
|
||||||
|
@ -145,8 +145,8 @@ int fileio_pipe(struct w32_io* pio[2]);
|
|||||||
struct w32_io* fileio_afunix_socket();
|
struct w32_io* fileio_afunix_socket();
|
||||||
int fileio_connect(struct w32_io*, char*);
|
int fileio_connect(struct w32_io*, char*);
|
||||||
struct w32_io* fileio_open(const char *pathname, int flags, u_short mode);
|
struct w32_io* fileio_open(const char *pathname, int flags, u_short mode);
|
||||||
int fileio_read(struct w32_io* pio, void *dst, unsigned int max);
|
int fileio_read(struct w32_io* pio, void *dst, size_t max);
|
||||||
int fileio_write(struct w32_io* pio, const void *buf, unsigned int max);
|
int fileio_write(struct w32_io* pio, const void *buf, size_t max);
|
||||||
int fileio_fstat(struct w32_io* pio, struct _stat64 *buf);
|
int fileio_fstat(struct w32_io* pio, struct _stat64 *buf);
|
||||||
int fileio_stat(const char *path, struct _stat64 *buf);
|
int fileio_stat(const char *path, struct _stat64 *buf);
|
||||||
long fileio_lseek(struct w32_io* pio, long offset, int origin);
|
long fileio_lseek(struct w32_io* pio, long offset, int origin);
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include "inc/sys/stat.h"
|
#include "inc/sys/stat.h"
|
||||||
|
|
||||||
#include "inc\syslog.h"
|
#include "inc\syslog.h"
|
||||||
@ -38,9 +39,15 @@
|
|||||||
#define MSGBUFSIZ 1024
|
#define MSGBUFSIZ 1024
|
||||||
static int logfd = -1;
|
static int logfd = -1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* open a log file using the name of executable under logs folder
|
||||||
|
* Ex. if called from c:\windows\system32\openssh\sshd.exe
|
||||||
|
* logfile - c:\windows\system32\openssh\logs\sshd.log
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
openlog(char *ident, unsigned int option, int facility)
|
openlog(char *ident, unsigned int option, int facility)
|
||||||
{
|
{
|
||||||
|
wchar_t *logs_dir = L"\\logs\\";
|
||||||
if (logfd != -1 || ident == NULL)
|
if (logfd != -1 || ident == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -50,6 +57,9 @@ openlog(char *ident, unsigned int option, int facility)
|
|||||||
|
|
||||||
path[PATH_MAX - 1] = '\0';
|
path[PATH_MAX - 1] = '\0';
|
||||||
|
|
||||||
|
if (wcsnlen(path, MAX_PATH) > MAX_PATH - wcslen(logs_dir) )
|
||||||
|
return;
|
||||||
|
|
||||||
/* split path root and module */
|
/* split path root and module */
|
||||||
{
|
{
|
||||||
wchar_t* tail = path + wcslen(path), *p;
|
wchar_t* tail = path + wcslen(path), *p;
|
||||||
@ -58,14 +68,15 @@ openlog(char *ident, unsigned int option, int facility)
|
|||||||
|
|
||||||
memcpy(log_file, path, (tail - path) * sizeof(wchar_t));
|
memcpy(log_file, path, (tail - path) * sizeof(wchar_t));
|
||||||
p = log_file + (tail - path);
|
p = log_file + (tail - path);
|
||||||
memcpy(p, L"\\logs\\", 12);
|
memcpy(p, logs_dir, wcslen(logs_dir) * sizeof(wchar_t));
|
||||||
p += 6;
|
p += 6;
|
||||||
memcpy(p, tail + 1, (wcslen(tail + 1) - 3) * sizeof(wchar_t));
|
memcpy(p, tail + 1, (wcslen(tail + 1) - 3) * sizeof(wchar_t));
|
||||||
p += wcslen(tail + 1) - 3;
|
p += wcslen(tail + 1) - 3;
|
||||||
memcpy(p, L"log\0", 8);
|
memcpy(p, L"log\0", 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
logfd = _wopen(log_file, O_WRONLY | O_CREAT | O_APPEND, S_IREAD | S_IWRITE);
|
errno_t err = _wsopen_s(&logfd, log_file, O_WRONLY | O_CREAT | O_APPEND, SH_DENYNO, S_IREAD | S_IWRITE);
|
||||||
|
|
||||||
if (logfd != -1)
|
if (logfd != -1)
|
||||||
SetHandleInformation((HANDLE)_get_osfhandle(logfd), HANDLE_FLAG_INHERIT, 0);
|
SetHandleInformation((HANDLE)_get_osfhandle(logfd), HANDLE_FLAG_INHERIT, 0);
|
||||||
}
|
}
|
||||||
@ -81,13 +92,16 @@ syslog(int priority, const char *format, const char *formatBuffer)
|
|||||||
{
|
{
|
||||||
char msgbufTimestamp[MSGBUFSIZ];
|
char msgbufTimestamp[MSGBUFSIZ];
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (logfd == -1)
|
if (logfd == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetLocalTime(&st);
|
GetLocalTime(&st);
|
||||||
snprintf(msgbufTimestamp, sizeof msgbufTimestamp, "%d %02d:%02d:%02d %03d %s\n",
|
r = snprintf(msgbufTimestamp, sizeof(msgbufTimestamp), "%d %02d:%02d:%02d:%03d %s\n",
|
||||||
GetCurrentProcessId(), st.wHour, st.wMinute, st.wSecond,
|
GetCurrentProcessId(), st.wHour, st.wMinute, st.wSecond,
|
||||||
st.wMilliseconds, formatBuffer);
|
st.wMilliseconds, formatBuffer);
|
||||||
_write(logfd, msgbufTimestamp, strlen(msgbufTimestamp));
|
msgbufTimestamp[sizeof(msgbufTimestamp) - 1] = '\0';
|
||||||
|
if (r > 0 && r < sizeof(msgbufTimestamp))
|
||||||
|
_write(logfd, msgbufTimestamp, (unsigned int)strlen(msgbufTimestamp));
|
||||||
}
|
}
|
@ -100,7 +100,6 @@ opendir(const char *name)
|
|||||||
DIR *pdir;
|
DIR *pdir;
|
||||||
wchar_t searchstr[PATH_MAX];
|
wchar_t searchstr[PATH_MAX];
|
||||||
wchar_t* wname = NULL;
|
wchar_t* wname = NULL;
|
||||||
int needed;
|
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
/* Detect root dir */
|
/* Detect root dir */
|
||||||
@ -250,7 +249,7 @@ readdir(void *avp)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(pdirentry.d_name, tmp, sizeof(pdirentry.d_name));
|
strncpy_s(pdirentry.d_name, PATH_MAX, tmp, strlen(tmp) + 1);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
|
||||||
pdirentry.d_ino = 1; /* a fictious one like UNIX to say it is nonzero */
|
pdirentry.d_ino = 1; /* a fictious one like UNIX to say it is nonzero */
|
||||||
|
@ -46,7 +46,8 @@ wmain(int argc, wchar_t **wargv) {
|
|||||||
if ((argv = malloc(argc * sizeof(char*))) == NULL)
|
if ((argv = malloc(argc * sizeof(char*))) == NULL)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
argv[i] = utf16_to_utf8(wargv[i]);
|
if ((argv[i] = utf16_to_utf8(wargv[i])) == NULL)
|
||||||
|
fatal("out of memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getenv("SSH_AUTH_SOCK") == NULL)
|
if (getenv("SSH_AUTH_SOCK") == NULL)
|
||||||
|
18
dispatch.c
18
dispatch.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: dispatch.c,v 1.29 2017/04/30 23:28:42 djm Exp $ */
|
/* $OpenBSD: dispatch.c,v 1.31 2017/05/31 07:00:13 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -38,9 +38,8 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
dispatch_protocol_error(int type, u_int32_t seq, void *ctx)
|
dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
logit("dispatch_protocol_error: type %d seq %u", type, seq);
|
logit("dispatch_protocol_error: type %d seq %u", type, seq);
|
||||||
@ -53,7 +52,7 @@ dispatch_protocol_error(int type, u_int32_t seq, void *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
dispatch_protocol_ignore(int type, u_int32_t seq, void *ssh)
|
dispatch_protocol_ignore(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
logit("dispatch_protocol_ignore: type %d seq %u", type, seq);
|
logit("dispatch_protocol_ignore: type %d seq %u", type, seq);
|
||||||
return 0;
|
return 0;
|
||||||
@ -86,8 +85,7 @@ ssh_dispatch_set(struct ssh *ssh, int type, dispatch_fn *fn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done,
|
ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done)
|
||||||
void *ctxt)
|
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
u_char type;
|
u_char type;
|
||||||
@ -112,8 +110,7 @@ ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done,
|
|||||||
ssh->dispatch_skip_packets--;
|
ssh->dispatch_skip_packets--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* XXX 'ssh' will replace 'ctxt' later */
|
r = (*ssh->dispatch[type])(type, seqnr, ssh);
|
||||||
r = (*ssh->dispatch[type])(type, seqnr, ctxt);
|
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
return r;
|
return r;
|
||||||
} else {
|
} else {
|
||||||
@ -129,11 +126,10 @@ ssh_dispatch_run(struct ssh *ssh, int mode, volatile sig_atomic_t *done,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ssh_dispatch_run_fatal(struct ssh *ssh, int mode, volatile sig_atomic_t *done,
|
ssh_dispatch_run_fatal(struct ssh *ssh, int mode, volatile sig_atomic_t *done)
|
||||||
void *ctxt)
|
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if ((r = ssh_dispatch_run(ssh, mode, done, ctxt)) != 0)
|
if ((r = ssh_dispatch_run(ssh, mode, done)) != 0)
|
||||||
sshpkt_fatal(ssh, __func__, r);
|
sshpkt_fatal(ssh, __func__, r);
|
||||||
}
|
}
|
||||||
|
14
dispatch.h
14
dispatch.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: dispatch.h,v 1.12 2015/01/19 20:07:45 markus Exp $ */
|
/* $OpenBSD: dispatch.h,v 1.14 2017/05/31 07:00:13 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
@ -36,15 +36,15 @@ enum {
|
|||||||
|
|
||||||
struct ssh;
|
struct ssh;
|
||||||
|
|
||||||
typedef int dispatch_fn(int, u_int32_t, void *);
|
typedef int dispatch_fn(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int dispatch_protocol_error(int, u_int32_t, void *);
|
int dispatch_protocol_error(int, u_int32_t, struct ssh *);
|
||||||
int dispatch_protocol_ignore(int, u_int32_t, void *);
|
int dispatch_protocol_ignore(int, u_int32_t, struct ssh *);
|
||||||
void ssh_dispatch_init(struct ssh *, dispatch_fn *);
|
void ssh_dispatch_init(struct ssh *, dispatch_fn *);
|
||||||
void ssh_dispatch_set(struct ssh *, int, dispatch_fn *);
|
void ssh_dispatch_set(struct ssh *, int, dispatch_fn *);
|
||||||
void ssh_dispatch_range(struct ssh *, u_int, u_int, dispatch_fn *);
|
void ssh_dispatch_range(struct ssh *, u_int, u_int, dispatch_fn *);
|
||||||
int ssh_dispatch_run(struct ssh *, int, volatile sig_atomic_t *, void *);
|
int ssh_dispatch_run(struct ssh *, int, volatile sig_atomic_t *);
|
||||||
void ssh_dispatch_run_fatal(struct ssh *, int, volatile sig_atomic_t *, void *);
|
void ssh_dispatch_run_fatal(struct ssh *, int, volatile sig_atomic_t *);
|
||||||
|
|
||||||
#define dispatch_init(dflt) \
|
#define dispatch_init(dflt) \
|
||||||
ssh_dispatch_init(active_state, (dflt))
|
ssh_dispatch_init(active_state, (dflt))
|
||||||
@ -52,7 +52,5 @@ void ssh_dispatch_run_fatal(struct ssh *, int, volatile sig_atomic_t *, void *);
|
|||||||
ssh_dispatch_range(active_state, (from), (to), (fn))
|
ssh_dispatch_range(active_state, (from), (to), (fn))
|
||||||
#define dispatch_set(type, fn) \
|
#define dispatch_set(type, fn) \
|
||||||
ssh_dispatch_set(active_state, (type), (fn))
|
ssh_dispatch_set(active_state, (type), (fn))
|
||||||
#define dispatch_run(mode, done, ctxt) \
|
|
||||||
ssh_dispatch_run_fatal(active_state, (mode), (done), (ctxt))
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
#include <lm.h>
|
#include <lm.h>
|
||||||
|
#include <wchar.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
@ -53,6 +54,7 @@ int
|
|||||||
ga_init(const char *user, gid_t base)
|
ga_init(const char *user, gid_t base)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
|
#pragma warning(push, 3)
|
||||||
LPLOCALGROUP_USERS_INFO_0 local_groups_info = NULL, tmp_groups_info;
|
LPLOCALGROUP_USERS_INFO_0 local_groups_info = NULL, tmp_groups_info;
|
||||||
wchar_t *user_utf16 = NULL, *full_name_utf16 = NULL, *udom_utf16 = NULL, *tmp;
|
wchar_t *user_utf16 = NULL, *full_name_utf16 = NULL, *udom_utf16 = NULL, *tmp;
|
||||||
char *group_utf8 = NULL;
|
char *group_utf8 = NULL;
|
||||||
@ -68,7 +70,7 @@ ga_init(const char *user, gid_t base)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
full_name_len = wcslen(user_utf16) + 1;
|
full_name_len = (DWORD)wcslen(user_utf16) + 1;
|
||||||
if ((full_name_utf16 = malloc(full_name_len * sizeof(wchar_t))) == NULL) {
|
if ((full_name_utf16 = malloc(full_name_len * sizeof(wchar_t))) == NULL) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
goto done;
|
goto done;
|
||||||
@ -77,7 +79,7 @@ ga_init(const char *user, gid_t base)
|
|||||||
if ((tmp = wcschr(user_utf16, L'@')) != NULL) {
|
if ((tmp = wcschr(user_utf16, L'@')) != NULL) {
|
||||||
udom_utf16 = tmp + 1;
|
udom_utf16 = tmp + 1;
|
||||||
*tmp = L'\0';
|
*tmp = L'\0';
|
||||||
index = wcslen(udom_utf16) + 1;
|
index = (DWORD)wcslen(udom_utf16) + 1;
|
||||||
wmemcpy(full_name_utf16, udom_utf16, index);
|
wmemcpy(full_name_utf16, udom_utf16, index);
|
||||||
full_name_utf16[wcslen(udom_utf16)] = L'\\';
|
full_name_utf16[wcslen(udom_utf16)] = L'\\';
|
||||||
}
|
}
|
||||||
@ -127,6 +129,8 @@ done:
|
|||||||
if (local_groups_info != NULL)
|
if (local_groups_info != NULL)
|
||||||
NetApiBufferFree(local_groups_info);
|
NetApiBufferFree(local_groups_info);
|
||||||
|
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
#else /* !WINDOWS */
|
#else /* !WINDOWS */
|
||||||
gid_t *groups_bygid;
|
gid_t *groups_bygid;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: hostfile.c,v 1.70 2017/04/30 23:18:44 djm Exp $ */
|
/* $OpenBSD: hostfile.c,v 1.71 2017/05/31 09:15:42 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -251,7 +251,7 @@ record_hostkey(struct hostkey_foreach_line *l, void *_ctx)
|
|||||||
l->marker == MRK_NONE ? "" :
|
l->marker == MRK_NONE ? "" :
|
||||||
(l->marker == MRK_CA ? "ca " : "revoked "),
|
(l->marker == MRK_CA ? "ca " : "revoked "),
|
||||||
sshkey_type(l->key), l->path, l->linenum);
|
sshkey_type(l->key), l->path, l->linenum);
|
||||||
if ((tmp = reallocarray(hostkeys->entries,
|
if ((tmp = recallocarray(hostkeys->entries, hostkeys->num_entries,
|
||||||
hostkeys->num_entries + 1, sizeof(*hostkeys->entries))) == NULL)
|
hostkeys->num_entries + 1, sizeof(*hostkeys->entries))) == NULL)
|
||||||
return SSH_ERR_ALLOC_FAIL;
|
return SSH_ERR_ALLOC_FAIL;
|
||||||
hostkeys->entries = tmp;
|
hostkeys->entries = tmp;
|
||||||
|
16
kex.c
16
kex.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kex.c,v 1.132 2017/04/30 23:10:43 djm Exp $ */
|
/* $OpenBSD: kex.c,v 1.133 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
/* prototype */
|
/* prototype */
|
||||||
static int kex_choose_conf(struct ssh *);
|
static int kex_choose_conf(struct ssh *);
|
||||||
static int kex_input_newkeys(int, u_int32_t, void *);
|
static int kex_input_newkeys(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
static const char *proposal_names[PROPOSAL_MAX] = {
|
static const char *proposal_names[PROPOSAL_MAX] = {
|
||||||
"KEX algorithms",
|
"KEX algorithms",
|
||||||
@ -315,9 +315,8 @@ kex_prop_free(char **proposal)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static int
|
static int
|
||||||
kex_protocol_error(int type, u_int32_t seq, void *ctxt)
|
kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = active_state; /* XXX */
|
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
error("kex protocol error: type %d seq %u", type, seq);
|
error("kex protocol error: type %d seq %u", type, seq);
|
||||||
@ -375,9 +374,8 @@ kex_send_newkeys(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
kex_input_ext_info(int type, u_int32_t seq, void *ctxt)
|
kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
u_int32_t i, ninfo;
|
u_int32_t i, ninfo;
|
||||||
char *name, *val, *found;
|
char *name, *val, *found;
|
||||||
@ -414,9 +412,8 @@ kex_input_ext_info(int type, u_int32_t seq, void *ctxt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kex_input_newkeys(int type, u_int32_t seq, void *ctxt)
|
kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@ -467,9 +464,8 @@ kex_send_kexinit(struct ssh *ssh)
|
|||||||
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
int
|
int
|
||||||
kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
|
kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
const u_char *ptr;
|
const u_char *ptr;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
6
kex.h
6
kex.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kex.h,v 1.82 2017/05/03 21:08:09 naddy Exp $ */
|
/* $OpenBSD: kex.h,v 1.83 2017/05/30 14:23:52 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
@ -181,8 +181,8 @@ int kex_prop2buf(struct sshbuf *, char *proposal[PROPOSAL_MAX]);
|
|||||||
void kex_prop_free(char **);
|
void kex_prop_free(char **);
|
||||||
|
|
||||||
int kex_send_kexinit(struct ssh *);
|
int kex_send_kexinit(struct ssh *);
|
||||||
int kex_input_kexinit(int, u_int32_t, void *);
|
int kex_input_kexinit(int, u_int32_t, struct ssh *);
|
||||||
int kex_input_ext_info(int, u_int32_t, void *);
|
int kex_input_ext_info(int, u_int32_t, struct ssh *);
|
||||||
int kex_derive_keys(struct ssh *, u_char *, u_int, const struct sshbuf *);
|
int kex_derive_keys(struct ssh *, u_char *, u_int, const struct sshbuf *);
|
||||||
int kex_derive_keys_bn(struct ssh *, u_char *, u_int, const BIGNUM *);
|
int kex_derive_keys_bn(struct ssh *, u_char *, u_int, const BIGNUM *);
|
||||||
int kex_send_newkeys(struct ssh *);
|
int kex_send_newkeys(struct ssh *);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexc25519c.c,v 1.7 2015/01/26 06:10:03 djm Exp $ */
|
/* $OpenBSD: kexc25519c.c,v 1.8 2017/05/31 04:17:12 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||||
@ -44,7 +44,7 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_c25519_reply(int type, u_int32_t seq, void *ctxt);
|
input_kex_c25519_reply(int type, u_int32_t seq, struct ssh *ssh);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexc25519_client(struct ssh *ssh)
|
kexc25519_client(struct ssh *ssh)
|
||||||
@ -69,9 +69,8 @@ kexc25519_client(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_c25519_reply(int type, u_int32_t seq, void *ctxt)
|
input_kex_c25519_reply(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
struct sshkey *server_host_key = NULL;
|
struct sshkey *server_host_key = NULL;
|
||||||
struct sshbuf *shared_secret = NULL;
|
struct sshbuf *shared_secret = NULL;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
|
|
||||||
static int input_kex_c25519_init(int, u_int32_t, void *);
|
static int input_kex_c25519_init(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexc25519_server(struct ssh *ssh)
|
kexc25519_server(struct ssh *ssh)
|
||||||
@ -52,9 +52,8 @@ kexc25519_server(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_c25519_init(int type, u_int32_t seq, void *ctxt)
|
input_kex_c25519_init(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
struct sshkey *server_host_private, *server_host_public;
|
struct sshkey *server_host_private, *server_host_public;
|
||||||
struct sshbuf *shared_secret = NULL;
|
struct sshbuf *shared_secret = NULL;
|
||||||
|
7
kexdhc.c
7
kexdhc.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexdhc.c,v 1.19 2016/05/02 10:26:04 djm Exp $ */
|
/* $OpenBSD: kexdhc.c,v 1.20 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -49,7 +49,7 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
|
|
||||||
static int input_kex_dh(int, u_int32_t, void *);
|
static int input_kex_dh(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexdh_client(struct ssh *ssh)
|
kexdh_client(struct ssh *ssh)
|
||||||
@ -100,9 +100,8 @@ kexdh_client(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_dh(int type, u_int32_t seq, void *ctxt)
|
input_kex_dh(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
|
BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
|
||||||
struct sshkey *server_host_key = NULL;
|
struct sshkey *server_host_key = NULL;
|
||||||
|
7
kexdhs.c
7
kexdhs.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexdhs.c,v 1.24 2016/05/02 10:26:04 djm Exp $ */
|
/* $OpenBSD: kexdhs.c,v 1.25 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -49,7 +49,7 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
|
|
||||||
static int input_kex_dh_init(int, u_int32_t, void *);
|
static int input_kex_dh_init(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexdh_server(struct ssh *ssh)
|
kexdh_server(struct ssh *ssh)
|
||||||
@ -91,9 +91,8 @@ kexdh_server(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
|
input_kex_dh_init(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
|
BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
|
||||||
struct sshkey *server_host_public, *server_host_private;
|
struct sshkey *server_host_public, *server_host_private;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexecdhc.c,v 1.10 2015/01/26 06:10:03 djm Exp $ */
|
/* $OpenBSD: kexecdhc.c,v 1.11 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||||
@ -49,7 +49,7 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
|
|
||||||
static int input_kex_ecdh_reply(int, u_int32_t, void *);
|
static int input_kex_ecdh_reply(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexecdh_client(struct ssh *ssh)
|
kexecdh_client(struct ssh *ssh)
|
||||||
@ -95,9 +95,8 @@ kexecdh_client(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_ecdh_reply(int type, u_int32_t seq, void *ctxt)
|
input_kex_ecdh_reply(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
const EC_GROUP *group;
|
const EC_GROUP *group;
|
||||||
EC_POINT *server_public = NULL;
|
EC_POINT *server_public = NULL;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexecdhs.c,v 1.15 2015/12/04 16:41:28 markus Exp $ */
|
/* $OpenBSD: kexecdhs.c,v 1.16 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
* Copyright (c) 2010 Damien Miller. All rights reserved.
|
||||||
@ -47,7 +47,7 @@
|
|||||||
#include "ssherr.h"
|
#include "ssherr.h"
|
||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
|
|
||||||
static int input_kex_ecdh_init(int, u_int32_t, void *);
|
static int input_kex_ecdh_init(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexecdh_server(struct ssh *ssh)
|
kexecdh_server(struct ssh *ssh)
|
||||||
@ -58,9 +58,8 @@ kexecdh_server(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_ecdh_init(int type, u_int32_t seq, void *ctxt)
|
input_kex_ecdh_init(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
EC_POINT *client_public;
|
EC_POINT *client_public;
|
||||||
EC_KEY *server_key = NULL;
|
EC_KEY *server_key = NULL;
|
||||||
|
12
kexgexc.c
12
kexgexc.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kexgexc.c,v 1.24 2017/05/16 16:56:15 djm Exp $ */
|
/* $OpenBSD: kexgexc.c,v 1.25 2017/05/30 14:23:52 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Niels Provos. All rights reserved.
|
* Copyright (c) 2000 Niels Provos. All rights reserved.
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
@ -51,8 +51,8 @@
|
|||||||
#include "sshbuf.h"
|
#include "sshbuf.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
static int input_kex_dh_gex_group(int, u_int32_t, void *);
|
static int input_kex_dh_gex_group(int, u_int32_t, struct ssh *);
|
||||||
static int input_kex_dh_gex_reply(int, u_int32_t, void *);
|
static int input_kex_dh_gex_reply(int, u_int32_t, struct ssh *);
|
||||||
|
|
||||||
int
|
int
|
||||||
kexgex_client(struct ssh *ssh)
|
kexgex_client(struct ssh *ssh)
|
||||||
@ -89,9 +89,8 @@ kexgex_client(struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_dh_gex_group(int type, u_int32_t seq, void *ctxt)
|
input_kex_dh_gex_group(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
BIGNUM *p = NULL, *g = NULL;
|
BIGNUM *p = NULL, *g = NULL;
|
||||||
int r, bits;
|
int r, bits;
|
||||||
@ -143,9 +142,8 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
input_kex_dh_gex_reply(int type, u_int32_t seq, void *ctxt)
|
input_kex_dh_gex_reply(int type, u_int32_t seq, struct ssh *ssh)
|
||||||
{
|
{
|
||||||
struct ssh *ssh = ctxt;
|
|
||||||
struct kex *kex = ssh->kex;
|
struct kex *kex = ssh->kex;
|
||||||
BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
|
BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
|
||||||
struct sshkey *server_host_key = NULL;
|
struct sshkey *server_host_key = NULL;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user