Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
fe96397b
Commit
fe96397b
authored
4 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Add NO_TELNET option to terminal server.
parent
0360643a
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/main.cpp
+11
-9
11 additions, 9 deletions
src/sbbs3/main.cpp
src/sbbs3/sbbscon.c
+23
-22
23 additions, 22 deletions
src/sbbs3/sbbscon.c
src/sbbs3/startup.h
+21
-19
21 additions, 19 deletions
src/sbbs3/startup.h
with
55 additions
and
50 deletions
src/sbbs3/main.cpp
+
11
−
9
View file @
fe96397b
...
@@ -5173,6 +5173,7 @@ void DLLCALL bbs_thread(void* arg)
...
@@ -5173,6 +5173,7 @@ void DLLCALL bbs_thread(void* arg)
cleanup
(
1
);
cleanup
(
1
);
return
;
return
;
}
}
if
(
!
(
startup
->
options
&
BBS_OPT_NO_TELNET
))
{
telnet_cb
.
protocol
=
"telnet"
;
telnet_cb
.
protocol
=
"telnet"
;
telnet_cb
.
startup
=
startup
;
telnet_cb
.
startup
=
startup
;
...
@@ -5180,6 +5181,7 @@ void DLLCALL bbs_thread(void* arg)
...
@@ -5180,6 +5181,7 @@ void DLLCALL bbs_thread(void* arg)
* Add interfaces
* Add interfaces
*/
*/
xpms_add_list
(
ts_set
,
PF_UNSPEC
,
SOCK_STREAM
,
0
,
startup
->
telnet_interfaces
,
startup
->
telnet_port
,
"Telnet Server"
,
sock_cb
,
startup
->
seteuid
,
&
telnet_cb
);
xpms_add_list
(
ts_set
,
PF_UNSPEC
,
SOCK_STREAM
,
0
,
startup
->
telnet_interfaces
,
startup
->
telnet_port
,
"Telnet Server"
,
sock_cb
,
startup
->
seteuid
,
&
telnet_cb
);
}
if
(
startup
->
options
&
BBS_OPT_ALLOW_RLOGIN
)
{
if
(
startup
->
options
&
BBS_OPT_ALLOW_RLOGIN
)
{
/* open a socket and wait for a client */
/* open a socket and wait for a client */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/sbbscon.c
+
23
−
22
View file @
fe96397b
...
@@ -2050,7 +2050,8 @@ int main(int argc, char** argv)
...
@@ -2050,7 +2050,8 @@ int main(int argc, char** argv)
/* If DONT_BLAME_SYNCHRONET is set, keeps root credentials laying around */
/* If DONT_BLAME_SYNCHRONET is set, keeps root credentials laying around */
#if !defined(DONT_BLAME_SYNCHRONET)
#if !defined(DONT_BLAME_SYNCHRONET)
if
(
!
thread_suid_broken
)
{
if
(
!
thread_suid_broken
)
{
if
(
bbs_startup
.
telnet_port
<
IPPORT_RESERVED
if
(((
bbs_startup
.
options
&
BBS_OPT_NO_TELNET
)
==
0
&&
bbs_startup
.
telnet_port
<
IPPORT_RESERVED
)
||
((
bbs_startup
.
options
&
BBS_OPT_ALLOW_RLOGIN
)
||
((
bbs_startup
.
options
&
BBS_OPT_ALLOW_RLOGIN
)
&&
bbs_startup
.
rlogin_port
<
IPPORT_RESERVED
)
&&
bbs_startup
.
rlogin_port
<
IPPORT_RESERVED
)
#ifdef USE_CRYPTLIB
#ifdef USE_CRYPTLIB
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/startup.h
+
21
−
19
View file @
fe96397b
...
@@ -177,6 +177,7 @@ static struct init_field {
...
@@ -177,6 +177,7 @@ static struct init_field {
#define BBS_OPT_ALLOW_SSH (1<<12)
/* Allow logins via BSD SSH */
#define BBS_OPT_ALLOW_SSH (1<<12)
/* Allow logins via BSD SSH */
#define BBS_OPT_NO_DOS (1<<13)
/* Don't attempt to run 16-bit DOS programs */
#define BBS_OPT_NO_DOS (1<<13)
/* Don't attempt to run 16-bit DOS programs */
#define BBS_OPT_NO_NEWDAY_EVENTS (1<<14)
/* Don't check for a new day in event thread */
#define BBS_OPT_NO_NEWDAY_EVENTS (1<<14)
/* Don't check for a new day in event thread */
#define BBS_OPT_NO_TELNET (1<<15)
/* Don't accept incoming telnet connections */
#define BBS_OPT_HAPROXY_PROTO (1<<26)
/* Incoming requests are via HAproxy */
#define BBS_OPT_HAPROXY_PROTO (1<<26)
/* Incoming requests are via HAproxy */
#define BBS_OPT_NO_RECYCLE (1<<27)
/* Disable recycling of server */
#define BBS_OPT_NO_RECYCLE (1<<27)
/* Disable recycling of server */
#define BBS_OPT_GET_IDENT (1<<28)
/* Get Identity (RFC 1413) */
#define BBS_OPT_GET_IDENT (1<<28)
/* Get Identity (RFC 1413) */
...
@@ -203,6 +204,7 @@ static ini_bitdesc_t bbs_options[] = {
...
@@ -203,6 +204,7 @@ static ini_bitdesc_t bbs_options[] = {
{
BBS_OPT_ALLOW_SSH
,
"ALLOW_SSH"
},
{
BBS_OPT_ALLOW_SSH
,
"ALLOW_SSH"
},
{
BBS_OPT_NO_DOS
,
"NO_DOS"
},
{
BBS_OPT_NO_DOS
,
"NO_DOS"
},
{
BBS_OPT_NO_NEWDAY_EVENTS
,
"NO_NEWDAY_EVENTS"
},
{
BBS_OPT_NO_NEWDAY_EVENTS
,
"NO_NEWDAY_EVENTS"
},
{
BBS_OPT_NO_TELNET
,
"NO_TELNET"
},
{
BBS_OPT_NO_RECYCLE
,
"NO_RECYCLE"
},
{
BBS_OPT_NO_RECYCLE
,
"NO_RECYCLE"
},
{
BBS_OPT_GET_IDENT
,
"GET_IDENT"
},
{
BBS_OPT_GET_IDENT
,
"GET_IDENT"
},
{
BBS_OPT_NO_JAVASCRIPT
,
"NO_JAVASCRIPT"
},
{
BBS_OPT_NO_JAVASCRIPT
,
"NO_JAVASCRIPT"
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment