Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fdefa96e
Commit
fdefa96e
authored
Aug 01, 2017
by
Manjunath A Kumatagi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiarch nonewprivs test image
parent
1bc56825
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
40 deletions
+78
-40
BUILD
test/images/BUILD
+1
-0
BASEIMAGE
test/images/nonewprivs/BASEIMAGE
+4
-0
BUILD
test/images/nonewprivs/BUILD
+34
-0
Dockerfile
test/images/nonewprivs/Dockerfile
+3
-1
Makefile
test/images/nonewprivs/Makefile
+9
-17
VERSION
test/images/nonewprivs/VERSION
+1
-0
nnp.c
test/images/nonewprivs/nnp.c
+0
-22
nnp.go
test/images/nonewprivs/nnp.go
+26
-0
No files found.
test/images/BUILD
View file @
fdefa96e
...
@@ -31,6 +31,7 @@ filegroup(
...
@@ -31,6 +31,7 @@ filegroup(
"//test/images/nettest:all-srcs",
"//test/images/nettest:all-srcs",
"//test/images/no-snat-test:all-srcs",
"//test/images/no-snat-test:all-srcs",
"//test/images/no-snat-test-proxy:all-srcs",
"//test/images/no-snat-test-proxy:all-srcs",
"//test/images/nonewprivs:all-srcs",
"//test/images/port-forward-tester:all-srcs",
"//test/images/port-forward-tester:all-srcs",
"//test/images/porter:all-srcs",
"//test/images/porter:all-srcs",
"//test/images/resource-consumer:all-srcs",
"//test/images/resource-consumer:all-srcs",
...
...
test/images/nonewprivs/BASEIMAGE
0 → 100644
View file @
fdefa96e
amd64=alpine:3.6
arm=arm32v6/alpine:3.6
arm64=arm64v8/alpine:3.6
ppc64le=ppc64le/alpine:3.6
test/images/nonewprivs/BUILD
0 → 100644
View file @
fdefa96e
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
go_binary(
name = "nonewprivs",
library = ":go_default_library",
tags = ["automanaged"],
)
go_library(
name = "go_default_library",
srcs = ["nnp.go"],
tags = ["automanaged"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
test/images/nonewprivs/Dockerfile
View file @
fdefa96e
...
@@ -12,7 +12,9 @@
...
@@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
FROM
alpine:latest
FROM
BASEIMAGE
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
COPY
nnp /usr/local/bin/nnp
COPY
nnp /usr/local/bin/nnp
RUN
chmod
+s /usr/local/bin/nnp
RUN
chmod
+s /usr/local/bin/nnp
...
...
test/images/nonewprivs/Makefile
View file @
fdefa96e
...
@@ -12,22 +12,14 @@
...
@@ -12,22 +12,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
.PHONY
:
all image push clean
SRCS
=
nnp
ARCH
?=
amd64
TARGET
?=
$(CURDIR)
GOLANG_VERSION
?=
latest
SRC_DIR
=
$
(
notdir
$(
shell
pwd
)
)
export
TAG
=
1.2
bin
:
PREFIX
=
gcr.io/google_containers
../image-util.sh bin
$(SRCS)
.PHONY
:
bin
all
:
push
nnp
:
nnp.c
gcc
-static
-o
$@
$@
.c
image
:
nnp
docker build
--pull
-t
$(PREFIX)
/nonewprivs:
$(TAG)
.
push
:
image
gcloud docker
--
push
$(PREFIX)
/nonewprivs:
$(TAG)
clean
:
rm
-f
nnp
test/images/nonewprivs/VERSION
0 → 100644
View file @
fdefa96e
1.0
test/images/nonewprivs/nnp.c
deleted
100644 → 0
View file @
1bc56825
// Copyright 2017 The Kubernetes Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int
main
(
int
argc
,
char
*
argv
[]){
printf
(
"Effective uid: %d
\n
"
,
geteuid
());
return
0
;
}
test/images/nonewprivs/nnp.go
0 → 100644
View file @
fdefa96e
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
main
import
(
"fmt"
"os"
)
func
main
()
{
fmt
.
Printf
(
"Effective uid: %d
\n
"
,
os
.
Geteuid
())
}
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