summaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax/patches/patch-aa
blob: da1e437ff79b488a3d3ff8c44f157d46e5ea0c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-aa,v 1.4 2009/10/02 19:21:59 is Exp $

--- fax/faxspool.in.orig	2007-01-19 08:38:22.000000000 +0100
+++ fax/faxspool.in
@@ -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