[Libsysio-commit] HEAD: libsysio/drivers/incore fs_incore.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-03-09 23:15:40
|
Update of /cvsroot/libsysio/libsysio/drivers/incore In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31045/drivers/incore Modified Files: fs_incore.c Log Message: Nope. I'm not going to do it. I just can't break the backward compatibility in good conscience. The incore type mount directive must either have both uid and gid or neither. If both, the original syntax is used. Specifically, the usage now is: "incore:[+<uid>+<gid>] Which is backward compatible. Index: fs_incore.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/incore/fs_incore.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -b -B -p -r1.25 -r1.26 --- fs_incore.c 9 Mar 2007 19:35:27 -0000 1.25 +++ fs_incore.c 9 Mar 2007 23:15:37 -0000 1.26 @@ -552,12 +552,12 @@ _sysio_incore_fsswop_mount(const char *s mode = (mode_t )ul & 07777; uid = getuid(); /* default */ gid = getgid(); /* default */ - while (*cp != '\0') { + if (*cp != '\0') { /* * Get user and/or group. */ - if (*cp == '+') { - if ((ul == ULONG_MAX && errno == ERANGE) || + if (*cp != '+' || + (ul == ULONG_MAX && errno == ERANGE) || (unsigned long)mode != ul || mode > 07777) return -EINVAL; @@ -568,8 +568,8 @@ _sysio_incore_fsswop_mount(const char *s errno == ERANGE) || (long )uid != l) return -EINVAL; - } - if (*cp == '-') { + if (*cp != '+') + return -EINVAL; source = cp; l = strtol(source, &cp, 0); gid = (gid_t )l; @@ -577,7 +577,7 @@ _sysio_incore_fsswop_mount(const char *s errno == ERANGE) || (long )gid != l) return -EINVAL; - } + if (*cp != '\0') return -EINVAL; } |