]> granicus.if.org Git - fcron/commitdiff
"-" and "_" are not word delimiter for a username anymore
authorthib <thib>
Mon, 14 Jul 2003 10:51:07 +0000 (10:51 +0000)
committerthib <thib>
Mon, 14 Jul 2003 10:51:07 +0000 (10:51 +0000)
fileconf.c

index 087d624f6adf9aea86471faa8cb80f5d3df0bfd3..a2aba578957b15330cdbfedb6ccf99a80b19c723 100644 (file)
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fileconf.c,v 1.69 2002-11-17 13:13:11 thib Exp $ */
+ /* $Id: fileconf.c,v 1.70 2003-07-14 10:51:07 thib Exp $ */
 
 #include "fcrontab.h"
 
@@ -1047,7 +1047,7 @@ check_username(char *ptr, cf_t *cf, cl_t *cl)
     /* check to see if next word is a username */
     /* we don't allow quotes, to be able to distinguish a user name from
      * a command line (where quotes are allowed) */
-    while ( isalnum( (int) ptr[indx]) ) indx++;
+    while ( isalnum( (int) ptr[indx]) || ptr[indx] == '-' || ptr[indx] == '_' ) indx++;
     if (indx >= USER_NAME_LEN) indx = USER_NAME_LEN - 1;
     strncpy(username, ptr, indx);
     username[indx] = '\0';