aboutsummaryrefslogtreecommitdiff
path: root/client/wallet.c
AgeCommit message (Collapse)Author
2020-05-17Reformat all C code with clang-format-10Russ Allbery
2020-05-17Fix warnings from Clang's analyzerRuss Allbery
Suppress a warning about not declaring a function noreturn that's only noreturn in some configurations. Add an assert to unconfuse the static analyzer about a default value for a struct.
2018-06-03Add SPDX-License-Identifier headersRuss Allbery
Add SPDX-License-Identifier headers to all substantial source files. Collapse copyright years. Add some Emacs configuration for files where the copyright notice is at the end. Add a test that every file has SPDX-License-Identifier.
2018-05-28Pass realm to krb5_appdefault_* functionsRuss Allbery
When getting configuration values from krb5.conf, pass the default local realm into the Kerberos appdefault functions. This will produce more correct results with krb5.conf files that specify wallet configuration for multiple realms.
2018-05-27Update to rra-c-util 7.2 and C TAP Harness 4.3Russ Allbery
Update to rra-c-util 7.2: * Improve configure output for krb5-config testing. * Define UINT32_MAX for systems that don't have it. * Add SPDX-License-Identifier headers to all substantial source files. * Fix new warnings from GCC 7 and Clang warnings. * Require Test::Strict 0.25 or later to run those tests. * Fix off-by-one error in return-value checks for snprintf. * Use Autoconf to probe for supported warning flags. * Fix running module-version-t -u with current versions of Perl. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD. Update to C TAP Harness 4.3: * Add support for valgrind and libtool in test lists. * Report test failures as left and right, not wanted and expected. * Fix string comparisons with NULL pointers and the string "(null)". * Add SPDX-License-Identifier headers to all substantial source files. * Avoid zero-length realloc allocations in breallocarray. * Fix new warnings from GCC 7 and Clang warnings. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD.
2014-07-15Use xcalloc instead of xmalloc with calculated sizesRuss Allbery
Ensure we don't have integer overflow when allocating the array of struct iovec for store commands. Change-Id: I0777ca8ef050b9773dba0c03b5e8533d3b2d5486 Reviewed-on: https://gerrit.stanford.edu/1560 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2014-04-13Change my email address to eagle@eyrie.orgRuss Allbery
Change-Id: I4c2b5d7c807d6c27dd18a3b92eef66d21287d21e Reviewed-on: https://gerrit.stanford.edu/1481 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2013-02-27Use correct form of Stanford's copyright statementRuss Allbery
Change-Id: I06dd9ecca19315179bdd34d4b301548fe7604331 Reviewed-on: https://gerrit.stanford.edu/842 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
2010-07-28Break wallet-rekey out into a separate client programRuss Allbery
Build a separate wallet-rekey client that rekeys every keytab given on the command-line. Fix some coding style issues and add internal prototypes. Build the shared source for both clients into an uninstalled library to save compilation time.
2010-07-27Finished first pass of the rekey commandJon Robertson
Cleaned up several bugs preventing the rekey command from working (bad calls to variables, matching on version of principal name already stripped of realm), and removed debugging code.
2010-07-27Adding wallet rekey capability -- work in progress, testingJon Robertson
First, testing version of wallet rekey code, committed in order to get feedback from Russ. This code will eventually take an existing keytab file, and for every principal belonging to our default realm in it, get new versions of that keytab and merge them into the file. This allows for quietly rekeying principals automatically.
2010-02-20Add portable/uio.h and include it in client/wallet.cRuss Allbery
Now that the wallet client uses struct iovec, it needs to include the relevant header file. Import the portability layer for possible future Windows support.
2010-02-20Add support in the wallet client for store of binary dataRuss Allbery
Refactor the wallet client code to use remctl_commandv and send stores with data containing nul.
2010-02-09Update util code and import Kerberos portability glueRuss Allbery
Use the Kerberos portability layer from rra-c-util 3.0 and avoid Kerberos API calls deprecated on Heimdal. Break util/util.h into separate header files and update all source files accordingly. The test suite is not yet updated. That will come in subsequent commits.
2010-02-09Use a temporary disk cache in the wallet client instead of memoryRuss Allbery
The wallet client now uses a temporary disk ticket cache when obtaining tickets with the -u option rather than an in-memory cache, allowing for a libremctl built against a different Kerberos implementation than the wallet client. This primarily helps with testing.
2009-06-09Remove Subversion Id stringsRuss Allbery
2008-04-24The wallet command-line client now reads the data for store from aRuss Allbery
file (using -f) or from standard input (if -f wasn't given) when the data isn't specified on the command line. The data still must not contain nul characters.
2008-04-24Major coding style cleanup. Updated all shared code from my otherRuss Allbery
projects. The configure option requesting AFS kaserver support (and thus building kasetkey) is now --with-kaserver instead of --with-afs. If KRB5_CONFIG was explicitly set in the environment, don't use a different krb5-config based on --with-krb4 or --with-krb5. If krb5-config isn't executable, don't use it. This allows one to force library probing by setting KRB5_CONFIG to point to a nonexistent file. Sanity-check the results of krb5-config before proceeding and error out in configure if they don't work. Stop setting Stanford-specific compile-time defaults for the wallet server and port.
2008-02-07Add new exists and autocreate wallet server interfaces. The firstRuss Allbery
states whether a given object exists and the second attempts to create the object using the default owner rules. Remove default owner handling from the create interface, which is now for administrators only. Remove server-side auto-creation of objects on get or store and instead have the client check for object existence and call autocreate if necessary. This removes confusion between default ACLs and administrative object creation for users who are also on the ADMIN ACL.
2008-01-19The wallet client now supports a -u option, saying to obtain KerberosRuss Allbery
credentials for the given user and use those for authentication rather than using an existing ticket cache.
2008-01-19When downloading a keytab to a file that already exists, merge the newRuss Allbery
keytab keys into that file rather than moving aside the old keytab and creating a new keytab with only the new keys. Also fix get handling in the client for all types other than keytabs. This isn't visible yet since the server doesn't yet support other types of objects.
2008-01-17Initialize the temporary variable when getting numbers from appdefaults.Russ Allbery
2008-01-05The wallet client can now get the server, port, principal, and remctlRuss Allbery
type from krb5.conf as well as from compile-time defaults and command-line options.
2007-10-08Add a missing close parenthesis to the wallet -h output.Russ Allbery
2007-10-07Default to a port of 0, which tells remctl to use its default.Russ Allbery
2007-10-07Use WALLET_SERVER and WALLET_PORT rather than SERVER and PORT.Russ Allbery
2007-10-05Add comprehensive license information in LICENSE and update the copyrightRuss Allbery
and license statements in all files. Make sure that some files that were missing copyright information now have them. Reference LICENSE rather than README in all notices.
2007-10-05The wallet client now automatically sets the sync attribute on a keytabRuss Allbery
object when get is called with the -S flag.
2007-10-05Refactor the remctl calls in the wallet client to share a common routine.Russ Allbery
2007-10-05Pull keytab handling in the client into a separate file for laterRuss Allbery
expansion. Use the fine-grained remctl API instead of the simple one since in some cases we'll be running multiple commands.
2007-10-05Pull the file writing code for the wallet client into a separate fileRuss Allbery
so that the srvtab and keytab management can share it. Write atomically to a new file and then link and rename to do an atomic update. Leave a backup copy of any file that's replaced.
2007-10-04Use die, warn, and xmalloc, now that we have them.Russ Allbery
2007-09-27Initial cut at srvtab support in the wallet client. This still requiresRuss Allbery
additional work and cleanup, particularly support for the sync attribute.
2007-09-01Change an instance of remctl to wallet in the -h output.Russ Allbery
2007-08-29Kill warnings. We now build with all warnings enabled.Russ Allbery
2007-08-29Add support for -f and recognize -S. Remove the special-casing of onlyRuss Allbery
get and show and pass all commands on to the server. Instead, only special-case get to write its output to a different location.
2006-08-23Make quite a bit more behavior configurable so that I can run a meaningfulRuss Allbery
test. Display show output to standard out instead of writing it to a keytab file. NULL-terminate the commands passed to the server. Don't constrain the object type to be keytab.
2006-08-17Initial very simple wallet client program.Russ Allbery