summaryrefslogtreecommitdiffstats
path: root/src/appl/bsd/krcp.c
Commit message (Collapse)AuthorAgeFilesLines
* * krcp.c: don't print our own error message if kcmd returns -1 (itBarry Jaspan1996-11-141-8/+10
| | | | | | | always printed something in that case, and error_message(-1) prints a mess [krb5-appl/70] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9413 dc483132-0cff-0310-8789-dd5450dbe970
* login.c (destroy_tickets): Just use global kcontext insteadTheodore Tso1996-11-071-2/+5
| | | | | | | | | | | | | of creating a new krb5 context for no good reason. krshd.c (main): krsh.c (main): krlogind.c (main): krlogin.c (main): krcp.c(main): Check the error return from krb5_init_context(), and print an error message if necessary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9317 dc483132-0cff-0310-8789-dd5450dbe970
* Fix bug that caused files transmitted by a NetBSD box to have fileSam Hartman1996-08-101-1/+1
| | | | | | | | | | names of (null). CVS: ---------------------------------------------------------------------- automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: ---------------------------------------------------------------------- git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8922 dc483132-0cff-0310-8789-dd5450dbe970
* Merge with Cygnus sources, changes from Mark Eichin, Marc Horowitz, ChrisKen Raeburn1996-05-011-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provenzano and me: * Makefile.in (install): Install correct set of man pages, and check for failures. * kshd.M, klogind.M: Renamed from kr*.M versions. * login.M: New file. Man page for login with some description of new features. * rlogin.M: Remove references to using program with target hostname as argv[0]. * rsh.M: Ditto. Also document -f, -F, -x options. * login.c: Massive changes. Split much functionality out of main and into separate file sections: terminal flag settings, Kerberos 4 and 5 support, UNIX password support, mail check, signal handler handling, some other support routines. Revamp controlling tty and process group handling. For AFS configuration, use setpag and run aklog. Try validating password using krb5. Always set tty flags, not just for rlogin session. When validating tickets, treat an existing key file that doesn't contain the key we think we want (possibly because DNS was spoofed) as an error condition. * Makefile.in (LOGINLIBS): List libkrb524.a here. (LIBOBJS): Not here. (login.krb5): Reverse the order of LIBOBJS and LOGINLIBS. * configure.in: Check for --with-afs. Add AFS libs and define SETPAG if supplied. * login.c (KRB5_GET_TICKETS, KRB4_GET_TICKETS, KRB_RUN_AKLOG): new macros selecting single signon options. krb5.conf profile support for control over authentication options, above the compile time selection. (conf_affirmative): new function, recognize yes/no in profile value. (login_get_kconf): new function, look for all [login] flags and set them in appropriate globals (via login_conf_set array.) (main, sleepexit, destroy_tickets): Check the new login_* flags. (main): rename KRB4_USE_524 to KRB4_CONVERT. * configure.in: Added checks for tcsetpgrp, tcgetpgrp, setpgid. * krlogind.c (control): Use tcgetpgrp if it's available. * loginpaths.h (RPATH, LPATH, LPATH_root): Define HP/UX 9.04 versions, conditionalized on __hpux and !hpux. * login.c and configure.in: instead of checking _IBMR2 and __sgi__, write configure tests to check for the existence of /etc/environment and /etc/TIMEZONE files, respectively. * forward.c (rd_and_store_for_creds) : If chown fails then only pass failure back if owner is different than intended owner. This is to make rsh.exp test work without requiring root privlidges. * login.c (main): Don't set TERM to an empty value. (stypeof) [__hpux]: Return null if unknown. * krlogin.c (catchild): remove hp/ux kludge because of aclocal.m4 fix. (speeds): test __hpux for hpux speed list. (main): test __hpux for use of FIOSSAIOSTAT and FIOSSAIOOWN (USE_TERMIO): test __hpux for bsdtty/ptyio headers. * krlogind.c: test __hpux for bsdtty/ptyio headers. (doit): test __hpux for use of setpgrp2. * krcp.c (main): test __hpux as well for remsh vs. rsh. * krcp.c (des_write): Make sure the buffer for the encrypted data is large enough. Only return an error in malloc fails. * krsh.c (main): Always turn on anyport -A option. * krlogind.c (ptsname): Declare if it's going to be used. * krshd.c (main): Use basename of argv[0] for progname. * login.c (dofork): On linux, TIOCNOTTY causes us to die on a SIGHUP, so don't even try it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7881 dc483132-0cff-0310-8789-dd5450dbe970
* configure.in (LOGINLIBS): Remove DECLARE_SYS_ERRLIST since it's noTheodore Tso1996-04-171-55/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | longer necessary. krcp.c (verifydir, allocbuf, rsource, source, sink): Don't use sys_errlist[]; just call error_message() instead, since we depend on com_err anyway. krshd.c (recvauth): krlogind.c (recvauth): Don't actually check the checksum unless it is required. Old (pre-beta 5) clients sent a checksum of random garbage (such as their pid) which is impossible to actually check on the server side. (Grad student stupidity strikes again.) (fatalperror): Don't use sys_errlist[] to get the right error message; just depend on com_err instead, since we're using it anyway. krshd.c (doit): krlogind.c (do_krb_login): Fix logic so that if checksums are required, and the checksum is valid, don't syslog the stupid warning message about "Checksums are only required for v5 clients...." krcp.c, krshd.c, krlogind.c: Miscellaneous -Wall cleanups krlogind.c (getpty): Removed dead code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7823 dc483132-0cff-0310-8789-dd5450dbe970
* * krshd no longer does non-blocking IO. It never really needed itSam Hartman1996-03-241-2/+2
| | | | | | | | | | | * krcp works correctly even if not all data is written in a single request. * Implement temporary patch to make sure des_outbuf is big enough. Proven should be sending the Cygnus patch once he decides how to handle this permanently. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7706 dc483132-0cff-0310-8789-dd5450dbe970
* Remove space from #endif lineSam Hartman1996-02-261-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7546 dc483132-0cff-0310-8789-dd5450dbe970
* Fix the server side of the krlogin bug detecting eof in connection closeSam Hartman1996-02-261-2/+4
| | | | | | Also, import the ops changes to do with enable-athena. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7545 dc483132-0cff-0310-8789-dd5450dbe970
* * rcp (client mode) now uses rsh -x but still supports the old encryption inSam Hartman1996-02-011-135/+38
| | | | | | | | | | | | | server mode. * krshd will work in encrypting mode even when the port for stderr is null. * rcp will work if stdin isn't not a socket, but is a pipe in remote mode * krshd destroys forwarded credentials properly * For rsh, the secure_message got moved to the client; if you use a new client with an old server, you get secure_message twice, but it should be a useful change long-term. * Fixed typo in rcp man page. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7423 dc483132-0cff-0310-8789-dd5450dbe970
* Check for prototypes so that KRB5_STDARG_P worksEzra Peisach1996-01-221-2/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7360 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c (error): Convert to use varargsEzra Peisach1996-01-111-6/+28
| | | | | | * configure.in: Check for stdarg.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7308 dc483132-0cff-0310-8789-dd5450dbe970
* If invoked with the -D port option, do not die if proper entry is missingEzra Peisach1995-11-021-16/+24
| | | | | | | | | from /etc/services... This is for the dejagnu suite running on a machine following the installation instructions - i.e. make, make check. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7010 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_stash.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-061-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6699 dc483132-0cff-0310-8789-dd5450dbe970
* Remove declaration of errno altoghether. "extern int errno;" isTheodore Tso1995-07-061-1/+0
| | | | | | always wrong. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6228 dc483132-0cff-0310-8789-dd5450dbe970
* ----------------------------------------------------------------------Sam Hartman1995-07-021-1/+1
| | | | | | | | | | | | automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: ---------------------------------------------------------------------- Declare errno as extern int, not just int. This prevents masking the definition in the c library, which can make life interesting under AIX. CVS: git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6221 dc483132-0cff-0310-8789-dd5450dbe970
* Compiler warning cleanupPaul Park1995-06-271-20/+17
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6171 dc483132-0cff-0310-8789-dd5450dbe970
* changes to accomodate redefinition of krb5_auth_contextTom Yu1995-06-111-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6035 dc483132-0cff-0310-8789-dd5450dbe970
* * loginpaths.h: Add NetBSD pathsEzra Peisach1995-05-211-0/+2
| | | | | | | | | | | | | | * login.c: Define TAB3 to 0 if non existant * krlogin.c (mode): ifdef code based on TABDLY existing on machine. (netbsd lacks this). * krcp.c: Declare sys_errlist only if needed by the OS. * configure.in: Add DECLARE_SYS_ERRLIST Check for libcrypt defining the function crypt git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5835 dc483132-0cff-0310-8789-dd5450dbe970
* login.c (main): Only try to use TIOCSETD if it is definedTheodore Tso1995-05-201-0/+1
| | | | | | | | | | | (instead of relying on _IBMR2 *not* being defined). Only try to use TIOCNXCL if it is defined. krcp.c: If setreuid() is emulated using setresuid(), #define HAVE_SETREUID so it gets used. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5825 dc483132-0cff-0310-8789-dd5450dbe970
* kcmd.c and krcp.c: Add <stdlib.h> for malloc declarations.Ezra Peisach1995-05-091-1/+5
| | | | | | | krshd.c: Cast sockadr_in * to sockaddr * in call to accept. (compiler warning). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5762 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c (answer_auth()): Requires two new args that are passedChris Provenzano1995-05-051-38/+74
| | | | | | | | from the command line. The first -c is to pass the filename of the remote credential cache. The second -C is to pass the filename of the remote krb5.conf file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5731 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c (answer_auth()): Don't destroy the credential cacheChris Provenzano1995-05-051-17/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5724 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c (answer_auth()): Set auth_context = NULL before using itChris Provenzano1995-05-041-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5713 dc483132-0cff-0310-8789-dd5450dbe970
* Don't try to play uid swapping games if the effective uid is not zeroTheodore Tso1995-05-031-7/+15
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5697 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c (answer_auth): Should not call krb5_cc_close afterEzra Peisach1995-04-271-5/+0
| | | | | | | | | | | | | krb5_cc_destroy. (encrypted rcp failed). * krlogind.c (main): -S option was not getting a keytab. (passing a char * to krb5_compat_recvauth). * krshd.c (recvauth): extract the client principal from ticket before calling krb5_kuserok on a NULL principal. (main): -S option was not getting a keytab (passing a char *). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5536 dc483132-0cff-0310-8789-dd5450dbe970
* When port number specified on command line, htons was missingEzra Peisach1995-04-271-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5533 dc483132-0cff-0310-8789-dd5450dbe970
* More changes from ian@cygnus.com to support testingMark Eichin1995-04-211-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | > Fri Mar 24 15:04:25 1995 Ian Lance Taylor <ian@cygnus.com> * krcp.c (forcenet): New global vraiable. (main): Accept -D and -N arguments. Pass Kerberos realm to remote rcp execution. (hosteq): If -N specified, always return 0. * rcp.M: Document -D and -N. * krshd.c (ARGSTR): Add "P:" to KERBEROS version. (kprogdir): New global variable. (main): Handle -P. (path): Remove global variable. (path_rest): Remove explicit size. (envinit): Use 0 instead of path. (PATHENV): define. (doit): Use kprogdir variable instead of KPROGDIR macro when setting path. Build path in allocated memory rather than using a fixed size array. If the command starts with "rcp ", force use of kprogdir/rcp if it exists. * krshd.M: Document -P. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5429 dc483132-0cff-0310-8789-dd5450dbe970
* Fri Apr 21 14:07:15 1995 Mark Eichin <eichin@cygnus.com>Mark Eichin1995-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Added Ian's changes with minor tweaks. These are used by the testsuite. > Thu Mar 23 18:18:31 1995 Ian Lance Taylor <ian@cygnus.com> * krshd.c (ARGSTR): Add S:M:A to KERBEROS version. (srvtab): New global variable. (krb5_override_default_realm): Declare. (main): Handle -S, -M and -A arguments. Call SO_REUSEADDR on socket if debug_port set. (doit): If -A used, allocate a random port for the stderr stream, rather than allocating a reserved port. Don't call initgroups if not changing the uid. (recvauth): Pass srvtab to krb5_compat_recvauth. * krshd.M: Document -S, -M, and -A. * krsh.c (main): Accept -A, and pass it to kcmd. * rsh.M: Document -A. * kcmd.c (kcmd): Add new argument anyport. If it is set, permit any port for the stderr stream, rather than requiring a reserved port. Initialize ret_cred to NULL. * krcp.c (main): Pass 0 for anyport to kcmd. * krlogin.c (main): Pass 0 for anyport to kcmd. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5428 dc483132-0cff-0310-8789-dd5450dbe970
* kcmd.c (kcmd()): Don't pass any data to sendauth() to beChris Provenzano1995-03-271-26/+15
| | | | | | | | | | | | cchecksummed. The remote side doesn't check it anyway. krcp.c (send_auth()): Use new calling convention for krb5_rd_req(). krshd.c (recvauth()): Use new calling convention for krb5_compat_recvauth(). krlogind.c (recvauth()): Use new calling convention for krb5_compat_recvauth(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5250 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd()) Use new calling convention for krb5_sendauth().Chris Provenzano1995-03-101-8/+5
| | | | | | * krcp.c () Use new calling convention for krb5_mk_req_extended(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5102 dc483132-0cff-0310-8789-dd5450dbe970
* * forward.c, kcmd.c, krcp.c, krlogin.c, krlogind.c, krsh.c,John Gilmore1995-02-281-6/+2
| | | | | | krshd.c: Avoid <krb5/...> and <com_err.h> includes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5020 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c Call krb5_sendauth() and krb5_get_credentials() withChris Provenzano1995-02-231-23/+24
| | | | | | | | | new calling convention. * krcp.c (answer_auth()) Call krb5_mk_req_extended90 with new calling convention. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4981 dc483132-0cff-0310-8789-dd5450dbe970
* Add keytype parameter to fieldTheodore Tso1995-02-031-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4900 dc483132-0cff-0310-8789-dd5450dbe970
* * Removed all #include <krb5/crc-32.h>Chris Provenzano1995-02-021-1/+0
| | | | | | * Removed krb5_enctype argument passed to krb5_get_for_creds() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4871 dc483132-0cff-0310-8789-dd5450dbe970
* * Removed all narrow types and references to wide.h and narrow.hChris Provenzano1995-01-251-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4837 dc483132-0cff-0310-8789-dd5450dbe970
* Removed all references to DECLARG and OLDDECLARG.Chris Provenzano1995-01-131-60/+62
| | | | | | | | Added krb5_context to all krb5_*() routines. Fixed krlogin to use htons(debug_port). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4814 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c, krlogin.c, krcp.c: Always include fcntl.h, and neverTheodore Tso1995-01-101-3/+1
| | | | | | | | sys/fcntl.h. * krshd.c: Always define the Kerberos V4 data structures. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4800 dc483132-0cff-0310-8789-dd5450dbe970
* Removed the hard-coded paths for the BSD rlogin/rcp/rsh programs.Richard Basch1994-12-261-0/+3
| | | | | | Let "configure" find the programs for us... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4751 dc483132-0cff-0310-8789-dd5450dbe970
* krcp.c, krlogin.c, krlogind.c (v5_des_write): Fix byte swapping codeTheodore Tso1994-12-191-3/+3
| | | | | | | | | (Missing shift instructions). krlogind.c: Fixed byte swapping code so that V4 des compatibility works on 64 bit architectures. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4734 dc483132-0cff-0310-8789-dd5450dbe970
* Checked in Richard's changes of November 2nd. (See changelog). Lots ofTheodore Tso1994-11-081-39/+59
| | | | | | portability fixes: POSIX_SIGNALS, POSIX_SETJMP, use of POSIX waitpid, etc. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4632 dc483132-0cff-0310-8789-dd5450dbe970
* Add widen.h and narrow.h around declaration so that argument types areTheodore Tso1994-10-041-0/+2
| | | | | | widened. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4449 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-181-3/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4188 dc483132-0cff-0310-8789-dd5450dbe970
* test for vfork, using AC_VFORK, which is a very large hammer..Mark Eichin1994-08-161-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4159 dc483132-0cff-0310-8789-dd5450dbe970
* lintMark Eichin1994-08-141-4/+1
| | | | | | | | | fix LOGIN_PROGRAM (from net) get rid of getpw* misdeclarations make default args char* instead of int fix error message pointer git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4127 dc483132-0cff-0310-8789-dd5450dbe970
* rest of signal cleanups plus strsaveMark Eichin1994-08-051-7/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4053 dc483132-0cff-0310-8789-dd5450dbe970
* roundupMark Eichin1994-07-271-0/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4027 dc483132-0cff-0310-8789-dd5450dbe970
* USE_DIRENT_HMark Eichin1994-07-271-9/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4022 dc483132-0cff-0310-8789-dd5450dbe970
* Umulate utimes() only for systems that don't have it; this is becauseTheodore Tso1994-07-161-0/+22
| | | | | | | rcp tries to set the millisecond argument, which might be significant some day.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3989 dc483132-0cff-0310-8789-dd5450dbe970
* Fix security hole in krcp.cTheodore Tso1994-06-021-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3658 dc483132-0cff-0310-8789-dd5450dbe970
* Lots of cleanup. V4/V5 compatibility recvauth moved to separateTheodore Tso1993-12-241-14/+8
| | | | | | | | library function. Folded in rest of GZA's patches. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3278 dc483132-0cff-0310-8789-dd5450dbe970