summaryrefslogtreecommitdiffstats
path: root/src/appl/gssftp/ftp/secure.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbundle applications into separate repositoryGreg Hudson2009-11-221-410/+0
| | | | | | | | | | | | | | | Remove libpty, gssftp, telnet, and the bsd applications from the source tree, build system, and tests. Docs still need to be updated to remove mentions of the applications. The build system should be simplified now that we're down to one configure script and don't need some of the functionality currently in aclocal.m4. ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23305 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-12/+12
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb4 support in gssftp and telnetGreg Hudson2008-12-151-71/+0
| | | | | | | ticket: 6303 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21451 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c (secure_putbuf): Initialize automatic variable LENGTH to 0.Ken Raeburn2006-11-021-1/+1
| | | | | | * ftp.c (gss_trials, n_gss_trials): Make static and const. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18760 dc483132-0cff-0310-8789-dd5450dbe970
* Use memmove for overlapping regionsKen Raeburn2006-10-151-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18703 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c: Include autoconf.h. Include stdint.h and inttypes.h if available.Ken Raeburn2006-03-311-9/+9
| | | | | | | (ftp_uint32, ftp_int32): Always define as [u]int32_t instead of testing configure-time type size macros. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17816 dc483132-0cff-0310-8789-dd5450dbe970
* * ftp.c: Include Winsock 2 instead of Winsock.Danilo Almeida2002-04-111-1/+3
| | | | | | | | | | | * ftp_var.h: Include Winsock 2 headers. * secure.c: Include port-sockets.h on Win32. * main.c: Include mswsock.h (MS Winsock extensions) so that we get some socket options we need to convert sockets to "file descriptors" used in posix-like routines. We now need to pull this in explictly now that we are using Winsock 2. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14381 dc483132-0cff-0310-8789-dd5450dbe970
* Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone;Ken Raeburn2001-10-101-1/+1
| | | | | | don't worry about restoring them when importing new versions of code.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in, cmds.c, ftp.c, ftp_var.h, getpass.c, glob.c,Danilo Almeida2001-07-241-0/+6
| | | | | | | | | | | | main.c, ruserpass.c, secure.c, secure.h: Quick and dirty Win32 port. Changes include using sockets more portably; changing the method of getting username, home directory, and temporary filenames; adding password reading code for Win32; directory enumeration via FindNextFile() rather than readdir(); removing OUT labels (which appear to cause problems with MSVC++ 6.0). Since ANSI C, assume we have stdarg.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13628 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c: Instead of hard wiring the FUDGE_FACTOR, newEzra Peisach2001-07-041-18/+57
| | | | | | | | | | variables to keep track of the total buffer length desired and the actual maximum that can be fitted. Add secure_determine_constants() to determine the mechanism dependent overhead. This has a hard limit for krb4 - for gssapi use gss_wrap_size_limit. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13553 dc483132-0cff-0310-8789-dd5450dbe970
* prefer strerror() over sys_errlist[], for sparcv9-solaris2.8Ken Raeburn2001-03-081-4/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13061 dc483132-0cff-0310-8789-dd5450dbe970
* * domacro.c: Compiler warning cleanups and fix the overflow fix toEzra Peisach2000-08-171-28/+34
| | | | | | | | | | | | | | | | index the proper array. * cmds.c, cmdtab.c, ftp.c, ftp_var.h, getpass.c, glob.c, main.c, radix.c, ruserpass.c, secure.c, secure.h: Compiler warning cleanups including providing prototypes, cleanup of assignments in conditionals, including unistd.h and stdlib.h (if present), declaring local functions as static. * Makefile.in: Do not compile pclose.c - the code is not used. About 600 warnings down.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12622 dc483132-0cff-0310-8789-dd5450dbe970
* 1.2-beta4 pullupKen Raeburn2000-06-301-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12470 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c (secure_putbuf): Revert Sam's last change; ifTom Yu1999-02-261-1/+1
| | | | | | | | | | FUDGE_FACTOR is wrong, then badness can happen. Also, if out_buf.length != nbytes+FUDGE_FACTOR, heap corruption could happen. We really should be using gss_wrap_size_limit() or something like that, but doing so would require substantial amounts of reworking. [krb5-appl/685] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11228 dc483132-0cff-0310-8789-dd5450dbe970
* * ftp.c, cmds.c, cmdtab.c, main.c, secure.c, ftp_var.h: ReplaceGeoffrey King1998-08-121-14/+14
| | | | | | | | | | | | | | | global variable level with separate variables clevel and dlevel for the control channel and data channel protection levels, respectively, so that the user may specify separate protection levels for each channel. Similarly, functions such as getlevel and setlevel are now getclevel/getdlevel, and setclevel/setdlevel. * cmdtab.c: Add new FTP commands "cprotect" to allow the user to set the control channel protection level (similar to "protect"), and "ccc" (Clear Command Channel) which sets the control channel protection level to clear (per the RFC). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10804 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c (secure_putbyte): Set nout = 0 *before* callingDan Winship1998-04-071-1/+1
| | | | | | | | | secure_putbuf: if the transfer is aborted, the SIGURG handler will longjmp out, so the line after the secure_putbuf will never get executed, so nout would never be reset and the next transfer would overrun ucbuf. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10524 dc483132-0cff-0310-8789-dd5450dbe970
* * main.c: Change KERBEROS to KRB5_KRB4_COMPAT where appropriateTom Yu1997-10-161-11/+12
| | | | | | | | | | | | | | | * secure.c: Use <secure.h> rather than "secure.h" so that the correct secure.h gets included (the one in the $(srcdir) of the directory we're compiling secure.c into). From danw@mit.edu. * ftp.c: Change KERBEROS to KRB5_KRB4_COMPAT where appropriate. Re-order the clauses so that that GSSAPI gets tried before KERBEROS_V4. * Makefile.in: Update LOCALINCLUDE and the link line to DTRT with krb4 compatibility. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10235 dc483132-0cff-0310-8789-dd5450dbe970
* Apply patch from shadow@andrew.cmu.edu to fix a bug I fixedSam Hartman1996-11-201-1/+1
| | | | | | | for krb5 if compiled with Kerberos support; we don't support that, but applying the patch was easier than removing the code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9445 dc483132-0cff-0310-8789-dd5450dbe970
* * secure.c: Do not assume sizeof(long) = 4 for sending lengths OTWEzra Peisach1996-07-301-3/+15
| | | | | | * configure.in: Determine sizeof short, int, long for secure.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8860 dc483132-0cff-0310-8789-dd5450dbe970
* * Define a non-zero FUDGE_FACTOR for GSSAPI; I have it set to 64 now,Sam Hartman1996-07-271-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | even though I tend to see 52 bytes of increased data because I'm not sure that the 52 bytes is constant across all implementations ands options. * When allocating outbuf, set bufsize to the size that was actually allocated; it tends not to be nbyte+FUDGE_FACTOR exactly, and you smash the heap if you store a different size than you actually allocate. * If a secure_putbyte fails, set nout to zero so you don't run off the end of the buffer next time around. * Only write out foure bytes of net_len, no matter how big it is. The right answer is to have it be some 32-bit type but I'm not sure if I should use the krb5 type, the GSSAPI type, or what. (Remember, this code has ifdefs for KerberosIV without GSSAPI) * While we're at it, if secure_write fails while writing out a file in the client, notice the error. (a break in an inner loop didn't break out quite far enough) With these changes, I am able to get and put multi-megabyte files even on an Alpha. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8847 dc483132-0cff-0310-8789-dd5450dbe970
* some fixes changes from marc. changelogs will be merged laterMark Eichin1996-04-091-27/+42
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7760 dc483132-0cff-0310-8789-dd5450dbe970
* Use AC_HEADER_STDARG and use that test to set STDARG.Ezra Peisach1996-03-191-1/+1
| | | | | | | The old test assumed that either STDARG was defined or __STDC__ - which is not sufficient. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7660 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Check for stdlib.hEzra Peisach1996-02-071-0/+3
| | | | | | | * secure.c, pclose.c, ruserpass.c, ftp.c: Include stdlib.h if present for malloc declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7453 dc483132-0cff-0310-8789-dd5450dbe970
* Portability fixes: don't declare errno everSam Hartman1996-01-191-1/+3
| | | | | | and don't declare sys_errlist unless you need to. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7336 dc483132-0cff-0310-8789-dd5450dbe970
* Cygnus implementation of GSSAPI-based ftp client and server.Mark Eichin1996-01-141-0/+382
See README.gssftp for history and details. Bugs, comments to <eichin@cygnus.com>. Be sure to forward any changes made at MIT as well. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7312 dc483132-0cff-0310-8789-dd5450dbe970