Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
602eece1
Commit
602eece1
authored
1 year ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4832ece7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+1
-1
software/ors-amarisoft/ru/buildout.cfg
software/ors-amarisoft/ru/buildout.cfg
+1
-1
software/ors-amarisoft/ru/capdo.c
software/ors-amarisoft/ru/capdo.c
+5
-1
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
602eece1
...
...
@@ -84,7 +84,7 @@ md5sum = b547df6f6efe841466def20531770923
[ru_capdo.c]
_update_hash_filename_ = ru/capdo.c
md5sum =
71b28403a04cc7bf756aac7e28fa97f1
md5sum =
dcbf6b53616351bcd3e52b5cb12e688a
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
...
...
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/ru/buildout.cfg
View file @
602eece1
...
...
@@ -23,7 +23,7 @@ parts +=
recipe = plone.recipe.command
exe = ${buildout:directory}/netcapdo
command = gcc ${:ccflags} -o ${:exe} ${ru_capdo.c:target} -lcap
ccflags = -I${libcap:location}/include -L${libcap:location}/lib
ccflags = -I${libcap:location}/include -L${libcap:location}/lib
-Wl,-rpath=${libcap:location}/lib
stop-on-error = true
[setcap-netcapdo]
...
...
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/ru/capdo.c
View file @
602eece1
...
...
@@ -46,7 +46,11 @@ int main(int argc, const char *argv[]) {
if
(
!
caps
)
die
(
"cap_get_proc failed"
);
for
(
cap
=
0
;
cap
<
CAP_LAST_CAP
;
cap
++
)
{
cap_get_flag
(
caps
,
cap
,
CAP_PERMITTED
,
&
flag
)
&&
die_err
(
"cap_get_flag"
);
if
(
cap_get_flag
(
caps
,
cap
,
CAP_PERMITTED
,
&
flag
))
{
if
(
errno
=
EINVAL
)
continue
;
// this cap is not supported by running kernel
die_err
(
"cap_get_flag"
);
}
if
(
flag
)
{
cap_set_flag
(
caps
,
CAP_INHERITABLE
,
1
,
&
cap
,
flag
)
&&
die_err
(
"cap_set_flag"
);
capbits
|=
(
1ULL
<<
cap
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment