Skip to content

Commit

Permalink
apply capabilitites to Outline executable
Browse files Browse the repository at this point in the history
  • Loading branch information
jyyi1 committed Oct 22, 2024
1 parent 6ad4a69 commit 224bcc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
10 changes: 10 additions & 0 deletions client/electron/debian/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Dependencies:
# - libcap2-bin: setcap

set -eux

readonly PREFIX=/opt/Outline

# Grant specific capabilities so Outline can run without root permisssion
# - cap_net_admin: configure network interfaces, set up routing tables, etc.
# - cap_dac_override: modify network configuration files owned by root
/usr/sbin/setcap cap_net_admin,cap_dac_override+eip ${PREFIX}/Outline
17 changes: 0 additions & 17 deletions client/electron/debian/after_remove.sh

This file was deleted.

7 changes: 5 additions & 2 deletions client/electron/electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
],

"deb": {
"afterInstall": "client/electron/debian/after_install.sh",
"afterRemove": "client/electron/debian/after_remove.sh"
"depends": [
"gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3",
"libcap2-bin"
],
"afterInstall": "client/electron/debian/after_install.sh"
},
"linux": {
"category": "Network",
Expand Down

0 comments on commit 224bcc9

Please sign in to comment.