9 |
local webcrlf |
local webcrlf |
10 |
|
|
11 |
# print nothing if quiet mode was requested |
# print nothing if quiet mode was requested |
12 |
[[ ${QUIET} = true ]] && return |
[[ ${QUIET} = 1 ]] && return |
13 |
|
|
14 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
15 |
then |
then |
16 |
COLCYAN="" |
COLCYAN="" |
17 |
COLDEFAULT="" |
COLDEFAULT="" |
18 |
fi |
fi |
19 |
|
|
20 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
21 |
|
|
22 |
# respect -n |
# respect -n |
23 |
case $1 in |
case $1 in |
35 |
local opts |
local opts |
36 |
local webcrlf |
local webcrlf |
37 |
|
|
38 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
39 |
then |
then |
40 |
COLRED="" |
COLRED="" |
41 |
COLDEFAULT="" |
COLDEFAULT="" |
42 |
fi |
fi |
43 |
|
|
44 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
45 |
|
|
46 |
# respect -n |
# respect -n |
47 |
case $1 in |
case $1 in |
59 |
local opts |
local opts |
60 |
local webcrlf |
local webcrlf |
61 |
|
|
62 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
63 |
then |
then |
64 |
COLPURPLE="" |
COLPURPLE="" |
65 |
COLDEFAULT="" |
COLDEFAULT="" |
66 |
fi |
fi |
67 |
|
|
68 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
69 |
|
|
70 |
# respect -n |
# respect -n |
71 |
case $1 in |
case $1 in |
149 |
# this wrapper runs a command in the xsession of the unpriv_user |
# this wrapper runs a command in the xsession of the unpriv_user |
150 |
x11runas() |
x11runas() |
151 |
{ |
{ |
152 |
if [[ -n $(pidof X) ]] || [[ -n $(pidof Xorg) ]] |
if [[ -n $(pidof X) ]] || [[ -n $(pidof Xorg) ]] || [[ -n $(pidof Xorg.bin) ]] |
153 |
then |
then |
154 |
su - "${MCORE_UNPRIV_USER}" -c "DISPLAY=${MCORE_XORG_DISPLAY} $@" |
su - "${MCORE_UNPRIV_USER}" -c "DISPLAY=${MCORE_XORG_DISPLAY} $@" |
155 |
|
else |
156 |
|
decho "x11runas(): No running X, Xorg or Xorg.bin process found" |
157 |
fi |
fi |
158 |
} |
} |
159 |
|
|
370 |
quit |
quit |
371 |
EOF |
EOF |
372 |
} |
} |
373 |
|
|
374 |
|
nsslsay_queue_init() |
375 |
|
{ |
376 |
|
SSLSAY_QUEUE=() |
377 |
|
} |
378 |
|
|
379 |
|
nsslsay_queue_add() |
380 |
|
{ |
381 |
|
SSLSAY_QUEUE+=( "$@" ) |
382 |
|
} |
383 |
|
|
384 |
|
nsslsay_queue_print() |
385 |
|
{ |
386 |
|
local count |
387 |
|
local i |
388 |
|
|
389 |
|
count="${#SSLSAY_QUEUE[*]}" |
390 |
|
for ((i=0; i < count; i++)) |
391 |
|
do |
392 |
|
echo "${SSLSAY_QUEUE[${i}]}" |
393 |
|
done |
394 |
|
} |
395 |
|
|
396 |
|
nsslsay_queue_run() |
397 |
|
{ |
398 |
|
nsslsay "$(nsslsay_queue_print)" |
399 |
|
} |
400 |
|
|
401 |
|
nsslsay_queue_run_fingerprint() |
402 |
|
{ |
403 |
|
nsslsay_fingerprint "$(nsslsay_queue_print)" |
404 |
|
} |