]> git.pld-linux.org Git - packages/conserver.git/blob - conserver-locks.patch
- update
[packages/conserver.git] / conserver-locks.patch
1 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/configure.in conserver-8.1.15/configure.in
2 --- conserver-8.1.15.org/configure.in   2006-05-28 19:30:34.000000000 +0200
3 +++ conserver-8.1.15/configure.in       2007-01-19 22:29:33.683813250 +0100
4 @@ -16,6 +16,7 @@
5  AH_TEMPLATE([HAVE_OPENSSL], [have openssl support])
6  AH_TEMPLATE([HAVE_DMALLOC], [have dmalloc support])
7  AH_TEMPLATE([HAVE_SA_LEN],[Defined if sa_len member exists in struct sockaddr])
8 +AH_TEMPLATE([HAVE_MKSTEMP],[have mkstemp])
9  AH_TEMPLATE([TRUST_REVERSE_DNS],[Defined if we trust reverse DNS])
10  AH_TEMPLATE([USE_EXTENDED_MESSAGES],[Defined if we produce extended messages])
11  AH_TEMPLATE([USE_UNIX_DOMAIN_SOCKETS],[Defined if we use Unix domain sockets])
12 @@ -375,7 +376,13 @@
13         [AC_MSG_RESULT(yes)
14          AC_DEFINE(HAVE_SA_LEN)],
15         [AC_MSG_RESULT(no)])
16 -
17 +AC_MSG_CHECKING(for mkstemp)
18 +AC_TRY_COMPILE([#include <stdlib.h>],
19 +       [mkstemp("/tmp/XXXXXX");],
20 +       [AC_MSG_RESULT(yes)
21 +        AC_DEFINE(HAVE_MKSTEMP)],
22 +       [AC_MSG_RESULT(no)])
23 +       
24  
25  dnl ### Host specific checks. ######################################
26  AC_CANONICAL_HOST
27 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/consent.c conserver-8.1.15/conserver/consent.c
28 --- conserver-8.1.15.org/conserver/consent.c    2006-06-17 04:03:15.000000000 +0200
29 +++ conserver-8.1.15/conserver/consent.c        2007-01-19 22:29:33.683813250 +0100
30 @@ -49,7 +49,7 @@
31  #include <access.h>
32  #include <readcfg.h>
33  #include <main.h>
34 -
35 +#include <locks.h>
36  
37  BAUD baud[] = {
38  #if defined(FOR_CYCLADES_TS)
39 @@ -733,6 +733,9 @@
40         close(pCE->execSlaveFD);
41         pCE->execSlaveFD = 0;
42      }
43 +    if (pCE->type == DEVICE && pCE->lock == FLAGTRUE) {
44 +       rmlocks(pCE->device);
45 +   }
46      pCE->fup = 0;
47      pCE->nolog = 0;
48      pCE->autoReUp = 0;
49 @@ -1006,6 +1009,21 @@
50             pCE->fup = 1;
51             break;
52         case DEVICE:
53 +           if (pCE->lock == FLAGTRUE) {
54 +                   if (checklock(pCE->device) != NO_LOCK) {
55 +                           Error("[%s] checklock(%s): device already locked",
56 +                               pCE->server, pCE->device);
57 +                           ConsDown(pCE, FLAGTRUE, FLAGTRUE);
58 +                           return;
59 +                   }
60 +                   if (makelock(pCE->device) == FAIL) {
61 +                           Error("[%s] makelock(%s): could not lock device",
62 +                               pCE->server, pCE->device);
63 +                           ConsDown(pCE, FLAGTRUE, FLAGTRUE);
64 +                           return;
65 +                   }
66 +                   /* now we have the lock */
67 +           }
68             if (-1 ==
69                 (cofile = open(pCE->device, O_RDWR | O_NONBLOCK, 0600))) {
70  
71 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/consent.h conserver-8.1.15/conserver/consent.h
72 --- conserver-8.1.15.org/conserver/consent.h    2006-05-28 19:27:14.000000000 +0200
73 +++ conserver-8.1.15/conserver/consent.h        2007-01-19 22:30:12.482238000 +0100
74 @@ -133,6 +133,7 @@
75      FLAG autoreinit;           /* auto-reinitialize if failed          */
76      FLAG unloved;              /* copy "unloved" data to stdout        */
77      FLAG login;                        /* allow logins to the console          */
78 +    FLAG lock;                 /* lock the device                      */
79  
80      /*** runtime settings ***/
81      CONSFILE *fdlog;           /* the local log file                   */
82 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/locks.c conserver-8.1.15/conserver/locks.c
83 --- conserver-8.1.15.org/conserver/locks.c      1970-01-01 01:00:00.000000000 +0100
84 +++ conserver-8.1.15/conserver/locks.c  2007-01-19 22:37:58.587367750 +0100
85 @@ -0,0 +1,439 @@
86 +#ident "$Id$ Copyright (c) Gert Doering / Paul Sutcliffe Jr."
87 +
88 +/* large parts of the code in this module are taken from the
89 + * "getty kit 2.0" by Paul Sutcliffe, Jr., paul@devon.lns.pa.us,
90 + * and are used with permission here.
91 + * SVR4 style locking by Bodo Bauer, bodo@hal.nbg.sub.org.
92 + */
93 +/* adopted from mgetty 1.1.30 for conserver
94 + * by Sebastian Zagrodzki, s.zagrodzki@net.icm.edu.pl */
95 +
96 +#ifdef HAVE_CONFIG_H
97 +#include "config.h"
98 +#endif
99 +
100 +#include <stdio.h>
101 +#include <unistd.h>
102 +#include <stdlib.h>
103 +#include <fcntl.h>
104 +#include <signal.h>
105 +#include <string.h>
106 +#include <sys/types.h>
107 +#include <sys/stat.h>
108 +#include <ctype.h>
109 +
110 +/* some OSes do include this in stdio.h, others don't... */
111 +#ifndef EEXIST
112 +#include <errno.h>
113 +#endif
114 +
115 +/* SVR4 uses a different locking mechanism. This is why we need this... */
116 +#ifdef SVR4 
117 +#include <sys/mkdev.h>
118
119 +#define LCK_NODEV    -1
120 +#define LCK_OPNFAIL  -2
121 +#endif
122 +
123 +#include "locks.h"
124 +
125 +int add_lock_to_list(char *device)
126 +{
127 +       s_ldev *temp_ldev, *ldev, *p_ldev = NULL;
128 +
129 +       Debug(2, "add_lock: %s", device);
130 +       for (ldev = locked_devices; ldev && strcmp(ldev->name, device);
131 +               p_ldev = ldev, ldev = ldev->next); 
132 +
133 +       if (ldev) { /* we had it already */
134 +               Msg("add_lock: That lock was already on my list");
135 +               return(SUCCESS);
136 +       }
137 +
138 +       if (!(temp_ldev = (s_ldev *) malloc(sizeof(s_ldev))))
139 +               OutOfMem();
140 +
141 +       if (!(temp_ldev->name = (char *) malloc(strlen(device)+1)))
142 +               OutOfMem();
143 +
144 +       strcpy(temp_ldev->name, device);
145 +       temp_ldev->next = NULL;
146 +       if (p_ldev)
147 +               p_ldev->next = temp_ldev;
148 +       else
149 +               locked_devices = temp_ldev;
150 +       return(SUCCESS);
151 +}
152 +       
153 +int remove_lock_from_list(char *device)
154 +{
155 +       s_ldev *ldev, *p_ldev = NULL;
156 +
157 +       Debug(2, "remove_lock: %s", device);
158 +       for (ldev = locked_devices; ldev && strcmp(ldev->name, device);
159 +               p_ldev = ldev, ldev = ldev->next);
160 +       if (!ldev) {
161 +               Msg("remove_lock: That lock wasn't on my list");
162 +               return(SUCCESS);
163 +       }
164 +       free(ldev->name);
165 +       if (p_ldev)
166 +               p_ldev->next = ldev->next;
167 +       else
168 +               locked_devices = ldev->next;
169 +       free(ldev);
170 +       return(SUCCESS);
171 +}
172 +               
173 +int lock_is_on_list(char *device)
174 +{
175 +       s_ldev *ldev;
176 +       for (ldev = locked_devices; ldev && strcmp(ldev->name, device);
177 +               ldev = ldev->next);
178 +       if (!ldev) {
179 +               Debug(2, "lock_is_on_list: not found: %s", device);
180 +               return(FALSE);
181 +       } else {
182 +               Debug(2, "lock_is_on_list: FOUND: %s", device);
183 +               return(TRUE);
184 +       }
185 +}
186 +               
187 +
188 +/*
189 + *     makelock() - attempt to create a lockfile
190 + *
191 + *     Returns FAIL if lock could not be made (line in use).
192 + */
193 +
194 +int makelock(char *device)
195 +{
196 +       int fd, pid;
197 +       char *temp, buf[MAXLINE+1];
198 +       int tries = 0;
199 +       char    lock[MAXLINE+1];
200 +
201 +       s_ldev *ldev, *temp_ldev;
202 +       Debug(2, "makelock: %s", device);
203 +       for (ldev = locked_devices; ldev; ldev = ldev->next) {
204 +               if (!strcmp(device, locked_devices->name)) {
205 +                       Msg("We already had a lock");
206 +                       return (SUCCESS);
207 +               }
208 +       }
209 +
210 +       if (get_lock_name(lock, device) == NULL) {
211 +               Error("Cannot get lock filename");
212 +               return (FAIL);
213 +       }
214 +       Debug(2, "makelock: lock='%s'", lock);
215 +
216 +       /* first make a temp file */
217 +
218 +#ifdef HAVE_MKSTEMP
219 +       /* secure, but not as portable */
220 +       temp=buf;
221 +       sprintf(buf, LOCK, "TM.XXXXXX");
222 +       if ((fd = mkstemp(temp)) == FAIL ) {
223 +               Error("cannot create tempfile (%s)", temp);
224 +               return(FAIL);
225 +       }
226 +#else
227 +       /* portable, but subject to some problems on some platforms */
228 +again:
229 +       sprintf(buf, LOCK, "TM.XXXXXX");
230 +       temp = mktemp(buf);
231 +       unlink(temp);
232 +       if ((fd = open(temp, O_CREAT|O_WRONLY|O_EXCL, 0644)) == FAIL) {
233 +               Error("cannot create tempfile (%s)", temp);
234 +               if ( errno == EEXIST && ++tries < 20 ) goto again;
235 +               return(FAIL);
236 +       }
237 +#endif
238 +
239 +       /* just in case some "umask" is set (errors are ignored) */
240 +       chmod( temp, 0644 );
241 +
242 +       /* put my pid in it */
243 +       if ( lock_write_pid( fd ) == FAIL)
244 +                               { unlink(temp); return FAIL; }
245 +
246 +       /* link it to the lock file */
247 +
248 +       while (link(temp, lock) == FAIL)
249 +       {
250 +               if (errno != EEXIST )
251 +               {
252 +                   Error("lock not made: link(temp,lock) failed" );
253 +               }
254 +
255 +               if (errno == EEXIST)            /* lock file already there */
256 +               {
257 +                   if ((pid = readlock(lock)) == FAIL)
258 +                   {
259 +                       if ( errno == ENOENT )  /* disappeared */
260 +                           continue;
261 +                       else
262 +                       {
263 +                           Debug(2, "cannot read lockfile" );
264 +                           unlink(temp);
265 +                           return FAIL;
266 +                       }
267 +                   }
268 +
269 +                   if (pid == getpid())        /* huh? WE locked the line!*/
270 +                   {
271 +                       Msg("we *have* the line!" );
272 +                       break;
273 +                   }
274 +
275 +                   if ((kill(pid, 0) == FAIL) && errno == ESRCH)
276 +                   {
277 +                       /* pid that created lockfile is gone */
278 +                       Debug(2, "stale lockfile, created by process %d, ignoring", pid );
279 +                       if ( unlink(lock) < 0 &&
280 +                                errno != EINTR && errno != ENOENT )
281 +                       {
282 +                           Error("unlink() failed, giving up" );
283 +                           unlink(temp);
284 +                           return FAIL;
285 +                       }
286 +                       continue;
287 +                   }
288 +                   
289 +                   Msg("lock not made: lock file exists (pid=%d)", pid);
290 +               }                               /* if (errno == EEXIST) */
291 +               
292 +               (void) unlink(temp);
293 +               return(FAIL);
294 +       }
295 +       
296 +       Debug(2, "lock made");
297 +       (void) unlink(temp);
298 +
299 +       Msg("Locking device");
300 +       add_lock_to_list(device);
301 +       return(SUCCESS);
302 +}
303 +   
304 +/*
305 + *     checklock() - test for presence of valid lock file
306 + *
307 + *     if lockfile found, return PID of process holding it, 0 otherwise
308 + */
309 +
310 +int checklock (char *device)
311 +{
312 +    int pid;
313 +    struct stat st;
314 +    char name[MAXLINE+1];
315 +    
316 +    if ( get_lock_name( name, device ) == NULL )
317 +    {
318 +       Error("cannot get lock name" );
319 +       return NO_LOCK;
320 +    }
321 +
322 +    if ((stat(name, &st) == FAIL) && errno == ENOENT)
323 +    {
324 +       Debug(2, "checklock: stat failed, no file");
325 +       return NO_LOCK;
326 +    }
327 +    
328 +    if ((pid = readlock(name)) == FAIL)
329 +    {
330 +       Msg("checklock: couldn't read lockfile");
331 +       return NO_LOCK;
332 +    }
333 +
334 +    if (pid == getpid())
335 +    {
336 +       Msg("huh? It's *our* lock file!" );
337 +       return NO_LOCK;
338 +    }
339 +               
340 +    if ((kill(pid, 0) == FAIL) && errno == ESRCH)
341 +    {
342 +       Debug(2, "checklock: no active process has lock, will remove");
343 +       (void) unlink(name);
344 +       return NO_LOCK;
345 +    }
346 +    
347 +    Debug(2, "lockfile found, pid=%d", pid );
348 +    
349 +    return pid;
350 +}
351 +
352 +/*
353 + *     readlock() - read contents of lockfile
354 + *
355 + *     Returns pid read or FAIL on error.
356 + *
357 + *      private function
358 + */
359 +
360 +int readlock (char *name)
361 +{
362 +       int fd, pid;
363 +       char apid[20];
364 +       int  length;
365 +
366 +       if ((fd = open(name, O_RDONLY)) == FAIL)
367 +               return(FAIL);
368 +
369 +       length = read(fd, apid, sizeof(apid)-1);
370 +       apid[length]=0;         /* make sscanf() happy */
371 +
372 +       pid = 0;
373 +       if ( length == sizeof( pid ) || sscanf(apid, "%d", &pid) != 1 ||
374 +            pid == 0 )
375 +       {
376 +           pid = * ( (int *) apid );
377 +#if LOCKS_BINARY == 0
378 +           Msg("compiled with ascii locks, found binary lock file (length=%d, pid=%d)!", length, pid );
379 +#endif
380 +       }
381 +#if LOCKS_BINARY == 1
382 +       else
383 +       {
384 +           Msg("compiled with binary locks, found ascii lock file (length=%d, pid=%d)!", length, pid );
385 +       }
386 +#endif
387 +
388 +       (void) close(fd);
389 +       return(pid);
390 +}
391 +
392 +/* lock_write_pid()
393 + *
394 + * write contents of lock file: my process ID in specified format
395 + *
396 + * private function
397 + */
398 +int lock_write_pid (int fd)
399 +{
400 +#if LOCKS_BINARY
401 +    int bpid;                  /* must be 4 bytes wide! */
402 +    bpid = getpid();
403 +    if ( write(fd, &bpid, sizeof(bpid) ) != sizeof(bpid) )
404 +#else
405 +    char apid[16];
406 +    sprintf( apid, "%10d\n", (int) getpid() );
407 +    if ( write(fd, apid, strlen(apid)) != strlen(apid) )
408 +#endif
409 +    {
410 +       Error("cannot write PID to (temp) lock file" );
411 +       close(fd);
412 +       return(FAIL);
413 +    }
414 +    close(fd);
415 +    return SUCCESS;
416 +}
417 +       
418 +/*
419 + *     rmlocks() - remove lockfile
420 + *     signal handler
421 + */
422 +
423 +void rmlocks(char *device)
424 +{
425 +    char lock[MAXLINE + 1];
426 +    Debug(2, "rmlocks: %s", device);
427 +    get_lock_name(lock, device);
428 +    Debug(2, "rmlocks: lock: %s", lock);
429 +    if (lock_is_on_list(device))
430 +    {
431 +       Msg("Removing lock file" );
432 +       if (unlink(lock) == -1 )
433 +           Error("error removing lock file (huh?!)" );
434 +       /* mark lock file as 'not set' */
435 +       remove_lock_from_list(device);
436 +    }
437 +}
438 +
439 +/* get_lock_name()
440 + *
441 + * determine full path + name of the lock file for a given device
442 + */
443 +
444 +#ifdef SVR4
445 +
446 +/*
447 + * get_lock_name() - create SVR4 lock file name (Bodo Bauer)
448 + */
449 +
450 +char *get_lock_name (char* lock, char* fax_tty)
451 +{
452 +  struct stat tbuf;
453 +  char ttyname[FILENAME_MAX];
454 +
455 +  Debug(2, "get_lock_name(%s) called", fax_tty);
456 +
457 +  if ( strncmp( fax_tty, "/dev/", 5 ) == 0 )
458 +      strcpy( ttyname, fax_tty );
459 +  else
460 +      sprintf(ttyname, "/dev/%s", fax_tty);
461 +  
462 +  Debug(2, "-> ttyname %s", ttyname);
463 +
464 +  if (stat(ttyname, &tbuf) < 0) {
465 +    if(errno == ENOENT) {
466 +      Debug(2, "device does not exist: %s", ttyname);
467 +      return(NULL);            
468 +    } else {
469 +      Debug(2, "could not access line: %s", ttyname);
470 +      return(NULL);            
471 +    }
472 +  }
473 +
474 +  sprintf(lock,"%s/LK.%03u.%03u.%03u",
475 +         LOCK_PATH,
476 +         major(tbuf.st_dev),
477 +         tbuf.st_rdev >> 18, 
478 +         minor(tbuf.st_rdev));
479 +
480 +  Debug(2, "lock file: %s", lock);
481 +  return(lock);
482 +}
483 +
484 +#else  /* not SVR4 */ 
485 +
486 +char * get_lock_name (char * lock_name, char * device)
487 +{
488 +#ifdef LOCKS_LOWERCASE
489 +    /* sco locking convention -> change all device names to lowercase */
490 +
491 +    char p[MAXLINE+1];
492 +    int i;
493 +    if ( ( i = strlen( device ) ) > sizeof(p) )
494 +    {
495 +       Error("get_lock_name: device name too long" );
496 +       exit(5);
497 +    }
498 +    
499 +#ifdef LOCKS_ALL_LOWERCASE
500 +    /* convert the full name */
501 +    while ( i >= 0 )
502 +    {
503 +       p[i] = tolower( device[i] ); i--;
504 +    }
505 +#else
506 +    /* convert only the last character */
507 +    strcpy( p, device );
508 +    i--;
509 +    p[i] = tolower( p[i] );
510 +#endif
511 +    
512 +    device = p;
513 +#endif /* LOCKS_LOWERCASE */
514 +
515 +    /* throw out all directory prefixes */
516 +    if ( strchr( device, '/' ) != NULL )
517 +        device = strrchr( device, '/' ) +1;
518 +    
519 +    sprintf( lock_name, LOCK, device);
520 +
521 +    return lock_name;
522 +}
523 +       
524 +#endif /* !SVR4 */
525 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/locks.h conserver-8.1.15/conserver/locks.h
526 --- conserver-8.1.15.org/conserver/locks.h      1970-01-01 01:00:00.000000000 +0100
527 +++ conserver-8.1.15/conserver/locks.h  2007-01-19 22:29:33.687813500 +0100
528 @@ -0,0 +1,30 @@
529 +#ifndef        _locks_h
530 +#define LOCK   "/var/lock/LCK..%s"
531 +#define MAXLINE 1024
532 +#define FALSE (1==0)
533 +#define TRUE (1==1)
534 +#define SUCCESS 0
535 +#define FAIL -1
536 +#define NO_LOCK 0
537 +
538 +
539 +int             makelock (char *device);
540 +// int             makelock_file ( char * lockname );
541 +int             checklock (char *device);
542 +RETSIGTYPE      rmlocks ();
543 +// int             steal_lock (char * device, int pid );
544 +
545 +
546 +typedef struct _s_ldev {
547 +       char *name;
548 +       struct _s_ldev *next;
549 +} s_ldev;
550 +
551 +static s_ldev *locked_devices = NULL;
552 +
553 +int readlock (char *name);
554 +int makelock (char *name);
555 +char *get_lock_name (char *lock_name, char *device);
556 +int lock_write_pid (int fd);
557 +
558 +#endif
559 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/main.c conserver-8.1.15/conserver/main.c
560 --- conserver-8.1.15.org/conserver/main.c       2006-04-03 15:32:08.000000000 +0200
561 +++ conserver-8.1.15/conserver/main.c   2007-01-19 22:29:33.687813500 +0100
562 @@ -977,6 +977,9 @@
563                        "DumpDataStructures():  motd=%s, idletimeout=%d, idlestring=%s",
564                        EMPTYSTR(pCE->motd), pCE->idletimeout,
565                        EMPTYSTR(pCE->idlestring)));
566 +           CONDDEBUG((1,
567 +                       "DumpDataStructures():  lock=%s",
568 +                       FLAGSTR(pCE->lock)));
569             if (pCE->ro) {
570                 CONSENTUSERS *u;
571                 for (u = pCE->ro; u != (CONSENTUSERS *)0; u = u->next) {
572 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/Makefile.in conserver-8.1.15/conserver/Makefile.in
573 --- conserver-8.1.15.org/conserver/Makefile.in  2005-06-06 17:03:06.000000000 +0200
574 +++ conserver-8.1.15/conserver/Makefile.in      2007-01-19 22:29:33.683813250 +0100
575 @@ -30,11 +30,11 @@
576  ### Makefile rules - no user-servicable parts below
577  
578  CONSERVER_OBJS = access.o client.o consent.o group.o main.o master.o \
579 -                readcfg.o fallback.o cutil.o
580 +                readcfg.o fallback.o cutil.o locks.o
581  CONSERVER_HDRS = ../config.h $(top_srcdir)/compat.h $(srcdir)/access.h \
582                  $(srcdir)/client.h $(srcdir)/consent.h $(srcdir)/cutil.h \
583                  $(srcdir)/group.h $(srcdir)/main.h $(srcdir)/master.h \
584 -                $(srcdir)/readcfg.h $(srcdir)/version.h
585 +                $(srcdir)/readcfg.h $(srcdir)/version.h $(srcdir)/locks.h
586  
587  ALL = conserver convert
588  
589 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver/readcfg.c conserver-8.1.15/conserver/readcfg.c
590 --- conserver-8.1.15.org/conserver/readcfg.c    2006-03-20 17:47:03.000000000 +0100
591 +++ conserver-8.1.15/conserver/readcfg.c        2007-01-19 22:32:03.149154250 +0100
592 @@ -699,6 +699,8 @@
593         c->unloved = d->unloved;
594      if (d->login != FLAGUNKNOWN)
595         c->login = d->login;
596 +    if (d->lock != FLAGUNKNOWN)
597 +       c->lock = d->lock;
598      if (d->host != (char *)0) {
599         if (c->host != (char *)0)
600             free(c->host);
601 @@ -1656,6 +1658,7 @@
602         c->autoreinit = FLAGUNKNOWN;
603         c->unloved = FLAGUNKNOWN;
604         c->login = FLAGUNKNOWN;
605 +       c->lock = FLAGUNKNOWN;
606         return;
607      }
608  
609 @@ -1693,6 +1696,8 @@
610             c->unloved = negative ? FLAGFALSE : FLAGTRUE;
611         else if (strcasecmp("login", token) == 0)
612             c->login = negative ? FLAGFALSE : FLAGTRUE;
613 +       else if (strcasecmp("lock", token) == 0)
614 +           c->lock = negative ? FLAGFALSE : FLAGTRUE;
615         else if (isMaster)
616             Error("invalid option `%s' [%s:%d]", token, file, line);
617      }
618 @@ -3007,6 +3012,7 @@
619         pCEmatch->autoreinit = c->autoreinit;
620         pCEmatch->unloved = c->unloved;
621         pCEmatch->login = c->login;
622 +       pCEmatch->lock = c->lock;
623         pCEmatch->inituid = c->inituid;
624         pCEmatch->initgid = c->initgid;
625         while (pCEmatch->aliases != (NAMES *)0) {
626 @@ -3185,6 +3191,8 @@
627  #endif
628         if (c->ondemand == FLAGUNKNOWN)
629             c->ondemand = FLAGFALSE;
630 +       if (c->lock == FLAGUNKNOWN)
631 +           c->lock = FLAGFALSE;
632         if (c->reinitoncc == FLAGUNKNOWN)
633             c->reinitoncc = FLAGFALSE;
634         if (c->striphigh == FLAGUNKNOWN)
635 diff -urN -x '*.orig' -x '*~' conserver-8.1.15.org/conserver.cf/conserver.cf.man conserver-8.1.15/conserver.cf/conserver.cf.man
636 --- conserver-8.1.15.org/conserver.cf/conserver.cf.man  2006-12-31 03:03:03.000000000 +0100
637 +++ conserver-8.1.15/conserver.cf/conserver.cf.man      2007-01-19 22:29:33.691813750 +0100
638 @@ -842,6 +842,11 @@
639  Default is
640  .BR !ondemand .
641  .TP
642 +.B lock
643 +Lock the device using UUCP-style locks.
644 +Default is
645 +.BR !lock .
646 +.TP
647  .B striphigh
648  Strip the high bit off all data coming from this console and all clients
649  connected to this console before processing occurs.
This page took 0.258873 seconds and 4 git commands to generate.