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
558d9d50
Commit
558d9d50
authored
5 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added main.cnf support to cnflib/cnfdefs.js.
Also renamed preqwk_ar to preqwk_ars, for consistency.
parent
e51db9ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/load/cnfdefs.js
+118
-1
118 additions, 1 deletion
exec/load/cnfdefs.js
exec/load/cnflib.js
+6
-0
6 additions, 0 deletions
exec/load/cnflib.js
with
124 additions
and
1 deletion
exec/load/cnfdefs.js
+
118
−
1
View file @
558d9d50
...
...
@@ -172,10 +172,127 @@ struct.phub_t={
__PADDING__
:
64
};
struct
.
node_dir_t
=
{
path
:
{
bytes
:
LEN_DIR
+
1
,
type
:
"
str
"
},
};
struct
.
validation_set_t
=
{
level
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
expire
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
flags1
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
flags2
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
flags3
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
flags4
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
cdt
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
exempt
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
rest
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
__PADDING__
:
16
};
struct
.
sec_level_t
=
{
timeperday
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
timepercall
:{
bytes
:
UINT16_T
,
type
:
"
int
"
},
callsperday
:{
bytes
:
UINT16_T
,
type
:
"
int
"
},
freecdtperd
:{
bytes
:
UINT32_T
,
type
:
"
int
"
},
linespermsg
:{
bytes
:
UINT16_T
,
type
:
"
int
"
},
postsperday
:{
bytes
:
UINT16_T
,
type
:
"
int
"
},
emailperday
:{
bytes
:
UINT16_T
,
type
:
"
int
"
},
misc
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expireto
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
__PADDING__
:
11
};
struct
.
cmd_shell_t
=
{
name
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
code
:
{
bytes
:
LEN_CODE
+
1
,
type
:
"
str
"
},
ars
:
{
bytes
:
LEN_ARSTR
+
1
,
type
:
"
str
"
},
misc
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
__PADDING__
:
16
};
/* NOTE: top-level data structures only below this point
as they may contain references to the data structures above
and will not work if they are defined first */
/* main config file structure (main.cnf) */
struct
.
main
=
{
sys_name
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
sys_qwk_id
:
{
bytes
:
LEN_QWKID
+
1
,
type
:
"
str
"
},
// sys_id
sys_location
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
sys_phonefmt
:
{
bytes
:
12
+
1
,
type
:
"
str
"
},
sys_operator
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
// sys_op
sys_guru
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
sys_pass
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
node_dir
:
{
bytes
:
struct
.
node_dir_t
,
type
:
"
lst
"
},
data_dir
:
{
bytes
:
LEN_DIR
+
1
,
type
:
"
str
"
},
exec_dir
:
{
bytes
:
LEN_DIR
+
1
,
type
:
"
str
"
},
sys_logon
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
sys_logout
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
sys_daily
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
sys_timezone
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
sys_settings
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// sys_misc
sys_lastnode
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
sys_autonode
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
newuser_questions
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// uq
sys_pwdays
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
sys_deldays
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
sys_exp_warn
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
sys_autodel
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
__PADDING__
:
1
,
sys_chat_ars
:
{
bytes
:
LEN_ARSTR
+
1
,
type
:
"
str
"
},
// sys_chat_ar
cdt_min_value
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
max_minutes
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
cdt_per_dollar
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
newuser_pass
:
{
bytes
:
40
+
1
,
type
:
"
str
"
},
// new_pass
newuser_magic_word
:
{
bytes
:
20
+
1
,
type
:
"
str
"
},
// new_magic
newuser_sif
:
{
bytes
:
8
+
1
,
type
:
"
str
"
},
newuser_sof
:
{
bytes
:
8
+
1
,
type
:
"
str
"
},
newuser_level
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
newuser_flags1
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
newuser_flags2
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
newuser_flags3
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
newuser_flags4
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
newuser_exemptions
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// new_exempt
newuser_restrictions
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// new_rest
newuser_credits
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// new_cdt
newuser_minutes
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// new_min
newuser_editor
:
{
bytes
:
LEN_CODE
+
1
,
type
:
"
str
"
},
// new_xedit
newuser_expiration_days
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
// new_expire
newuser_command_shell
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
// new_shell
newuser_settings
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
// new_misc
newuser_download_protocol
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
// new_prot
new_install
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
newuser_msgscan_init
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
// new_msgcan_init
guest_msgscan_init
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
__PADDING1__
:
10
,
expired_level
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
expired_flags1
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expired_flags2
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expired_flags3
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expired_flags4
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expired_exemptions
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
expired_restrictions
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
logon_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
logoff_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
newuser_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
login_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
logout_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
sync_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
expire_mod
:
{
bytes
:
LEN_MODNAME
+
1
,
type
:
"
str
"
},
ctrlkey_passthru
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
mods_dir
:
{
bytes
:
LEN_DIR
+
1
,
type
:
"
str
"
},
logs_dir
:
{
bytes
:
LEN_DIR
+
1
,
type
:
"
str
"
},
readmail_mod
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
scanposts_mod
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
scansubs_mod
:
{
bytes
:
LEN_CMD
+
1
,
type
:
"
str
"
},
__PADDING2__
:
633
,
user_backup_level
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
mail_backup_level
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
validation_set
:
{
bytes
:
struct
.
validation_set_t
,
type
:
"
lst
"
,
length
:
10
},
sec_level
:
{
bytes
:
struct
.
sec_level_t
,
type
:
"
lst
"
,
length
:
100
},
command_shell
:
{
bytes
:
struct
.
cmd_shell_t
,
type
:
"
lst
"
},
// cmd_shell
};
/* main external programs file structure (xtrn.cnf) */
struct
.
xtrn
=
{
swap
:
{
bytes
:
struct
.
swap_t
,
type
:
"
lst
"
},
...
...
@@ -193,7 +310,7 @@ struct.msg={
max_qwkmsgs
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
mail_maxcrcs
:
{
bytes
:
UINT32_T
,
type
:
"
int
"
},
mail_maxage
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
preqwk_ar
:
{
bytes
:
LEN_ARSTR
+
1
,
type
:
"
str
"
},
preqwk_ar
s
:
{
bytes
:
LEN_ARSTR
+
1
,
type
:
"
str
"
},
// preqwk_ar
smb_retry_time
:
{
bytes
:
UCHAR
,
type
:
"
int
"
},
max_qwkmsgage
:
{
bytes
:
UINT16_T
,
type
:
"
int
"
},
__PADDING1__
:
466
,
...
...
This diff is collapsed.
Click to expand it.
exec/load/cnflib.js
+
6
−
0
View file @
558d9d50
...
...
@@ -185,6 +185,9 @@ var CNF = new (function() {
this
.
read
=
function
(
fileName
,
struct
)
{
if
(
!
struct
)
{
switch
(
file_getname
(
fileName
).
toLowerCase
())
{
case
"
main.cnf
"
:
struct
=
js
.
global
.
struct
.
main
;
break
;
case
"
xtrn.cnf
"
:
struct
=
js
.
global
.
struct
.
xtrn
;
break
;
...
...
@@ -212,6 +215,9 @@ var CNF = new (function() {
this
.
write
=
function
(
fileName
,
struct
,
data
)
{
if
(
!
struct
)
{
switch
(
file_getname
(
fileName
).
toLowerCase
())
{
case
"
main.cnf
"
:
struct
=
js
.
global
.
struct
.
main
;
break
;
case
"
xtrn.cnf
"
:
struct
=
js
.
global
.
struct
.
xtrn
;
break
;
...
...
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