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 |
|
} |