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
75ac7c06
Commit
75ac7c06
authored
21 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Fixed Unix compilation errors in recent changes (cbdata arg added to lputs and
other callback functions).
parent
db450e63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sbbscon.c
+11
-11
11 additions, 11 deletions
src/sbbs3/sbbscon.c
with
11 additions
and
11 deletions
src/sbbs3/sbbscon.c
+
11
−
11
View file @
75ac7c06
...
...
@@ -831,7 +831,7 @@ static void handle_sigs(void) {
sigset_t
sigs
;
char
str
[
1024
];
thread_up
(
TRUE
,
TRUE
);
thread_up
(
NULL
,
TRUE
,
TRUE
);
if
(
is_daemon
)
{
if
(
pidfile
!=
NULL
)
{
...
...
@@ -1541,15 +1541,15 @@ int main(int argc, char** argv)
#ifdef __unix__
if
(
getuid
())
{
/* are we running as a normal user? */
sprintf
(
str
,
"!Started as non-root user. Cannot bind() to ports below %u."
,
IPPORT_RESERVED
);
bbs_lputs
(
str
);
bbs_lputs
(
NULL
,
str
);
}
else
if
(
new_uid_name
[
0
]
==
0
)
/* check the user arg, if we have uid 0 */
bbs_lputs
(
"Warning: No user account specified, running as root."
);
bbs_lputs
(
NULL
,
"Warning: No user account specified, running as root."
);
else
{
bbs_lputs
(
"Waiting for child threads to bind ports..."
);
bbs_lputs
(
NULL
,
"Waiting for child threads to bind ports..."
);
while
((
run_bbs
&&
!
(
bbs_running
||
bbs_stopped
))
||
(
run_ftp
&&
!
(
ftp_running
||
ftp_stopped
))
||
(
run_web
&&
!
(
web_running
||
web_stopped
))
...
...
@@ -1557,25 +1557,25 @@ int main(int argc, char** argv)
||
(
run_services
&&
!
(
services_running
||
services_stopped
)))
{
mswait
(
1000
);
if
(
run_bbs
&&
!
(
bbs_running
||
bbs_stopped
))
bbs_lputs
(
"Waiting for BBS thread"
);
bbs_lputs
(
NULL
,
"Waiting for BBS thread"
);
if
(
run_web
&&
!
(
web_running
||
web_stopped
))
bbs_lputs
(
"Waiting for Web thread"
);
bbs_lputs
(
NULL
,
"Waiting for Web thread"
);
if
(
run_ftp
&&
!
(
ftp_running
||
ftp_stopped
))
bbs_lputs
(
"Waiting for FTP thread"
);
bbs_lputs
(
NULL
,
"Waiting for FTP thread"
);
if
(
run_mail
&&
!
(
mail_running
||
mail_stopped
))
bbs_lputs
(
"Waiting for Mail thread"
);
bbs_lputs
(
NULL
,
"Waiting for Mail thread"
);
if
(
run_services
&&
!
(
services_running
||
services_stopped
))
bbs_lputs
(
"Waiting for Services thread"
);
bbs_lputs
(
NULL
,
"Waiting for Services thread"
);
}
if
(
!
do_setuid
(
FALSE
))
/* actually try to change the uid of this process */
bbs_lputs
(
"!Setting new user_id failed! (Does the user exist?)"
);
bbs_lputs
(
NULL
,
"!Setting new user_id failed! (Does the user exist?)"
);
else
{
char
str
[
256
];
sprintf
(
str
,
"Successfully changed user_id to %s"
,
new_uid_name
);
bbs_lputs
(
str
);
bbs_lputs
(
NULL
,
str
);
/* Can't recycle servers (re-bind ports) as non-root user */
/* ToDo: Something seems to be broken here on FreeBSD now */
...
...
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