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
e8ca4a48
Commit
e8ca4a48
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Change the terminology used for the Unix daemon "log facility".
parent
f5f939b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sbbscon.c
+13
-12
13 additions, 12 deletions
src/sbbs3/sbbscon.c
with
13 additions
and
12 deletions
src/sbbs3/sbbscon.c
+
13
−
12
View file @
e8ca4a48
...
@@ -96,7 +96,7 @@ uid_t old_uid;
...
@@ -96,7 +96,7 @@ uid_t old_uid;
gid_t
new_gid
;
gid_t
new_gid
;
gid_t
old_gid
;
gid_t
old_gid
;
BOOL
is_daemon
=
FALSE
;
BOOL
is_daemon
=
FALSE
;
BOOL
use
_facilities
=
FALSE
;
BOOL
std
_facilities
=
FALSE
;
#endif
#endif
static
const
char
*
prompt
=
static
const
char
*
prompt
=
...
@@ -149,7 +149,7 @@ static const char* usage = "usage: %s [[setting] [...]]\n"
...
@@ -149,7 +149,7 @@ static const char* usage = "usage: %s [[setting] [...]]\n"
"
\t
d[x] run as daemon, log using syslog
\n
"
"
\t
d[x] run as daemon, log using syslog
\n
"
"
\t
x is the optional LOCALx facility to use
\n
"
"
\t
x is the optional LOCALx facility to use
\n
"
"
\t
if none is specified, uses USER
\n
"
"
\t
if none is specified, uses USER
\n
"
"
\t
if '
f
' is specified, uses standard facilities
\n
"
"
\t
if '
S
' is specified, uses standard facilities
\n
"
#endif
#endif
"
\t
gi get user identity (using IDENT protocol)
\n
"
"
\t
gi get user identity (using IDENT protocol)
\n
"
"
\t
nh disable hostname lookups
\n
"
"
\t
nh disable hostname lookups
\n
"
...
@@ -171,7 +171,7 @@ static int lputs(char *str)
...
@@ -171,7 +171,7 @@ static int lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
!=
NULL
)
{
if
(
str
!=
NULL
)
{
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_AUTH
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_AUTH
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
"%s"
,
str
);
syslog
(
LOG_INFO
,
"%s"
,
str
);
...
@@ -367,7 +367,7 @@ static int bbs_lputs(char *str)
...
@@ -367,7 +367,7 @@ static int bbs_lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
==
NULL
)
if
(
str
==
NULL
)
return
(
0
);
return
(
0
);
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_AUTH
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_AUTH
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
" %s"
,
str
);
syslog
(
LOG_INFO
,
" %s"
,
str
);
...
@@ -421,7 +421,7 @@ static int ftp_lputs(char *str)
...
@@ -421,7 +421,7 @@ static int ftp_lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
==
NULL
)
if
(
str
==
NULL
)
return
(
0
);
return
(
0
);
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_FTP
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_FTP
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
"ftp %s"
,
str
);
syslog
(
LOG_INFO
,
"ftp %s"
,
str
);
...
@@ -475,7 +475,7 @@ static int mail_lputs(char *str)
...
@@ -475,7 +475,7 @@ static int mail_lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
==
NULL
)
if
(
str
==
NULL
)
return
(
0
);
return
(
0
);
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_MAIL
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_MAIL
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
"mail %s"
,
str
);
syslog
(
LOG_INFO
,
"mail %s"
,
str
);
...
@@ -529,7 +529,7 @@ static int services_lputs(char *str)
...
@@ -529,7 +529,7 @@ static int services_lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
==
NULL
)
if
(
str
==
NULL
)
return
(
0
);
return
(
0
);
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_DAEMON
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_DAEMON
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
"srvc %s"
,
str
);
syslog
(
LOG_INFO
,
"srvc %s"
,
str
);
...
@@ -583,7 +583,7 @@ static int event_lputs(char *str)
...
@@ -583,7 +583,7 @@ static int event_lputs(char *str)
if
(
is_daemon
)
{
if
(
is_daemon
)
{
if
(
str
==
NULL
)
if
(
str
==
NULL
)
return
(
0
);
return
(
0
);
if
(
use
_facilities
)
if
(
std
_facilities
)
syslog
(
LOG_INFO
|
LOG_CRON
,
"%s"
,
str
);
syslog
(
LOG_INFO
|
LOG_CRON
,
"%s"
,
str
);
else
else
syslog
(
LOG_INFO
,
"evnt %s"
,
str
);
syslog
(
LOG_INFO
,
"evnt %s"
,
str
);
...
@@ -795,7 +795,7 @@ int main(int argc, char** argv)
...
@@ -795,7 +795,7 @@ int main(int argc, char** argv)
SAFECOPY
(
new_uid_name
,
iniReadString
(
fp
,
"UNIX"
,
"User"
,
""
));
SAFECOPY
(
new_uid_name
,
iniReadString
(
fp
,
"UNIX"
,
"User"
,
""
));
SAFECOPY
(
new_gid_name
,
iniReadString
(
fp
,
"UNIX"
,
"Group"
,
""
));
SAFECOPY
(
new_gid_name
,
iniReadString
(
fp
,
"UNIX"
,
"Group"
,
""
));
is_daemon
=
iniReadBool
(
fp
,
"UNIX"
,
"Daemonize"
,
FALSE
);
is_daemon
=
iniReadBool
(
fp
,
"UNIX"
,
"Daemonize"
,
FALSE
);
SAFECOPY
(
daemon_type
,
iniReadString
(
fp
,
"UNIX"
,
"Facility"
,
"U"
));
SAFECOPY
(
daemon_type
,
iniReadString
(
fp
,
"UNIX"
,
"
Log
Facility"
,
"U"
));
#endif
#endif
/* close .ini file here */
/* close .ini file here */
if
(
fp
!=
NULL
)
if
(
fp
!=
NULL
)
...
@@ -1105,10 +1105,11 @@ int main(int argc, char** argv)
...
@@ -1105,10 +1105,11 @@ int main(int argc, char** argv)
case
'7'
:
case
'7'
:
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_LOCAL7
);
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_LOCAL7
);
break
;
break
;
case
'F'
:
case
'F'
:
/* this is legacy */
/* Use appropriate facilities */
case
'S'
:
/* Use standard facilities */
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_USER
);
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_USER
);
use
_facilities
=
TRUE
;
std
_facilities
=
TRUE
;
break
;
break
;
default:
default:
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_USER
);
openlog
(
SBBS_LOG_NAME
,
LOG_CONS
,
LOG_USER
);
...
...
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