openbsd-ports/comms/mgetty+sendfax/patches/patch-fax_faxspool_in
2007-06-15 11:30:38 +00:00

19 lines
527 B
Plaintext
Executable File

$OpenBSD: patch-fax_faxspool_in,v 1.2 2007/06/15 11:30:38 ajacoutot Exp $
--- fax/faxspool.in.orig Fri Jan 19 08:38:22 2007
+++ fax/faxspool.in Fri Jun 15 11:26:19 2007
@@ -407,11 +407,11 @@ fs_cvt_pdf()
# user name (for fax header only! auth is done by faxq-helper via getuid())
##########
-if user=`logname 2>/dev/null`
-then :
+if [ `id -u` = 0 ]; then
+ user=root
else
id=`id`
- user=`expr "$id" : "[^( ]*(\([^)]*\)"`
+ user=`logname`
fi
test -z "$user" && user=$LOGNAME
test -z "$user" && user=$USER