1 |
commit: a7f12a1d89aa3d7810996330b79acc577f3a558e |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 18 03:47:04 2012 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 23 21:12:36 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=a7f12a1d |
7 |
|
8 |
sandbox: drop beep support |
9 |
|
10 |
Almost no one has beep support turned on anymore, and ebeep in the main |
11 |
tree has been deprecated (meaning it wasn't found useful while building |
12 |
packages). So punt support for it from sandbox too. |
13 |
|
14 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
15 |
|
16 |
--- |
17 |
etc/sandbox.conf | 6 ------ |
18 |
libsbutil/sbutil.h | 3 --- |
19 |
src/environ.c | 1 - |
20 |
src/sandbox.c | 15 +-------------- |
21 |
tests/local.at | 1 - |
22 |
5 files changed, 1 insertions(+), 25 deletions(-) |
23 |
|
24 |
diff --git a/etc/sandbox.conf b/etc/sandbox.conf |
25 |
index 6ad1c15..dc460f0 100644 |
26 |
--- a/etc/sandbox.conf |
27 |
+++ b/etc/sandbox.conf |
28 |
@@ -22,12 +22,6 @@ |
29 |
# operations caught by sandbox. Default is "no" |
30 |
#SANDBOX_DEBUG="no" |
31 |
|
32 |
-# SANDBOX_BEEP |
33 |
-# |
34 |
-# The amount of beeps sandbox will issue when it exits with access violations |
35 |
-# after printing the normal log. Default is "3" |
36 |
-#SANDBOX_BEEP=3 |
37 |
- |
38 |
# NOCOLOR |
39 |
# |
40 |
# Determine the use of color in the output. Default is "false" (ie, use color) |
41 |
|
42 |
diff --git a/libsbutil/sbutil.h b/libsbutil/sbutil.h |
43 |
index bdff33f..ad9ce25 100644 |
44 |
--- a/libsbutil/sbutil.h |
45 |
+++ b/libsbutil/sbutil.h |
46 |
@@ -57,7 +57,6 @@ extern const char env_sandbox_testing[]; |
47 |
#define ENV_SANDBOX_PREDICT "SANDBOX_PREDICT" |
48 |
|
49 |
#define ENV_SANDBOX_ON "SANDBOX_ON" |
50 |
-#define ENV_SANDBOX_BEEP "SANDBOX_BEEP" |
51 |
|
52 |
#define ENV_SANDBOX_PID "SANDBOX_PID" |
53 |
#define ENV_SANDBOX_ABORT "SANDBOX_ABORT" |
54 |
@@ -66,8 +65,6 @@ extern const char env_sandbox_testing[]; |
55 |
#define ENV_SANDBOX_ACTIVE "SANDBOX_ACTIVE" |
56 |
#define SANDBOX_ACTIVE "armedandready" |
57 |
|
58 |
-#define DEFAULT_BEEP_COUNT 3 |
59 |
- |
60 |
#define SB_BUF_LEN 2048 |
61 |
|
62 |
#define COLOR_NORMAL "\033[0m" |
63 |
|
64 |
diff --git a/src/environ.c b/src/environ.c |
65 |
index 8f4968f..45bf9a6 100644 |
66 |
--- a/src/environ.c |
67 |
+++ b/src/environ.c |
68 |
@@ -188,7 +188,6 @@ static int setup_cfg_vars(struct sandbox_info_t *sandbox_info) |
69 |
{ |
70 |
setup_cfg_var(ENV_SANDBOX_VERBOSE); |
71 |
setup_cfg_var(ENV_SANDBOX_DEBUG); |
72 |
- setup_cfg_var(ENV_SANDBOX_BEEP); |
73 |
setup_cfg_var(ENV_NOCOLOR); |
74 |
|
75 |
if (-1 == setup_access_var(ENV_SANDBOX_DENY)) |
76 |
|
77 |
diff --git a/src/sandbox.c b/src/sandbox.c |
78 |
index a8e28fe..0fda106 100644 |
79 |
--- a/src/sandbox.c |
80 |
+++ b/src/sandbox.c |
81 |
@@ -85,8 +85,7 @@ static int setup_sandbox(struct sandbox_info_t *sandbox_info, bool interactive) |
82 |
|
83 |
static void print_sandbox_log(char *sandbox_log) |
84 |
{ |
85 |
- int sandbox_log_file, beep_count; |
86 |
- char *beep_count_env; |
87 |
+ int sandbox_log_file; |
88 |
size_t len; |
89 |
char buffer[1024]; |
90 |
|
91 |
@@ -114,18 +113,6 @@ static void print_sandbox_log(char *sandbox_log) |
92 |
sb_close(sandbox_log_file); |
93 |
|
94 |
SB_EERROR("--------------------------------------------------------------------------------", "\n"); |
95 |
- |
96 |
- beep_count_env = getenv(ENV_SANDBOX_BEEP); |
97 |
- if (beep_count_env) |
98 |
- beep_count = atoi(beep_count_env); |
99 |
- else |
100 |
- beep_count = DEFAULT_BEEP_COUNT; |
101 |
- |
102 |
- while (beep_count--) { |
103 |
- fputc('\a', stderr); |
104 |
- if (beep_count) |
105 |
- sleep(1); |
106 |
- } |
107 |
} |
108 |
|
109 |
static void stop(int signum) |
110 |
|
111 |
diff --git a/tests/local.at b/tests/local.at |
112 |
index da44b76..f937ff1 100644 |
113 |
--- a/tests/local.at |
114 |
+++ b/tests/local.at |
115 |
@@ -5,7 +5,6 @@ dnl any of the tempdirs. Same goes for predict access, but this is |
116 |
dnl due to the default PM test env having that predict. |
117 |
m4_defun([SB_RUN],[\ |
118 |
env \ |
119 |
- SANDBOX_BEEP=0 \ |
120 |
SANDBOX_LOG="$PWD/sandbox.log" \ |
121 |
sandbox.sh \ |
122 |
addpredict / \; \ |