You suspect a problem with the oponldap package and want to make sure that the files
have not be modified or otherwise tampered with. Which command would validate all of the
files contained in the openldap package and report any problems?
A.
pkgchk openldap
B.
pkginfo openldap
C.
pkg contents openldap
D.
pkg verify openldap
E.
pkg set-property signature-policy verify
Explanation:
D
answer is D.
For eg I have installed the apache package and i have removed few files from the package as shown below pkgchk -lP name of package didnt show me anything however pkg verify command showed me which files are missing below is the example for the same.
root@solaris:/var/apache2# cd 2.2/
root@solaris:/var/apache2/2.2# ls
cgi-bin error htdocs icons libexec logs proxy
root@solaris:/var/apache2/2.2# ls -ltr
total 25
drwxr-xr-x 2 webservd webservd 2 Jun 25 2014 proxy
drwxr-xr-x 2 root sys 4 Oct 20 09:12 cgi-bin
drwxr-xr-x 2 root sys 3 Oct 20 09:12 htdocs
drwxr-xr-x 3 root sys 22 Oct 20 09:12 error
drwxr-xr-x 3 root sys 160 Oct 20 09:12 icons
drwxr-xr-x 3 root sys 4 Oct 20 09:12 libexec
drwx—— 2 root bin 4 Nov 6 07:50 logs
root@solaris:/var/apache2/2.2# rm -rf *
root@solaris:/var/apache2/2.2# ls -ltr
total 0
root@solaris:/var/apache2/2.2# pkgchk -lP apache-22
root@solaris:/var/apache2/2.2# pkgchk -lP apache-22
root@solaris:/var/apache2/2.2# pkg verify apache-22
PACKAGE STATUS
pkg://solaris/web/server/apache-22 ERROR
dir: var/apache2/2.2/libexec/amd64
Missing: directory does not exist
dir: var/apache2/2.2/logs
Missing: directory does not exist
dir: var/apache2/2.2/proxy
Missing: directory does not exist
file: var/apache2/2.2/icons/small/index.gif
Missing: regular file does not exist
file: var/apache2/2.2/icons/small/index.png
Missing: regular file does not exist
D
D
http://www.oracle.com/technetwork/server-storage/solaris11/documentation/solaris-ips-wp-337871.pdf
Look at table 2
IPS command: pkg verify srv4 command: pkgchk
D