Changeset 2692


Ignore:
Timestamp:
Oct 27, 2016, 11:52:10 AM (3 years ago)
Author:
mabarracus
Message:

Add new conditions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flash-java-insecure-perms/trunk/fuentes/flash-java-insecure-perms/usr/bin/flash-java-insecure-perms

    r2677 r2692  
    4545        # JAVA
    4646        if [ ! -z "${ICED}" ]; then
    47             sudo su $x bash -c "${ICED} -headless set deployment.security.level ALLOW_UNSIGNED"
     47            if [ "${IAM}" = "0" ];then
     48                sudo su $x bash -c "${ICED} -headless set deployment.security.level ALLOW_UNSIGNED"
     49            else
     50                ${ICED} -headless set deployment.security.level ALLOW_UNSIGNED
     51            fi
    4852        fi
    4953        for cert in $(find /usr/share/flash-java-insecure-perms/ -name '*.cert');do
    5054            certname=${cert%%.cert}
    5155            echo Importing into trusted.certs ${certname}.cert
     56            if [ ! -f "/home/$x/.config/icedtea-web/security/trusted.certs" ]; then
     57                mkdir -p /home/$x/.config/icedtea-web/security/
     58                ${KEYTOOL} -genkey -alias recursos -keyalg RSA -keystore /home/$x/.config/icedtea-web/security/trusted.certs -keypass changeit -storepass changeit -keysize 2048 -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown"
     59                ${KEYTOOL} -delete -alias recursos -keystore /home/$x/.config/icedtea-web/security/trusted.certs -storepass changeit
     60                if [ "${IAM}" = "0" ]; then
     61                    chown -R ${x}:${x} /home/$x/.config/icedtea-web/security/
     62                fi
     63            fi
    5264            $KEYTOOL -importcert -trustcacerts -storepass "changeit" -keystore /home/$x/.config/icedtea-web/security/trusted.certs -file ${cert} -alias ${certname} -noprompt
    5365        done
     
    105117            #JAVA
    106118            if [ ! -z "${ICED}" ]; then
    107                 sudo su $x bash -c "${ICED} -headless reset deployment.security.level"
     119                if [ "${IAM}" = "0" ];then
     120                    sudo su $x bash -c "${ICED} -headless reset deployment.security.level"
     121                else
     122                    ${ICED} -headless reset deployment.security.level
     123                fi
    108124            fi
    109125            for cert in $(find /usr/share/flash-java-insecure-perms/ -name '*.cert');do
Note: See TracChangeset for help on using the changeset viewer.