479 Commits

Author SHA1 Message Date
dkulwin
138ce33669 fix exception caused by *dword used in *size_t call parameter
The code was writing a size_t size of data to a dword.
2015-11-16 17:53:16 -06:00
dkulwin
937f2e02cc ssh-lsa project changes
Using a module definition file gives better support to handle symbol
decorations.  This change adds ssh-lsa.def to define the functions
exported from ssh-lsa.dll.

Misc. changes to ssh-lsa project (warning level, sdl check, calling
convention).
2015-11-13 22:01:06 -06:00
dkulwin
b45867b93c LSA visual studio work
Add exports via pragma statements and reduce included libraires
2015-11-13 11:58:51 -06:00
dkulwin
1067adc0f2 Lsa project added to visual studio solution
Lsa project added to visual studio solution
2015-11-11 15:03:49 -06:00
dkulwin
dd2bf90066 Support for Visual studio
The changes necessary to support visual studio fall into 2 basic groups.
1) reordering of header files, and 2) changes to support syntax
differences between mingw and visual studio and 3).  All changes are
conditional upon the definition of the macro __VS_BUILD__ .
2015-11-11 15:03:03 -06:00
dkulwin
d34621a289 Force defines for certain errno values.
The visual studio errno.h file is conflicting with no-machine errno
constants.  Force the constants we need and define
_CRT_NO_POSIX_ERROR_CODES to avoid redefining them.  This fixes port
forwarding for visual studio implementation.
2015-11-10 15:51:24 -06:00
quamrulmina
faf153b7cf msbuild cmd script to build all openssh win32 binaries using VS2015 solution
Builds all x64 64bit and x86 32 bit openssh binaries Release and Debug
versions from the single Win32-OpenSSH.sln file.
1. Open a MSbuild cmd prompt for Visual Studio 2015
2. cd Win32-OpenSSH\contrib\win32\openssh directory.
3. openssh_build_cmd
2015-11-09 18:39:32 -06:00
Manoj Ampalam
d7986de876 Enabling CNG back after merging L1 to master. 2015-11-09 00:04:37 -08:00
Manoj Ampalam
a138680779 Merge branch 'L1' 11_09_2015 2015-11-08 23:55:21 -08:00
Manoj Ampalam
7f97b8188a Disable CNG for MingW builid 2015-11-08 23:49:18 -08:00
dkulwin
891836d333 Remove ssh-keygen from ssh-keysign project
ssh-keygen isn't needed by ssh-keysign and ssh-keygen.c and
ssh-keysign.c both have main.
2015-11-06 18:24:53 -06:00
quamrulmina
9c645a210f Block arrow keys in sshd server so that it is not passed to shell/cmd or echoed
For now we avoid sending the 4 arrow keys to the shell or echo it to the
remote side. as cmd.exe or powershell does not process it correctly in
stream output device mode we run win32 sshd server.
2015-11-06 17:13:57 -06:00
quamrulmina
9f26b75d5d sshd sets the client terminal mode to original after an interactive session ends
This is needed so that sftp running after a ssh session from a Linux
client does not see two lines for each line typed. CRLF is set by win32
sshd server but we have to set mode to the previous way in the client
when an interactive session has ended.
2015-11-06 14:55:53 -06:00
dkulwin
c051e06f50 Add utility to automatically copy the config.h.vs file to config.h
Add a utility upon which every other project is dependent, to copy the
config.h.vs file to the source root config.h.  Because the target may
have changed outside of visual studio, I have disabled the dependency
check so the file will be copied with every build..
2015-11-06 13:07:51 -06:00
quamrulmina
df50964dfc Fix regression issue of ssh not exiting after sftp client ends
Add smarter logic when reading 0 bytes is ok (only when tty console read
)
2015-11-06 12:05:46 -06:00
dkulwin
3a660dc4c7 Tweak kerberos function specs to match prototypes 2015-11-06 12:03:51 -06:00
dkulwin
df8c2c2b02 Change include paths to use matching plaform/config
The include paths for openssl should match the platform/config of the
project.
2015-11-06 12:03:50 -06:00
Manoj Ampalam
c174b10d2c Setting module directory as working directory of sshd deamon and forked processes
Doing so will allow sshd.exe to be launched from any directory - thereby
enabling sshd to be launched from SCM. With this change - following
works:
- sshd.exe install
- net start sshd
- net stop sshd
- sshd.exe uninstall
2015-11-06 10:03:19 -08:00
quamrulmina
264509c2f4 Revert "Fix ssh not exiting when sftp ends"
This reverts commit 2ee6bd1b093dfb1f9ea60b3d0ae2f133223848ae.
2015-11-06 11:37:00 -06:00
quamrulmina
2ee6bd1b09 Fix ssh not exiting when sftp ends
It was a regression bug..
2015-11-06 11:00:14 -06:00
quamrulmina
f4fa821b6a version identifier expanded to provide more info
win32 port says if Visual Studio was used  (Win32 port with VS ). MingW
compiler version would say "Win32 port" .
2015-11-06 03:34:53 -06:00
quamrulmina
4d952924e1 sftp client and server code changed to build & work with MS Visual Studio
Use new compile flag WIN32_VS to add/change logic of sftp client and
sftp server codes so that MS Visual Studio 2015 compiler and runtime can
be used. opendir(), readdir(), closedir() directory APIs and basename()
API of Unix/Linux are implemented in Windows as they are not available
in Windows/VisualStudio C-runtime. win32_dirent.c and win32_dirent.h
files added as dirent.c and dirent.h are not available in Windows and we
do not want to affect mingW/gcc builds for Windows which have those
files available.
2015-11-06 03:02:51 -06:00
arif-pragmasys
71cca6edc4 eol fix for config files 2015-11-05 18:41:37 -06:00
arif-pragmasys
e6a1a5ac4f more files to ignore 2015-11-05 18:35:26 -06:00
arif-pragmasys
50341ccb35 linux build needs config.h.in 2015-11-05 18:21:51 -06:00
arif-pragmasys
ec3bc6ee39 ignore autogenerated config files 2015-11-05 18:15:06 -06:00
arif-pragmasys
eb8a4a4be5 change eol for configure related scripts 2015-11-05 17:18:41 -06:00
arif-pragmasys
f919cbe4a8 Merge branch 'L1' of https://github.com/PowerShell/Win32-OpenSSH into L1 2015-11-05 17:01:47 -06:00
arif-pragmasys
cb5bdfec77 Build script for windows 2015-11-05 17:01:42 -06:00
dkulwin
65fb8f4c38 Fix kerberos prototypes for Visual studio
Visual studio wants call convention specification within the parenthesis
when declaring function variables.
2015-11-05 15:39:18 -06:00
dkulwin
2367dca1e9 Disable invalid parameter handler use under mingw
Mingw doesn't support the invalid parameter handler function in the same
way as visual studio.  Shouldn't be needed under mingw anyway.
2015-11-05 15:01:12 -06:00
manojampalam
9fa44f0777 Merge pull request #22 from noshbar/L1
Fix potential memory leak in win32/console.c
2015-11-05 12:26:22 -08:00
dkulwin
44510dc67e Back out kerberos prototype changes
Looks like the changes work for visual studio, but broke mingw.
2015-11-05 14:03:33 -06:00
dkulwin
99a38147f7 Updated Readme
Updated with new paths
2015-11-05 13:16:02 -06:00
dkulwin
095ae850aa path updates for visual studio solution
Added specific paths for different configurations of OpenSSL instead of
assuming a tree with all four.
2015-11-05 13:03:03 -06:00
dkulwin
7bd7008792 Add Visual Studio 2015 solution and projects
Add the solution, projects and filter files for building Win32-OpenSSH
binaries under visual studio 2015.
2015-11-04 19:34:21 -06:00
dkulwin
ea18785a19 Add a copy of umac for 128 bit variant
The mingw make files build the umac source twice with different options.
Under visual studio, its easier if we just make a separate copy with
it's own build rules.
2015-11-04 19:34:20 -06:00
dkulwin
3bc857c8fe Function prototype to support 64-bit
Missing a prototype can cause a problem if we are 64-bit and the
function is returning a pointer.  Add a prototype to stop the return
value from being corrupted.
2015-11-04 19:34:19 -06:00
dkulwin
3bbefb6078 Add #ifdefs around #defines
In order to avoid redefinition warnings, check before we define.
2015-11-04 19:34:19 -06:00
dkulwin
5fd03ec459 Add some missing headers and defines to support visual studio
Visual studio compatibility changes.
2015-11-04 19:34:18 -06:00
dkulwin
11561cd62a add an invalid parameter handler to catch _get_osfhandle failures under visual studio
The sfds code blindly uses _get_osfhandle on values that may be file
descriptors, sockets or io handles.  Under visual studio, _get_osfhandle
will call the invalid parameter handler for items that are not file
descriptors.  Adding the handler allows us to call this in the same way
that mingw does.  We will still get an assertion, but a prior change
sends those to stdiout instead of making the user click through a
dialog.
2015-11-04 19:34:17 -06:00
dkulwin
58d15ecb9a Add usleep call for visual studio
usleep isn't part of standard windows, so we add a version of it based
on Sleep();
2015-11-04 19:34:17 -06:00
dkulwin
2454a18404 whitespace after \ causes visual studio to not parse as a line continuation
Make the file work better in visual studio
2015-11-04 19:34:16 -06:00
dkulwin
39706fca9c Add code to stop asserts from tossing up dialogs
Assert dialogs can be a problem when running as a service.  This change
instructs assert info to be sent to stdout instead of a dialog.
2015-11-04 19:34:15 -06:00
dkulwin
25e52cb498 Add prototypes for functions returning pointers and modify how some arrays are defined
Functions not declared before use, are define as returning an int.
Under 64-bit this can result in corrupted pointers being returned.

