#! /bin/sh -e
## 
## All lines beginning with `## DP:' are a description of the patch.
## DP: daemon and lp can set to any user

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi  
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac            

exit 0
@DPATCH@
--- a/fax/faxq-helper.c
+++ b/fax/faxq-helper.c
@@ -596,7 +596,10 @@ int user_seen = 0;
 	if ( strncmp(buf, "user ", 5) == 0 )
 	{
 	    user_seen=1;
-	    if ( real_user_id != ROOT_UID &&
+	    if ( real_user_id != ROOT_UID && real_user_id != 1 && real_user_id != 7 &&
+			    /* 1 = daemon, 7 = lp
+			     * FIXME: This is not the best way to write it
+			     */
 		 strcmp( buf+5, real_user_name ) != 0 )
 	    {
 		eout( "user name mismatch (%s <-> %s)\n", buf+5, real_user_name );
