wrapper script to execute ssecls command

book

Article ID: 172040

calendar_today

Updated On:

Products

Protection Engine for Cloud Services Protection Engine for NAS

Issue/Introduction

From SPE 8.0, ssecls command requires OpenSSL libraries to establish secure connection:
 
e.g.)
 
$ ldd ssecls
linux-vdso.so.1 =>  (0x00007fffa41fc000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fced96fb000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fced94e1000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fced92dd000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fced8fd6000)
libcrypto.so.1.0.0 => not found
libssl.so.1.0.0 => not found
libm.so.6 => /lib64/libm.so.6 (0x00007fced8cd4000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fced8abe000)
libc.so.6 => /lib64/libc.so.6 (0x00007fced86f1000)
/lib64/ld-linux-x86-64.so.2 (0x00007fced9917000)

Environment

SPE 8.0 or later in Linux environment

Resolution

These OpenSSL libraries are located same directory where ssecls command resides:

e.g.)

$ pwd
/opt/SYMCScan/ssecls/C
$ ll
-r-xr-x--- 1 root avdefs 2.4M Jun 12 21:41 libcrypto.so.1.0.0
-r-xr-x--- 1 root avdefs 483K Jun 12 21:41 libssl.so.1.0.0
-r-xr-x--- 1 root avdefs 6.2M Jun 12 21:41 libstdc++.so.6
-r-xr-x--- 1 root avdefs 230K Jun 12 21:41 ssecls

Here is one approach to execute ssecls command in form of wrapper script:

e.g.)

$ cat ssecls.sh
#!/usr/bin/env bash

SSECLS_PATH=/opt/SYMCScan/ssecls/C
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SSECLS_PATH $SSECLS_PATH/ssecls [email protected]

$ ./ssecls.sh

Commandline Scanner version: 8.0.0.4
===================================================
Usage:ssecls [options] file|directory [file|directory]...