summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorAndreas Eversberg2008-08-30 08:24:52 +0200
committerAndreas Eversberg2008-08-30 08:24:52 +0200
commitb1ab2b9ac1cfc15d2a8f5850145dd69043cc3ef7 (patch)
tree3c243a71fbb464557fe7b349dd0803bec0c33de3 /options.c
parentFix conversion string warnings, there are lot more like these. (diff)
downloadlcr-b1ab2b9ac1cfc15d2a8f5850145dd69043cc3ef7.tar.gz
lcr-b1ab2b9ac1cfc15d2a8f5850145dd69043cc3ef7.tar.xz
lcr-b1ab2b9ac1cfc15d2a8f5850145dd69043cc3ef7.zip
LCR now runs as a user.
You may change the path of socket and lock files. LCR admin socket's flags can now be altered to allow access to other users. Lock and socket files will now be removed when terminating LCR. modified: Makefile modified: chan_lcr.c modified: default/options.conf modified: lcradmin.c modified: lcrsocket.h modified: main.c modified: options.c modified: options.h modified: socket_server.c
Diffstat (limited to 'options.c')
-rw-r--r--options.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/options.c b/options.c
index 6bfdb97..fbe7fea 100644
--- a/options.c
+++ b/options.c
@@ -30,7 +30,9 @@ struct options options = {
"", /* dummy caller id */
0, /* use tones by dsp.o */
0, /* by default use priority 0 */
- "lcr@your.machine" /* source mail adress */
+ "lcr@your.machine", /* source mail adress */
+ "/var/tmp", /* path of lock files */
+ 0700 /* rights of lcr admin socket */
};
char options_error[256];
@@ -240,6 +242,22 @@ int read_options(void)
SCPY(options.email, param);
} else
+ if (!strcmp(option,"lock"))
+ {
+ if (param[0]==0)
+ {
+ SPRINT(options_error, "Error in %s (line %d): parameter for option %s missing.\n",filename,line,option);
+ goto error;
+ }
+ if (param[strlen(param)-1] == '/')
+ param[strlen(param)-1]=0;
+ SCPY(options.lock, param);
+
+ } else
+ if (!strcmp(option,"socketrights"))
+ {
+ options.socketrights = strtol(param, NULL, 0);
+ } else
{
SPRINT(options_error, "Error in %s (line %d): wrong option keyword %s.\n", filename,line,option);
goto error;