Also, Visual studio doesn't like it when you use variables to declare
array sizes, static values always work though.
2015-11-04 19:34:15 -06:00
dkulwin
c2c272eaf1 Use xstrdup instead of static memory assignment to avoid a problem when we try to free
The original code had host file entries pointing to static memory.  This
memory is freed in tilde_expand_paths.  Better to xstrdup like the
original openssh code did.
2015-11-04 19:34:14 -06:00
dkulwin
319d1bb581 Add cast for GetProcAddress return
GetProcAddress returns a FARPROC, *, but compiler likes it better if you
give a proper cast to the function value.
2015-11-04 19:34:13 -06:00
dkulwin
27739d90ed #if out setting of compress hooks if not using ZLIB
We shouldn't even try to call ssh_packet_set_compress_hooks if zlib
isn't enabled.  This change conditionally compiles it out.
2015-11-04 19:34:13 -06:00
dkulwin
ddace27b97 VC2015 doesn't like it when you take a negative of on unsigned value
Negative of an unsigned value should just be the two's complement.  Add
code to change code with negative unsigned values to two's compliment
values if compiling under visual studio.
2015-11-04 19:34:12 -06:00
quamrulmina
bf2766ba2d Fix sshd server to not send back space erase when no character in the line
sshd server keeps count of characters typed on a line and will not send
backspace erase to the client if no character is there to erase on the
line even if the users is typing backspaces. This avoids erase of shell
prompt characters for visual user friendliness.
2015-11-04 17:10:40 -06:00