summaryrefslogtreecommitdiffstats
path: root/src/appl/bsd/kcmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Unbundle applications into separate repositoryGreg Hudson2009-11-221-1035/+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-28/+28
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* On error getting forwarded creds, actually print out the errorKen Raeburn2009-05-251-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22384 dc483132-0cff-0310-8789-dd5450dbe970
* Unfortunately, pre-1.7 krshd fails to support keyed checksums becauseSam Hartman2009-04-031-0/+2
| | | | | | | | | | | | | | | | it uses the wrong API and wrong key usage. So, if the auth_context has an explicit checksum type set, then respect that. kcmd sets such a checksum type. Also, because other applications may have the same problem, allow the config file variable if set to override the default checksum. * kcmd.c: Force use of rsa_md5 * init_ctx.c: do not default to md5 * mk_req_ext.c: allow auth_context to override ticket: 1624 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22160 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb4 support in the applications. login's ability to run aklogGreg Hudson2008-12-151-328/+0
| | | | | | | | | | | | has been preserved and made unconditional on krb4 support, since aklog can now do krb5 auth. The config variable is now named krb_run_aklog (as it was sometimes documented), not krb4_run_aklog as it previously was. ticket: 6303 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21450 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of sprintf to snprintf or asprintfGreg Hudson2008-12-011-2/+2
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21258 dc483132-0cff-0310-8789-dd5450dbe970
* Use asprintf instead of malloc/strcpy/strcat in many placesGreg Hudson2008-10-201-4/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20901 dc483132-0cff-0310-8789-dd5450dbe970
* Use strdup in place of malloc/strcpy in many placesGreg Hudson2008-10-201-2/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* Define and use some inline helper functions for comparing data and authdata ↵Ken Raeburn2007-05-101-8/+3
| | | | | | | | structures, instead of open-coding checks of multiple fields everywhere. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19544 dc483132-0cff-0310-8789-dd5450dbe970
* Include k5-int.h instead of krb5.h when 'private' functions are neededKen Raeburn2007-01-201-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19080 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd_connect): Set *addrfamilyp with the address family actually usedKen Raeburn2004-10-011-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16799 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd_connect): Log errors if a connect to port 0 is attempted.Ken Raeburn2003-03-281-3/+28
| | | | | | | Report port number in connection failure. (setup_secondary_channel): Use socklen_t for socket address length. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15307 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (v4_des_write): Apply patch from ghudson to fixTom Yu2003-01-311-4/+9
| | | | | | | | non-right-justification case. ticket: 620 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15139 dc483132-0cff-0310-8789-dd5450dbe970
* enable ipv6 rsh connectionsKen Raeburn2002-06-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14580 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (setup_secondary_channel): Use select to time out after 10 minutes, orKen Raeburn2002-06-251-0/+30
| | | | | | | notice the primary channel being closed or receiving data while we wait for the secondary one to be set up. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14578 dc483132-0cff-0310-8789-dd5450dbe970
* Move compat_recv.c from krb5util library. Move some duplicated code intoKen Raeburn2002-06-251-9/+41
| | | | | | kcmd.c. Use getnameinfo and sockaddr_storage more. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14572 dc483132-0cff-0310-8789-dd5450dbe970
* Change approach for getaddrinfo support. Now, only fake-addrinfo.h isKen Raeburn2002-03-261-2/+0
| | | | | | | | | | | | included, no magic macros need to be defined, and no special care needs to be taken to identify a unique object file used in all builds of a library/program. All defined functions (if any) are static in each object file, and declared inline under gcc so they can be more easily eliminated. Simplifies maintenance, and worst case should add no more than a few KB to libraries and programs. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14291 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd_connect): Actually save errno value when preparing error text toKen Raeburn2002-03-131-0/+4
| | | | | | print. Free address info before returning. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14271 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd_connect): Don't call fixup_addrinfo, it's been deletedKen Raeburn2002-03-131-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14270 dc483132-0cff-0310-8789-dd5450dbe970
* (kcmd_connect): copy out correct remote address to callerKen Raeburn2002-03-081-2/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14256 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd_connect): Always call getport with the address family from theKen Raeburn2002-03-081-21/+20
| | | | | | | | | | current address. Retry connection to the same remote address if the error returned was EADDRINUSE; that applies to the local address. (kcmd, k4cmd): Don't set *fd2p before calling setup_secondary_channel. (setup_secondary_channel): If fd2p is non-null, initialize the pointed-to value to -1. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14255 dc483132-0cff-0310-8789-dd5450dbe970
* move getsockname calls into common code from kcmd/k4cmdKen Raeburn2002-03-081-46/+33
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14254 dc483132-0cff-0310-8789-dd5450dbe970
* Use getaddrinfo. Separate out some AF-independent socket setup codeKen Raeburn2002-03-081-77/+85
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14253 dc483132-0cff-0310-8789-dd5450dbe970
* Revert getaddrinfo changes in krb5-only code from 2-10. Factor out commonKen Raeburn2002-03-081-288/+186
| | | | | | krb4 and krb5 code into separate functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14251 dc483132-0cff-0310-8789-dd5450dbe970
* Change krb5 kcmd to use getaddrinfo, and add some hooks for future ipv6Ken Raeburn2002-02-111-69/+154
| | | | | | | | | | | | | | | | | support. * defines.h: Include fake-addrinfo.h. (FAI_PREFIX): Define. (getport): Update. * kcmd.c: Include fake-addrinfo.c. (kcmd): Use getaddrinfo instead of gethostbyname, but only get AF_INET addresses for now. (k4cmd): Update argument list to getport. (getport): Accept new argument, pointer to address family to use. If zero, try inet6 and then inet. * krshd.c (doit): Update argument list to getport. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14140 dc483132-0cff-0310-8789-dd5450dbe970
* * krcp.c, krlogin.c, krlogind.c, krsh.c, krshd.c, login.c,Ezra Peisach2001-12-061-23/+28
| | | | | | | | | | | | | | setenv.c, v4rcp.c: Signed v.s unsigned int cleanup. * defines.h: rcmd_stream_{read,write} take size_t as length argument. * kcmd.c: Use GETSOCKNAME_ARG3_TYPE instead of assuming int. input and output handler take size_t as length argument instead of int. Other signed vs. unsigned fixes. * configure.in: Add KRB5_GETSOCKNAME_ARGS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14050 dc483132-0cff-0310-8789-dd5450dbe970
* 2001-11-06 Sam Hartman <hartmans@mit.edu>Sam Hartman2001-11-071-19/+68
| | | | | | | | * kcmd.c: Define storage for our key usages (rcmd_stream_init_krb5): Support c_init_state for non-des non-des3 enctypes (v5_des_write v5_des_read): support variable keyusage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13965 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c: Get rid of prototypes for krb5_write_message(),Ezra Peisach2001-06-201-6/+0
| | | | | | krb5_net_write(), and krb5_net_read(). They are in krb5.h now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13422 dc483132-0cff-0310-8789-dd5450dbe970
* * login.c: Add braces around initializers. Cleanup assignments inEzra Peisach2001-06-011-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | conditionals. Include krb524.h if KRB4_CONVERT defined. * krlogind.c (main): Cleanup unused variables. (protocol): Cleanup ambiguous if-if-else warning. * krshd.c (main): Cleanup unused variables. * krlogin.c (setsignal): Declare as void. (server_message): Cleanup unused variables. * setenv.c (setenv): Declare as returning int and clean up assignments in conditionals. * kcmd.c (kcmd, rcmd_stream_init_krb5, v5_des_read): Clean up unused variables and assignments in conditionals. * forward.c (rd_and_store_for_creds): Likewise. * krcp.c (rsource): Likewise. * v4rcp.c (answer_auth): Likewise. * krsh.c (main): Declare as retuning int. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13257 dc483132-0cff-0310-8789-dd5450dbe970
* * defines.h: Fix k4cmd prototype to match kcmd.cTom Yu2001-05-111-1/+1
| | | | | | | | * kcmd.c (k4cmd): Fix to not use a narrow type. * krlogin.c: Fix prototypes so they don't include narrow types. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13240 dc483132-0cff-0310-8789-dd5450dbe970
* * defines.h: Add prototypes for rcmd_stream_init_normal(),Ezra Peisach2001-03-121-34/+38
| | | | | | | | | | | | | | rcmd_stream_init_krb4(), strsave() and rd_and_store_for_creds() * Makefile.in: Add dependency of forward.o on defines.h * forward.c: Include defines.h for prototypes. * kcmd.c, krcp.c, krlogin.c, krlogind.c, krsh.c: Provide full prototype for local functions and move include of kerberosIV/krb.h before defines.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13077 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd): Use krb5_set_principal_realm() instead of freeing theEzra Peisach2000-10-101-5/+7
| | | | | | | | | | principals realm data and mucking with it ourselves. This way, we do not free memory allocated by the krb5 library with a possibly incorrect free, and we do not allocate memory for a krb5 structure which might be released by the krb5 library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12748 dc483132-0cff-0310-8789-dd5450dbe970
* 1.2-beta4 pullupKen Raeburn2000-06-301-48/+149
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12470 dc483132-0cff-0310-8789-dd5450dbe970
* from 1.1 branch:Ken Raeburn1999-09-011-1/+5
| | | | | | | | | | | | | | | | * krlogin.c (main): Error out if -D isn't followed by another argument. Based on patch from Brad Thompson. * krshd.c (v4_kdata, v4_ticket): Don't define if KRB5_KRB4_COMPAT is not defined. Patch from Brad Thompson. * kcmd.c (kcmd): If krb5_get_credentials returns a nonzero error code, print an error message before returning. * krlogin.c (main): If ospeed is outside of compiled-in table index range but not high enough to be a baud rate, use the highest rate in the table. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11777 dc483132-0cff-0310-8789-dd5450dbe970
* Patches from Brad Thompson for building without krb4 compatibilityKen Raeburn1999-08-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11612 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (k4cmd): Move call to krb_realmofhost() to avoid smashingTom Yu1999-02-231-5/+4
| | | | | | hp. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11213 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (kcmd): Fix up to not call sname_to_principal until afterTom Yu1999-02-231-36/+30
| | | | | | | all the addresses in hp have been iterated through to avoid smashing. [krb5-appl/516] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11211 dc483132-0cff-0310-8789-dd5450dbe970
* Temporary patch for krb5-appl/678; avoid data from stdout being mixed to stderrSam Hartman1998-12-271-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11095 dc483132-0cff-0310-8789-dd5450dbe970
* pull up 3des implementation from the marc-3des branchMarc Horowitz1998-10-301-26/+99
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11001 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c: Integrate ghudson's changes for client-side krb4Tom Yu1998-02-241-10/+625
| | | | | | | | | | | | | | | | | | | | | compatibility. [krb5-appl/483] * krcp.c: Integrate ghudson's changes for client-side krb4 compatibility. [krb5-appl/483] * krlogin.c: Integrate ghudson's changes for client-side krb4 compatibility. [krb5-appl/483] * krlogind.c: Integrate ghudson's changes for client-side krb4 compatibility. [krb5-appl/483] * krsh.c: Integrate ghudson's changes for client-side krb4 compatibility. [krb5-appl/483] * krshd.c: Integrate ghudson's changes for client-side krb4 compatibility. [krb5-appl/483] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10472 dc483132-0cff-0310-8789-dd5450dbe970
* kcmd.c (getport): Let the OS pick the best port rather than scanning.Richard Basch1997-02-191-25/+24
| | | | | | | | | | | krlogin.c: Fixed 8bit flow control (Solaris) krlogind.c: Whitespace cleanup krshd.c: No need to set lport before calling getport(&lport) Also, changed all occurrences of krb5_xfree to use something else. [kcmd.c still needs one free() fixed when a routine exists to replace the realm component] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9908 dc483132-0cff-0310-8789-dd5450dbe970
* Use free() to free realm component, until a replacement function is addedRichard Basch1997-02-191-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9907 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb5_xfree from the public interfaceRichard Basch1997-02-181-1/+1
| | | | | | | Implement krb5_free_data & krb5_free_data_contents to cleanup krb5_data structures and data contents allocated by the krb5 library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9904 dc483132-0cff-0310-8789-dd5450dbe970
* Merge V1_0_FREEZE_3 into the mainline. (Note this merge does *not*Theodore Tso1996-12-131-2/+2
| | | | | | include the doc subtree!!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9632 dc483132-0cff-0310-8789-dd5450dbe970
* * Remove rhosts support [138]Sam Hartman1996-11-021-184/+0
| | | | | | | * Remove tab3 from initial terminal settings. We don't really care about horizontal tab delays, do we? This was breaking on NetBSD. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9282 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c: don't retry (and waste 7 seconds) on ECONNREFUSED, justBarry Jaspan1996-10-211-8/+1
| | | | | | fail immediately [krb5-appl/120] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9217 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c: Cleaned up whitespace and removed commented & unused cruftRichard Basch1996-04-111-10/+6
| | | | | | | | | | | * krlogind.c, krshd.c: Allow the recvauth routine to find any key in the keytab for which the user is trying to login. The host may be known as many names. Additionally, for krlogind, clean up the error handling for bad authentication (potential null dereference and a misleading message because of the wrong authentication system being used) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7791 dc483132-0cff-0310-8789-dd5450dbe970
* * kcmd.c (ruserok): declare the function as taking const char *Richard Basch1996-03-201-2/+2
| | | | | | instead of char * (Solaris 2.5 refuses to compile it, otherwise). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7672 dc483132-0cff-0310-8789-dd5450dbe970
* Fix lint flame (added missing cast)Theodore Tso1996-02-131-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7474 dc483132-0cff-0310-8789-dd5450dbe970
* Fixes to build on Linux;Sam Hartman1996-01-271-3/+0
| | | | | | never call fcntl(F_SETOWN) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7410 dc483132-0cff-0310-8789-dd5450dbe970