summaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax/patches/patch-aa
blob: d5c219000fb140c851aac8a4c6dffbbd4b03f571 (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.3 2005/03/07 11:29:28 wiz Exp $

--- fax/faxspool.in.orig	2004-07-17 12:17:49.000000000 +0200
+++ fax/faxspool.in
@@ -389,11 +389,11 @@ fs_cvt_pdf()
 # user name (for authentification)
 ##########
 
-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