Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nxssh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rx-etersoft
nxssh
Commits
15ce77de
Commit
15ce77de
authored
Nov 08, 2016
by
Stas Korobeynikov
Committed by
Pavel Vainerman
Oct 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add declarations are needed to compile without linking
parent
6ea00158
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
22 deletions
+74
-22
readpass.c
readpass.c
+5
-0
ssh-keygen.c
ssh-keygen.c
+34
-22
ssh.h
ssh.h
+2
-0
sshconnect.c
sshconnect.c
+4
-0
sshconnect2.c
sshconnect2.c
+5
-0
sshd.c
sshd.c
+24
-0
No files found.
readpass.c
View file @
15ce77de
...
...
@@ -47,6 +47,11 @@
#include "ssh.h"
#include "uidswap.h"
extern
int
NxAuthOnlyModeEnabled
;
extern
int
NXStdinPassEnabled
;
extern
int
NXServerMode
;
extern
int
NxAdminModeEnabled
;
static
char
*
ssh_askpass
(
char
*
askpass
,
const
char
*
msg
)
{
...
...
ssh-keygen.c
View file @
15ce77de
...
...
@@ -59,6 +59,7 @@
#include "krl.h"
#include "digest.h"
#include "utf8.h"
#include "servconf.h"
#ifdef WITH_OPENSSL
# define DEFAULT_KEY_TYPE_NAME "rsa"
...
...
@@ -182,6 +183,18 @@ extern char *__progname;
char
hostname
[
NI_MAXHOST
];
/* NX MODE */
/*
* This declarations are needed to compile ssh-keygen without linking to nxcomp
*/
int
NxModeEnabled
=
0
;
int
NxAuthOnlyModeEnabled
=
0
;
int
NXStdinPassEnabled
=
0
;
ServerOptions
options
;
#ifdef WITH_OPENSSL
/* moduli.c */
int
gen_candidates
(
FILE
*
,
u_int32_t
,
u_int32_t
,
BIGNUM
*
);
...
...
@@ -845,7 +858,7 @@ fingerprint_one_key(const struct sshkey *public, const char *comment)
ra
=
sshkey_fingerprint
(
public
,
fingerprint_hash
,
SSH_FP_RANDOMART
);
if
(
fp
==
NULL
||
ra
==
NULL
)
fatal
(
"%s: sshkey_fingerprint failed"
,
__func__
);
m
printf
(
"%u %s %s (%s)
\n
"
,
sshkey_size
(
public
),
fp
,
printf
(
"%u %s %s (%s)
\n
"
,
sshkey_size
(
public
),
fp
,
comment
?
comment
:
"no comment"
,
sshkey_type
(
public
));
if
(
log_level
>=
SYSLOG_LEVEL_VERBOSE
)
printf
(
"%s
\n
"
,
ra
);
...
...
@@ -1169,7 +1182,7 @@ known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx)
known_hosts_hash
(
l
,
ctx
);
else
if
(
print_fingerprint
)
{
fp
=
sshkey_fingerprint
(
l
->
key
,
fptype
,
rep
);
m
printf
(
"%s %s %s %s
\n
"
,
ctx
->
host
,
printf
(
"%s %s %s %s
\n
"
,
ctx
->
host
,
sshkey_type
(
l
->
key
),
fp
,
l
->
comment
);
free
(
fp
);
}
else
...
...
@@ -1320,7 +1333,7 @@ do_change_passphrase(struct passwd *pw)
fatal
(
"Failed to load key %s: %s"
,
identity_file
,
ssh_err
(
r
));
}
if
(
comment
)
m
printf
(
"Key has comment '%s'
\n
"
,
comment
);
printf
(
"Key has comment '%s'
\n
"
,
comment
);
/* Ask the new passphrase (twice). */
if
(
identity_new_passphrase
)
{
...
...
@@ -2462,6 +2475,18 @@ main(int argc, char **argv)
break
;
#ifdef WITH_OPENSSL
/* Moduli generation/screening */
case
'W'
:
generator_wanted
=
(
u_int32_t
)
strtonum
(
optarg
,
1
,
UINT_MAX
,
&
errstr
);
if
(
errstr
)
fatal
(
"Desired generator has bad value: %s (%s)"
,
optarg
,
errstr
);
break
;
case
'M'
:
memory
=
(
u_int32_t
)
strtonum
(
optarg
,
1
,
UINT_MAX
,
&
errstr
);
if
(
errstr
)
fatal
(
"Memory limit is %s: %s"
,
errstr
,
optarg
);
break
;
case
'G'
:
do_gen_candidates
=
1
;
if
(
strlcpy
(
out_file
,
optarg
,
sizeof
(
out_file
))
>=
...
...
@@ -2474,35 +2499,22 @@ main(int argc, char **argv)
case
'j'
:
start_lineno
=
strtoul
(
optarg
,
NULL
,
10
);
break
;
case
'T'
:
do_screen_candidates
=
1
;
if
(
strlcpy
(
out_file
,
optarg
,
sizeof
(
out_file
))
>=
sizeof
(
out_file
))
fatal
(
"Output filename too long"
);
break
;
case
'K'
:
if
(
strlen
(
optarg
)
>=
PATH_MAX
)
fatal
(
"Checkpoint filename too long"
);
checkpoint
=
xstrdup
(
optarg
);
break
;
case
'M'
:
memory
=
(
u_int32_t
)
strtonum
(
optarg
,
1
,
UINT_MAX
,
&
errstr
);
if
(
errstr
)
fatal
(
"Memory limit is %s: %s"
,
errstr
,
optarg
);
break
;
case
'S'
:
/* XXX - also compare length against bits */
if
(
BN_hex2bn
(
&
start
,
optarg
)
==
0
)
fatal
(
"Invalid start point."
);
break
;
case
'T'
:
do_screen_candidates
=
1
;
if
(
strlcpy
(
out_file
,
optarg
,
sizeof
(
out_file
))
>=
sizeof
(
out_file
))
fatal
(
"Output filename too long"
);
break
;
case
'W'
:
generator_wanted
=
(
u_int32_t
)
strtonum
(
optarg
,
1
,
UINT_MAX
,
&
errstr
);
if
(
errstr
!=
NULL
)
fatal
(
"Desired generator invalid: %s (%s)"
,
optarg
,
errstr
);
break
;
#endif
/* WITH_OPENSSL */
case
'?'
:
default:
...
...
ssh.h
View file @
15ce77de
...
...
@@ -103,3 +103,5 @@
/* Listen backlog for sshd, ssh-agent and forwarding sockets */
#define SSH_LISTEN_BACKLOG 128
extern
int
NxModeEnabled
;
sshconnect.c
View file @
15ce77de
...
...
@@ -78,6 +78,10 @@ static int matching_host_key_dns = 0;
static
pid_t
proxy_command_pid
=
0
;
extern
int
NxAuthOnlyModeEnabled
;
extern
int
NxAdminModeEnabled
;
extern
int
webproxy_flag
;
/* import */
extern
Options
options
;
extern
char
*
__progname
;
...
...
sshconnect2.c
View file @
15ce77de
...
...
@@ -82,6 +82,11 @@ extern char *client_version_string;
extern
char
*
server_version_string
;
extern
Options
options
;
extern
int
NxAuthOnlyModeEnabled
;
extern
int
NXServerMode
;
extern
int
NxAdminModeEnabled
;
extern
int
NXStdinPassEnabled
;
/*
* SSH2 key exchange
*/
...
...
sshd.c
View file @
15ce77de
...
...
@@ -131,6 +131,30 @@
extern
char
*
__progname
;
/* NX MODE */
/*
* This declarations are needed to compile sshd without linking to nxcomp
*/
int
NxModeEnabled
=
0
;
int
nx_check_switch
=
0
;
int
nx_switch_received
=
0
;
int
nx_switch_forward
=
0
;
int
nx_open_proxy_connection
()
{
return
0
;}
int
nx_check_proxy_authentication
(
int
proxy_fd
)
{
return
0
;}
int
nx_switch_client_side_descriptors
(
Channel
*
channel
,
int
proxy_fd
)
{
return
0
;}
int
nx_switch_forward_descriptors
(
Channel
*
channel
)
{
return
0
;}
int
nx_check_channel_input
(
Channel
*
channel
,
char
*
data
,
int
*
length
,
int
limit
)
{
return
0
;}
int
nx_switch_forward_port
(
Channel
*
channel
)
{
return
0
;}
int
nx_proxy_select
(
int
maxfds
,
fd_set
*
readfds
,
fd_set
*
writefds
,
fd_set
*
exceptfds
,
struct
timeval
*
timeout
)
{
return
select
(
maxfds
,
readfds
,
writefds
,
exceptfds
,
timeout
);
}
void
nx_set_socket_options
(
int
fd
,
int
blocking
)
{}
/* Server configuration options. */
ServerOptions
options
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment