Displaying 14 results from an estimated 14 matches for "init_argv".
2005 Jan 05
1
[PATCH] kinit/kinit.c
A patch for a few more hiccups and trivialities in kinit.c:
* The check_path() calls check for "/root" and "/old_root" - I believe
that should be "/root" and "/root/old_root".
* chdir("/") is recommended after pivot_root()
* init_argv[0] isn't set properly to the basename pointed to by char *s
- this fix also eliminates six lines of unecessary code and improves
readability by using get_arg().
--- klibc-0.194/kinit/kinit.c.orig 2005-01-05 15:40:15.468305608 -0700
+++ klibc-0.194/kinit/kinit.c 2005-01-05 15:41:44.400785816 -0...
2006 May 10
1
[patch] kinit cmdline handling change
...& v < vmax; a++) {
- if ( cmdv )
- cmdv[v] = argv[a];
- v++;
- }
-
if ( cmdv )
cmdv[v] = NULL;
@@ -252,11 +252,6 @@
gettimeofday(&now, NULL);
srand48(now.tv_usec ^ (now.tv_sec << 24));
- /* Default parameters for anything init-like we execute */
- init_argc = argc;
- init_argv = alloca((argc+1)*sizeof(char *));
- memcpy(init_argv, argv, (argc+1)*sizeof(char *));
-
if ((fd = open("/dev/console", O_RDWR)) != -1) {
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
@@ -293,6 +288,11 @@
goto bail;
}
+ /* Default parameters for anything init-like we exec...
2015 Aug 25
0
Child thread libR.so
Simon,
Ah, thank you! quiet right. For anyone searching for this in the
future, I changed my init fuction to:
---------- SNIP ----------------
void init_r() {
SEXP aperm_function;
/* this is our version of Rf_initEmbeddedR where we disable stack
checking */
const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
Rf_initialize_R(sizeof (init_argv) / sizeof (init_argv[0]),
(char**) init_argv);
/* Disable stack limit checking since it is incompatible being
loaded on a child thread
*/
R_CStackLimit = (uintptr_t)-1;
R_...
2015 Aug 20
2
Child thread libR.so
...-------- SNIP
------------------------------------------------------------------------------
my code is as follows
---------------------------------------- SNIP
------------------------------------------------------------------------------
void init_r() {
SEXP aperm_function;
const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
Rf_initEmbeddedR(sizeof (init_argv) / sizeof (init_argv[0]),
(char**) init_argv);
R_CStackLimit = (uintptr_t)-1;
/*
* transposeVector above uses the R builtin function aperm instead of
* looking it up eve...
2015 Aug 24
0
Child thread libR.so
...--------------------------------------------------
>
> my code is as follows
>
> ---------------------------------------- SNIP
> ------------------------------------------------------------------------------
> void init_r() {
> SEXP aperm_function;
>
> const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
> Rf_initEmbeddedR(sizeof (init_argv) / sizeof (init_argv[0]),
> (char**) init_argv);
>
> R_CStackLimit = (uintptr_t)-1;
>
> /*
> * transposeVector above uses the R builtin function aperm in...
2012 May 04
2
[PATCH] run-init: add drop_capabilities support
...int main(int argc, char *argv[])
check_path("/root");
do_mounts(cmdc, cmdv);
- drop_capabilities(get_arg(cmdc, cmdv, "drop_capabilities="));
-
if (mnt_procfs) {
umount2("/proc", 0);
mnt_procfs = 0;
@@ -305,7 +303,9 @@ int main(int argc, char *argv[])
init_argv[0] = strrchr(init_path, '/') + 1;
- errmsg = run_init("/root", "/dev/console", init_path, init_argv);
+ errmsg = run_init("/root", "/dev/console",
+ get_arg(cmdc, cmdv, "drop_capabilities="),
+ init_path, init_argv);
/* If run_...
2016 Jan 17
1
[PATCH klibc] run-init: Add dry-run mode
...t(init, &ist))
+ return "stat init";
+ if (!S_ISREG(ist.st_mode) || !(ist.st_mode & S_IXUGO))
+ return "init not executable";
+ return NULL; /* Success */
+ }
}
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
init_argv[0] = strrchr(init_path, '/') + 1;
errmsg = run_init("/root", "/dev/console",
- get_arg(cmdc, cmdv, "drop_capabilities="),
+ get_arg(cmdc, cmdv, "drop_capabilities="), false,
init_path, init_argv);
/* If run_init returned, somethi...
2019 Apr 18
1
[PATCH] Allow the initramfs to be persisted across root changes
.../kinit.c
+index de03c2d3..28d29534 100644
+--- a/usr/kinit/kinit.c
++++ b/usr/kinit/kinit.c
+@@ -305,7 +305,7 @@ int main(int argc, char *argv[])
+
+ errmsg = run_init("/root", "/dev/console",
+ get_arg(cmdc, cmdv, "drop_capabilities="), false,
+- init_path, init_argv);
++ false, init_path, init_argv);
+
+ /* If run_init returned, something went bad */
+ fprintf(stderr, "%s: %s: %s\n", progname, errmsg, strerror(errno));
+diff --git a/usr/kinit/run-init/run-init.c b/usr/kinit/run-init/run-init.c
+index a14ce7cc..6a4ad3e5 100644
+--- a/usr/kinit/...
2019 Apr 18
0
[PATCH] Allow the initramfs to be persisted across root changes
...sr/kinit/kinit.c
index de03c2d3..28d29534 100644
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -305,7 +305,7 @@ int main(int argc, char *argv[])
errmsg = run_init("/root", "/dev/console",
get_arg(cmdc, cmdv, "drop_capabilities="), false,
- init_path, init_argv);
+ false, init_path, init_argv);
/* If run_init returned, something went bad */
fprintf(stderr, "%s: %s: %s\n", progname, errmsg, strerror(errno));
diff --git a/usr/kinit/run-init/run-init.c b/usr/kinit/run-init/run-init.c
index a14ce7cc..6a4ad3e5 100644
--- a/usr/kinit/run-ini...
2019 Apr 28
0
[klibc:master] run-init: Allow the initramfs to be persisted across root changes
...sr/kinit/kinit.c
index de03c2d3..28d29534 100644
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -305,7 +305,7 @@ int main(int argc, char *argv[])
errmsg = run_init("/root", "/dev/console",
get_arg(cmdc, cmdv, "drop_capabilities="), false,
- init_path, init_argv);
+ false, init_path, init_argv);
/* If run_init returned, something went bad */
fprintf(stderr, "%s: %s: %s\n", progname, errmsg, strerror(errno));
diff --git a/usr/kinit/run-init/run-init.c b/usr/kinit/run-init/run-init.c
index a14ce7cc..6a4ad3e5 100644
--- a/usr/kinit/run-ini...
2019 Jan 18
0
[klibc:master] run-init: Add dry-run mode
...it/runinitlib.c | 42 +++++++++++++++++++++++++++--------------
4 files changed, 57 insertions(+), 29 deletions(-)
diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c
index 523c92b..de03c2d 100644
--- a/usr/kinit/kinit.c
+++ b/usr/kinit/kinit.c
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
init_argv[0] = strrchr(init_path, '/') + 1;
errmsg = run_init("/root", "/dev/console",
- get_arg(cmdc, cmdv, "drop_capabilities="),
+ get_arg(cmdc, cmdv, "drop_capabilities="), false,
init_path, init_argv);
/* If run_init returned, somethi...
2011 Jul 19
4
[PATCH v1 0/2] Support dropping of capabilities from early userspace.
This patchset applies to klibc mainline. As is it will probably collide
with Maximilian's recent patch to rename run-init to switch_root posted
last week.
To boot an untrusted environment with certain capabilities locked out,
we'd like to be able to drop the capabilities up front from early
userspace, before we actually transition onto the root volume.
This patchset implements this by
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of
klibc.
Ben.
Ben Hutchings (1):
[klibc] run-init: Add dry-run mode
Jay Vosburgh (1):
[klibc] ipconfig: Use separate sockets for DHCP from multiple
interfaces
Mathieu Trudel-Lapierre (1):
[klibc] ipconfig: Set broadcast when sending DHCPREQUEST and
DHCPDISCOVER
YunQiang Su (1):
[klibc] mips: setjmp.S: don't
2011 Jul 13
9
[PATCH 0/8] switch_root() enhancements
On a train ride to Bruxelles, brought out my axe and directly attacked
run_init(8). run_init(8) is dead, long live switch_root(8).
The next run on switch_root(8) involves fdopendir,
so another push for the upcoming stdio 1.6 branch.
The following is boot tested with initramfs-tools,
kinit(8) tests would very much be appreciated!?
Michal Suchanek (1):
[klibc] switch_root: Fix single file