Ignore:
Timestamp:
Aug 4, 2011, 5:10:46 PM (8 years ago)
Author:
jmr@…
Message:

bugzilla: fix root privileges check not to rely on env(USER)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/bugzilla/Portfile

    r69766 r81742  
    8484destroot {
    8585        # Warn user if not running as root
    86         if {$env(USER) != "root"} {
     86        if {[geteuid] != 0} {
    8787                ui_msg "-----------------------------------------------------------"
    8888                ui_msg "Note that you are not running as root, so files installed"
     
    9797        system "cp -R ${worksrcpath}/. ${destroot}${wwwRoot}/${name}"
    9898        # Fix owner and group on installed data
    99         if {$env(USER) == "root"} {
     99        if {[geteuid] == 0} {
    100100                foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] {
    101101                        file attributes ${item} -permissions go+r -owner www -group www
Note: See TracChangeset for help on using the changeset viewer.