[Pkg-shadow-commits] sid/debian/patches 406_good_name.dpatch,NONE,1.1 407_32char_grnames.dpatch,NONE,1.1 006_libmisc.dpatch,1.5,1.6
Alexander Gattin
pkg-shadow-devel@lists.alioth.debian.org
Sun, 08 May 2005 13:01:39 +0000
Update of /cvsroot/pkg-shadow/sid/debian/patches
In directory haydn:/tmp/cvs-serv16746
Modified Files:
006_libmisc.dpatch
Added Files:
406_good_name.dpatch 407_32char_grnames.dpatch
Log Message:
separated 406_good_name.dpatch and 407_32char_grnames.dpatch from 006_libmisc.dpatch
--- NEW FILE: 407_32char_grnames.dpatch ---
#! /bin/sh -e
## 407_32char_grnames_240456.dpatch by xrgtn
##
## All lines beginning with `## DP:' are a description of the patch.
##
## DP: The patch allows 32 character long group names instead of only 16
## DP: characters.
## DP:
## DP: Comments from Karl Ramm (shadow 1:4.0.3-23, 28 Mar 2004 19:46:34 -0500):
## DP:
## DP: increase maximum group name size to 32 for no particularly good reason
## DP: closes: #240456
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
case "$1" in
-patch) patch -p1 ${patch_opts} < $0;;
-unpatch) patch -R -p1 ${patch_opts} < $0;;
*)
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1;;
esac
exit 0
@DPATCH@
diff -Nru shadow-4.0.3/libmisc/chkname.c shadow-4.0.3_30.4/libmisc/chkname.c
--- shadow-4.0.3/libmisc/chkname.c 2002-01-10 14:04:34.000000000 +0100
+++ shadow-4.0.3_30.4/libmisc/chkname.c 2004-11-02 22:17:35.000000000 +0100
@@ -61,10 +69,10 @@
check_group_name(const char *name)
{
/*
- * Arbitrary limit for group names - max 16
- * characters (same as on HP-UX 10).
+ * Arbitrary limit for group names - max 32
+ * same as linux UT_NAMESIZE
*/
- if (strlen(name) > 16)
+ if (strlen(name) > 32)
return 0;
return good_name(name);
Index: 006_libmisc.dpatch
===================================================================
RCS file: /cvsroot/pkg-shadow/sid/debian/patches/006_libmisc.dpatch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- 006_libmisc.dpatch 4 May 2005 14:42:44 -0000 1.5
+++ 006_libmisc.dpatch 8 May 2005 13:01:36 -0000 1.6
@@ -24,45 +24,6 @@
@DPATCH@
-diff -Nru shadow-4.0.3/libmisc/chkname.c shadow-4.0.3_30.4/libmisc/chkname.c
---- shadow-4.0.3/libmisc/chkname.c 2002-01-10 14:04:34.000000000 +0100
-+++ shadow-4.0.3_30.4/libmisc/chkname.c 2004-11-02 22:17:35.000000000 +0100
-@@ -21,6 +21,7 @@
- static int
- good_name(const char *name)
- {
-+#if 0
- /*
- * User/group names must match [a-z_][a-z0-9_-]*
- */
-@@ -34,6 +35,13 @@
- (*name == '$' && *(name+1) == NULL)))
- return 0;
- }
-+#endif
-+ /* seeing no sufficiently good reason for the above... */
-+ if (*name == '-')
-+ return 1;
-+ while (*++name)
-+ if (*name == ':')
-+ return 1;
-
- return 1;
- }
-@@ -61,10 +69,10 @@
- check_group_name(const char *name)
- {
- /*
-- * Arbitrary limit for group names - max 16
-- * characters (same as on HP-UX 10).
-+ * Arbitrary limit for group names - max 32
-+ * same as linux UT_NAMESIZE
- */
-- if (strlen(name) > 16)
-+ if (strlen(name) > 32)
- return 0;
-
- return good_name(name);
diff -Nru shadow-4.0.3/libmisc/chowntty.c shadow-4.0.3_30.4/libmisc/chowntty.c
--- shadow-4.0.3/libmisc/chowntty.c 2001-06-23 13:09:02.000000000 +0200
+++ shadow-4.0.3_30.4/libmisc/chowntty.c 2004-11-02 22:17:35.000000000 +0100
--- NEW FILE: 406_good_name.dpatch ---
#! /bin/sh -e
## 406_good_name.dpatch by xrgtn
##
## All lines beginning with `## DP:' are a description of the patch.
##
## DP: Relaxed usernames/groupnames checking patch.
## DP: Allows to use any char inside user/grouname except ':' and '\0' ('-'
## DP: cannot only be used as the leading character).
## DP:
## DP: Comments from Karl Ramm (shadow 1:4.0.3-9, 20 Aug 2003 02:06:50 -0400):
## DP:
## DP: I can't come up with a good justification as to why characters other
## DP: than ':'s and '\0's should be disallowed in group and usernames (other
## DP: than '-' as the leading character). Thus, the maintenance tools don't
## DP: anymore. closes: #79682, #166798, #171179
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
case "$1" in
-patch) patch -p1 ${patch_opts} < $0;;
-unpatch) patch -R -p1 ${patch_opts} < $0;;
*)
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
exit 1;;
esac
exit 0
@DPATCH@
diff -Nru shadow-4.0.3/libmisc/chkname.c shadow-4.0.3_30.4/libmisc/chkname.c
--- shadow-4.0.3/libmisc/chkname.c 2002-01-10 14:04:34.000000000 +0100
+++ shadow-4.0.3_30.4/libmisc/chkname.c 2004-11-02 22:17:35.000000000 +0100
@@ -21,6 +21,7 @@
static int
good_name(const char *name)
{
+#if 0
/*
* User/group names must match [a-z_][a-z0-9_-]*
*/
@@ -34,6 +35,13 @@
(*name == '$' && *(name+1) == NULL)))
return 0;
}
+#endif
+ /* seeing no sufficiently good reason for the above... */
+ if (*name == '-')
+ return 1;
+ while (*++name)
+ if (*name == ':')
+ return 1;
return 1;
}