[Bug 913] New: Faxsetup fails if username isn't root

[email protected]
Newsgroups gmane.comp.telephony.fax.hylafax.devel
Message-ID <[email protected]/>
http://bugs.hylafax.org/show_bug.cgi?id=913

           Summary: Faxsetup fails if username isn't root
           Product: HylaFAX
           Version: latest
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: misc
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Faxsetup fails if the current username username != root,
even if the UID is 0.

A preliminary fix for that may be:
 - Checking if the current user is a part of the "root" (GID 0) group

A possible patch:

----- BEGIN -----

--- faxsetup.sh.in      2009-06-03 09:31:52.000000000 +0200
+++ faxsetup.sh.in      2009-06-03 09:40:11.000000000 +0200
@@ -861,11 +861,11 @@
 #   2. the old whoami program
 #   3. last gasp, check if we have write permission on /dev
 #
+egid=`id|$SED -e 's/.*gid=[0-9]*(\([^)]*\)).*/\1/'`
 euid=`id|$SED -e 's/.*uid=[0-9]*(\([^)]*\)).*/\1/'`
-test -z "$euid" && euid=`(whoami) 2>/dev/null`
-test -z "$euid" && test -w /dev && euid=root
-if [ "$euid" != "root" ]; then
-    bitch "Sorry, but you must run this script as the super-user!"
+test -z "$egid" && test -w /dev && egid=root
+if [ "$egid" != "root" ]; then
+    bitch "Sorry, but you must be a part of the root (GID 0) group." 
     boom
 fi

----- END -----

or
 - Checking if the users UID equals 0 (Which is unusual)


-- 
Configure bugmail: http://bugs.hylafax.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


____________________ HylaFAX(tm) Developers Mailing List ____________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe [email protected] < /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.