#! /bin/sh /usr/share/dpatch/dpatch-run
## 07-deal_with_unresolved_UIDs_and_GIDs.dpatch by Dario Minnucci (midget) <debian@midworld.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Deal with unresolved UIDs and GIDs in the FTP session (see BTS #504482)

@DPATCH@
diff -urNad ftpmirror-1.96+dfsg~/Fan/Attrib/Attrib.pm ftpmirror-1.96+dfsg/Fan/Attrib/Attrib.pm
--- ftpmirror-1.96+dfsg~/Fan/Attrib/Attrib.pm	1999-10-28 12:32:18.000000000 +0200
+++ ftpmirror-1.96+dfsg/Fan/Attrib/Attrib.pm	2008-11-10 13:57:17.560730075 +0100
@@ -366,7 +366,7 @@
 	# check owner
 	if (!defined($y->{y_owner})) {
 		debug(8, " check ok: no owner\n");
-	} elsif ($y->{y_owner} =~ /^[-_\w]+$/) {
+	} elsif ($y->{y_owner} =~ /^[()?-_\w]+$/) {
 		debug(8, " check ok: owner = $y->{y_owner}\n");
 	} else {
 		carp("$y has wrong owner: $y->{y_owner}");
@@ -376,7 +376,7 @@
 	# check group
 	if (!defined($y->{y_group})) {
 		debug(8, " check ok: no group\n");
-	} elsif ($y->{y_group} =~ /^[-_\w]+$/) {
+	} elsif ($y->{y_owner} =~ /^[()?-_\w]+$/) {
 		debug(8, " check ok: group = $y->{y_group}\n");
 	} else {
 		carp("$y has wrong group: $y->{y_group}");
