VirtualBox

Changeset 41365 in vbox


Ignore:
Timestamp:
May 21, 2012 12:48:57 PM (12 years ago)
Author:
vboxsync
Message:

Linux/Solaris installers: Added authentication method + PW hash to webservice configuration.

Location:
trunk/src/VBox/Installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/vboxweb-service.sh.in

    r40130 r41365  
    3535if [ -n "$INSTALL_DIR" ]; then
    3636    binary="$INSTALL_DIR/vboxwebsrv"
     37    vboxmanage="$INSTALL_DIR/VBoxManage"
    3738else
    3839    binary="/usr/lib/%PACKAGE%/vboxwebsrv"
     40    vboxmanage="/usr/lib/%PACKAGE%/VBoxManage"
    3941fi
    4042
     
    308310        [ -n "$VBOXWEB_LOGSIZE" ]        && PARAMS="$PARAMS -S $VBOXWEB_LOGSIZE"
    309311        [ -n "$VBOXWEB_LOGINTERVAL" ]    && PARAMS="$PARAMS -I $VBOXWEB_LOGINTERVAL"
     312        # set authentication method + password hash
     313        if [ -n "$VBOXWEB_AUTH_LIBRARY" ]; then
     314            vboxmanage setproperty websrvauthlibrary $VBOXWEB_AUTH_LIBRARY
     315            if [ $? -ne 0 ]; then
     316                fail_msg "Error setting webservice authentication library to $VBOXWEB_AUTH_LIBRARY"
     317            fi
     318        fi
     319        if [ -n "$VBOXWEB_AUTH_PWHASH" ]; then
     320            vboxmanage setextradata global VBoxAuthSimple/users/$VBOXWEB_USER $VBOXWEB_AUTH_PWHASH
     321            if [ $? -ne 0 ]; then
     322                fail_msg "Error setting webservice password hash"
     323            fi
     324        fi
    310325        # prevent inheriting this setting to VBoxSVC
    311326        unset VBOX_RELEASE_LOG_DEST
  • trunk/src/VBox/Installer/solaris/smf-vboxwebsrv.sh

    r40130 r41365  
    5454        VW_SSL_RANDFILE=`/usr/bin/svcprop -p config/ssl_randfile $SMF_FMRI 2>/dev/null`
    5555        [ $? != 0 ] && VW_SSL_RANDFILE=
     56        VW_AUTH_LIBRARY=`/usr/bin/svcprop -p config/auth_library 2>/dev/null`
     57        [ $? != 0 ] && VW_AUTH_LIBRARY=
     58        VW_AUTH_PWHASH=`/usr/bin/svcprop -p config/auth_pwhash 2>/dev/null`
     59        [ $? != 0 ] && VW_AUTH_PWHASH=
    5660        VW_TIMEOUT=`/usr/bin/svcprop -p config/timeout $SMF_FMRI 2>/dev/null`
    5761        [ $? != 0 ] && VW_TIMEOUT=
     
    96100        [ -n "$VW_LOGFILE" ] && VW_LOGFILE="--logfile $VW_LOGFILE"
    97101
     102        # Set authentication method + password hash
     103        if [ -n "$VW_AUTH_LIBRARY" ]; then
     104            exec /opt/VirtualBox/VBoxManage setproperty websrvauthlibrary $VW_AUTH_LIBRARY
     105            if [ $? != 0 ]; then
     106                echo "Error $? setting webservice authentication library to $VW_AUTH_LIBRARY"
     107            fi
     108        fi
     109        if [ -n "$VW_AUTH_PWHASH" ]; then
     110            exec /opt/VirtualBox/VBoxManage setextradata global VBoxAuthSimple/users/$VW_USER $VW_AUTH_PWHASH
     111            if [ $? != 0 ]; then
     112                echo "Error $? setting webservice password hash"
     113            fi
     114        fi
     115
    98116        exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
    99117
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette