[Openvas-commits] r3246 - in trunk/winslad: . nsis
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 6 03:41:51 CEST 2009
Author: doj
Date: 2009-05-06 03:41:12 +0200 (Wed, 06 May 2009)
New Revision: 3246
Added:
trunk/winslad/nsis/
trunk/winslad/nsis/Copssh_2.1.0_Installer.exe
trunk/winslad/nsis/SpecialGroupsSIDs.nsh
trunk/winslad/nsis/UserMgr.dll
trunk/winslad/nsis/banner.txt
trunk/winslad/nsis/sshd_config
trunk/winslad/winslad.nsi
Removed:
trunk/winslad/sshwindows/
Modified:
trunk/winslad/
trunk/winslad/INSTALL.txt
trunk/winslad/Makefile
trunk/winslad/TODO.txt
trunk/winslad/shell.bat
Log:
first version of NSIS installer
Property changes on: trunk/winslad
___________________________________________________________________
Name: svn:ignore
+ sladd.exe
nsis.log
winslad-installer.exe
Modified: trunk/winslad/INSTALL.txt
===================================================================
--- trunk/winslad/INSTALL.txt 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/INSTALL.txt 2009-05-06 01:41:12 UTC (rev 3246)
@@ -9,9 +9,7 @@
+ add c:\mingw\bin to your path
+ copy "c:\MinGW\bin\mingw32-make.exe" c:\MinGW\bin\make.exe
-- "make" to compile sladd.exe and some plugins
-- "make install" to install into C:\winslad\
+- Download Nullsoft Installer from http://nsis.sf.net (this release
+ tested with NSIS 2.44) and install "Full".
-- install FreeSSHD: http://www.freesshd.com
-- use "C:\windows\system32\cscript.exe /nologo c:\winslad\shell.vbs" as
- 'Command shell' in SSH setup pane of FreeSSHD.
+The installer uses CopSSH from http://www.itefix.no/i2/taxonomy/term/33
Modified: trunk/winslad/Makefile
===================================================================
--- trunk/winslad/Makefile 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/Makefile 2009-05-06 01:41:12 UTC (rev 3246)
@@ -2,16 +2,18 @@
VERSION=1.0
EXE=sladd.exe
+INSTALLER=winslad-installer.exe
OBJ=main.o xml.o client.o path.o readn.o writen.o
CXX=mingw32-g++
CC=$(CXX)
+MAKENSIS=C:\Program Files\NSIS\makensis.exe
CFLAGS+=-Wall -DDOJDEBUG=1 -DSLADD_VERSION=\"$(VERSION)\"
CXXFLAGS=$(CFLAGS)
include config.mk
-all: $(EXE)
+all: $(EXE) $(INSTALLER)
$(EXE): $(OBJ) libexpat.a
$(CXX) -o $@ $^
@@ -28,12 +30,15 @@
$(MAKE) -C oval $@
clean:
- $(RM) libexpat.a *~ *.o $(EXE) nsis.log
+ $(RM) libexpat.a *~ *.o $(EXE) $(INSTALLER) nsis\nsis.log
$(MAKE) -C expat $@
$(MAKE) -C testplugin $@
$(MAKE) -C john $@
$(MAKE) -C oval $@
+$(INSTALLER): $(EXE) winslad.nsi
+ $(MAKENSIS) /v4 /onsis\nsis.log /DSLADD_VERSION=$(VERSION) winslad.nsi
+
# Generates basic code documentation (placed in doc/generated)
doc :
doxygen doc/Doxyfile
Modified: trunk/winslad/TODO.txt
===================================================================
--- trunk/winslad/TODO.txt 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/TODO.txt 2009-05-06 01:41:12 UTC (rev 3246)
@@ -1,22 +1,23 @@
# -*- mode: org; -*-
#+STARTUP: showall
-- SSH Server for Windows
- + http://sshwindows.sourceforge.net/
- + http://www.kpym.com/2/kpym/index.htm
- + http://www.itefix.no/i2/taxonomy/term/33
- + http://mobassh.mobatek.net/en/
+- fix background process in SSH
+- support SSH command from command line
-- test on 32, 64bit Windows
-- write installer, run as slad user
- + create slad user and password
- + create c:\winslad and files
- + optionally install sshwindows
- ~ create group
- ~ create passwd for slad user
- ~ replace banner.txt, sshd_config
- ~ set c:\winslad as home path for slad user in passwd, set c:\winslad\shell.bat as shell for slad user in passwd
+- test on 32bit XP
+- test on 32bit Vista
+- test on 32bit Server 2003
+- test on 32bit Server 2008
+- test on 64bit Vista
+- test on 64bit Server 2003
+- test on 64bit Server 2008
+- installer
+ + add some pages with license etc.
+ + test silent (un)install
+ + hide slad account from Windows Login Screen
+ + supply a special slad user picture
+
- cross compile
+ http://www.profv.de/mingw_cross_env/
+ http://wiki.njh.eu/Cross_Compiling_for_Win32
Property changes on: trunk/winslad/nsis
___________________________________________________________________
Name: svn:ignore
+ nsis.log
Added: trunk/winslad/nsis/Copssh_2.1.0_Installer.exe
===================================================================
(Binary files differ)
Property changes on: trunk/winslad/nsis/Copssh_2.1.0_Installer.exe
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/winslad/nsis/SpecialGroupsSIDs.nsh
===================================================================
--- trunk/winslad/nsis/SpecialGroupsSIDs.nsh 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/nsis/SpecialGroupsSIDs.nsh 2009-05-06 01:41:12 UTC (rev 3246)
@@ -0,0 +1,13 @@
+!define SG_ADMINISTRATORS "S-1-5-32-544"
+!define SG_USERS "S-1-5-32-545"
+!define SG_POWERUSERS "S-1-5-32-547"
+!define SG_GUESTS "S-1-5-32-546"
+
+!define SG_EVERYONE "S-1-1-0"
+!define SG_CREATOROWNER "S-1-3-0"
+!define SG_NTAUTHORITY_NETWORK "S-1-5-2"
+!define SG_NTAUTHORITY_INTERACTIVE "S-1-5-4"
+!define SG_NTAUTHORITY_SYSTEM "S-1-5-18"
+!define SG_NTAUTHORITY_AUTHENTICATEDUSERS "S-1-5-11"
+!define SG_NTAUTHORITY_LOCALSERVICE "S-1-5-19"
+!define SG_NTAUTHORITY_NETWORKSERVICE "S-1-5-20"
\ No newline at end of file
Added: trunk/winslad/nsis/UserMgr.dll
===================================================================
(Binary files differ)
Property changes on: trunk/winslad/nsis/UserMgr.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/winslad/nsis/banner.txt (from rev 3242, trunk/winslad/sshwindows/banner.txt)
Added: trunk/winslad/nsis/sshd_config
===================================================================
--- trunk/winslad/nsis/sshd_config 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/nsis/sshd_config 2009-05-06 01:41:12 UTC (rev 3246)
@@ -0,0 +1,112 @@
+# CopSSH configuration for WinSLAD
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/bin:/usr/sbin:/sbin:/usr/bin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options change a
+# default value.
+
+#Port 22
+#Protocol 2,1
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh_host_rsa_key
+#HostKey /etc/ssh_host_dsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 768
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+PermitRootLogin no
+#StrictModes yes
+#MaxAuthTries 6
+
+RSAAuthentication yes
+PubkeyAuthentication yes
+#AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh_known_hosts
+RhostsRSAAuthentication no
+# similar for protocol version 2
+HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+PasswordAuthentication yes
+PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+AllowTcpForwarding no
+GatewayPorts no
+X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+PrintMotd no
+#PrintLastLog yes
+TCPKeepAlive yes
+#UseLogin no
+UsePrivilegeSeparation no
+#PermitUserEnvironment no
+#Compression delayed
+ClientAliveInterval 10
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+
+# no default banner path
+Banner /etc/banner.txt
+
+# override default of no subsystems
+#Subsystem sftp /bin/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
Property changes on: trunk/winslad/nsis/sshd_config
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/winslad/shell.bat
===================================================================
--- trunk/winslad/shell.bat 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/shell.bat 2009-05-06 01:41:12 UTC (rev 3246)
@@ -1 +1,3 @@
- at C:\windows\system32\cscript.exe /nologo c:\winslad\shell.vbs
+ at echo off
+cd c:\winslad
+c:\windows\system32\cscript.exe /nologo c:\winslad\shell.vbs
Added: trunk/winslad/winslad.nsi
===================================================================
--- trunk/winslad/winslad.nsi 2009-05-06 01:38:56 UTC (rev 3245)
+++ trunk/winslad/winslad.nsi 2009-05-06 01:41:12 UTC (rev 3246)
@@ -0,0 +1,112 @@
+# set compressor
+SetCompressor lzma
+SetCompress auto
+
+# define name of installer
+outFile "winslad-installer.exe"
+
+# define installation directory
+installDir C:\winslad
+
+!define uninstkey "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinSLAD"
+!define sladuser "slad"
+
+!addplugindir nsis
+
+BrandingText "WinSLAD - Windows Security Local Audit Daemon"
+XPStyle on
+
+# request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+# start default section
+section
+
+ # set the installation directory as the destination for the following actions
+ setOutPath $INSTDIR
+
+ # create the uninstaller
+ writeUninstaller "$INSTDIR\uninstall.exe"
+
+ # files which need to be copied
+ file sladd.exe
+ file shell.vbs
+ file shell.bat
+
+ # John the Ripper plugin
+ SetOutPath $INSTDIR\plugins\john
+ file /r /x Makefile /x .svn john\*.*
+
+ # ovaldi plugin
+ SetOutPath $INSTDIR\plugins\oval
+ file /r /x Makefile /x .svn oval\*.*
+
+ # after all plugins are installed, reset outpath again
+ setOutPath $INSTDIR
+
+ # create a shortcut named "new shortcut" in the start menu programs directory
+ # point the new shortcut at the program uninstaller
+ #createShortCut "$SMPROGRAMS\new shortcut.lnk" "$INSTDIR\uninstall.exe"
+
+ # Add Uninstall RegKey http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs
+ DetailPrint "register uninstall information"
+ WriteRegStr HKLM "${uninstkey}" "DisplayName" "WinSLAD ${SLADD_VERSION} (remove only)"
+ WriteRegStr HKLM "${uninstkey}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
+ WriteRegStr HKLM "${uninstkey}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
+ WriteRegStr HKLM "${uninstkey}" "InstallLocation" "$\"$INSTDIR$\""
+ WriteRegStr HKLM "${uninstkey}" "Publisher" "Greenbone Networks GmbH"
+ WriteRegStr HKLM "${uninstkey}" "HelpLink" "http://greenbone.net/"
+ WriteRegStr HKLM "${uninstkey}" "HelpTelephone" "+49-541-335084-0"
+ WriteRegStr HKLM "${uninstkey}" "DisplayVersion" "${SLADD_VERSION}"
+ WriteRegStr HKLM "${uninstkey}" "NoModify" "1"
+ WriteRegStr HKLM "${uninstkey}" "NoRepair" "1"
+
+ # Create slad user http://nsis.sourceforge.net/UserMgr_plug-in
+ DetailPrint "create ${sladuser} account"
+ UserMgr::CreateAccountEx "${sladuser}" "slad" "WinSLAD service user" "WinSLAD service user" "WinSLAD service user" "UF_DONT_EXPIRE_PASSWD"
+ UserMgr::AddToGroup "${sladuser}" "Administrators"
+ UserMgr::SetUserInfo "${sladuser}" "HOMEDIR" "$\"$INSTDIR$\""
+
+ # install SSH
+ MessageBox MB_YESNO "Would you like to install the SSH Service now?" IDYES true IDNO false
+ true:
+ DetailPrint "installing CopSSH"
+ File /oname=s-i.exe nsis\Copssh_2.1.0_Installer.exe
+ ExecWait "$INSTDIR\s-i.exe /S"
+ Delete "$INSTDIR\s-i.exe"
+ Exec "$\"$PROGRAMFILES\ICW\Bin\copsshadm.exe$\" -c activateuser -u ${sladuser} --shell /cygdrive/c/winslad/shell.bat --nohomelink"
+ SetOutPath "$PROGRAMFILES\ICW\etc"
+ File /oname=banner.txt nsis\banner.txt
+ File /oname=sshd_config nsis\sshd_config
+ setOutPath $INSTDIR
+ false:
+
+sectionEnd
+
+section "uninstall"
+
+ # uninstall SSH
+ MessageBox MB_YESNO "Would you like to uninstall the SSH Service now?" IDYES true IDNO false
+ true:
+ DetailPrint "uninstalling CopSSH"
+ ExecWait "$\"$PROGRAMFILES\ICW\uninstall_Copssh.exe$\" /S"
+ false:
+
+ # delete the slad user
+ DetailPrint "delete ${sladuser} account"
+ UserMgr::DeleteAccount "${sladuser}"
+
+ # Remove the Uninstall RegKey
+ DeleteRegKey HKLM "${uninstkey}"
+
+ # delete the uninstaller
+ DetailPrint "delete WinSLAD files in $INSTDIR"
+ delete "$INSTDIR\uninstall.exe"
+
+ # then delete the installation directory
+ RMDir /r $INSTDIR
+
+ # second, remove the link from the start menu
+ #delete "$SMPROGRAMS\new shortcut.lnk"
+
+sectionEnd
More information about the Openvas-commits
mailing list