26 lines
890 B
Diff
26 lines
890 B
Diff
--- setarch-2.0/setarch.c.sparc32bash 2006-04-07 14:35:49.000000000 +0200
|
|
+++ setarch-2.0/setarch.c 2007-01-12 15:37:53.000000000 +0100
|
|
@@ -113,6 +113,7 @@
|
|
#endif
|
|
#if defined(__sparc64__) || defined(__sparc__)
|
|
{PER_LINUX32, "sparc", "sparc"},
|
|
+ {PER_LINUX32, "sparc32bash", "sparc"},
|
|
{PER_LINUX32, "sparc32", "sparc"},
|
|
{PER_LINUX, "sparc64", "sparc64"},
|
|
#endif
|
|
@@ -170,7 +171,14 @@
|
|
if (!strcmp(p, "-h") || !strcmp(p, "--help"))
|
|
show_help();
|
|
}
|
|
-
|
|
+#if defined(__sparc64__) || defined(__sparc__)
|
|
+ if (!strcmp(p, "sparc32bash")) {
|
|
+ if (set_arch(p, NULL))
|
|
+ error(EXIT_FAILURE, errno, "Failed to set personality to %s", p);
|
|
+ execl("/bin/bash", NULL);
|
|
+ error(EXIT_FAILURE, errno, "/bin/bash");
|
|
+ }
|
|
+#endif
|
|
for (argv++, argc--; argc && argv[0][0] == '-'; argv++, argc--) {
|
|
int n, unknown = 1;
|
|
const char *arg = argv[0];
|