setcap shell of linux added
This commit is contained in:
parent
51645626c7
commit
92370bffc2
6
.linux_set_cap.sh
Executable file
6
.linux_set_cap.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# chmod u+x ./.linux_set_cap.sh
|
||||
# sudo chmod u+s ./.linux_set_cap.sh
|
||||
|
||||
setcap cap_net_raw,cap_net_admin=eip ./debug
|
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
|
@ -12,7 +12,10 @@
|
|||
"program": "${workspaceRoot}/main.go",
|
||||
"env": {},
|
||||
"args": [],
|
||||
"showLog": true
|
||||
"showLog": true,
|
||||
"linux": {
|
||||
"preLaunchTask": "LinuxSetCap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "File Debug",
|
||||
|
@ -27,6 +30,5 @@
|
|||
"args": [],
|
||||
"showLog": true
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
|
12
.vscode/tasks.json
vendored
Normal file
12
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "LinuxSetCap",
|
||||
"type": "shell",
|
||||
"command": "${workspaceRoot}/.linux_set_cap.sh"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,6 +2,7 @@ package upnp
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
omd "git.loafle.net/overflow/model/discovery"
|
||||
omu "git.loafle.net/overflow/model/util"
|
||||
|
@ -27,6 +28,8 @@ LOOP:
|
|||
continue LOOP
|
||||
}
|
||||
|
||||
log.Print(rd)
|
||||
|
||||
discoverySession.AddHost(&omd.Host{
|
||||
MetaIPType: discoverySession.Zone().MetaIPType,
|
||||
Name: rd.FriendlyName,
|
||||
|
|
Loading…
Reference in New Issue
Block a user