Skip to content

Commit

Permalink
Re-elevate privileges to place work symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Apr 3, 2024
1 parent 55d389d commit 51511c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/port1.0/portutil.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,9 @@ proc open_statefile {args} {
}
# Create a symlink to the workpath for port authors
if {[tbool place_worksymlink] && ![file isdirectory $worksymlink]} {
if {[getuid] == 0 && [geteuid] != 0} {
elevateToRoot place_worksymlink
}
ui_debug "Attempting ln -sf $workpath $worksymlink"
ln -sf $workpath $worksymlink
}
Expand Down

0 comments on commit 51511c8

Please sign in to comment.