lib/error.c

Branch


Log

Author Commit Date CI Message
Josh Rickmar 91d845ad 2022-07-03T21:44:01 fix tag signing when the key file does not exist This should fail without creating any tag. Before, ssh-keygen(1) would print an error to stderr, but got would create an unsigned tag. ok op@
Josh Rickmar 4d5ee956 2022-07-02T21:27:21 create and verify tags signed by SSH keys This adds a new -s flag to 'got tag' that specifies the signer identity (for example, a key file) of the tagger. The tag object will include a signature that validates each of the tag object headers and the tag message. Verifying these signed tags requires maintaining an allowed signers file which maps signer identities (i.e. the email address of the tagger) to SSH public keys. See ssh-keygen(1) for more details of the allowed signers file. After creating this file and providing the path to it in got.conf(5) using the allowed_signers option, tags may be verified using with 'got tag -V tag_name'. The return code will be non-zero if a signature fails to verify. ok stsp@
Stefan Sperling f9d37699 2022-06-28T20:33:41 move got_opentempfd() out of lib/diff.c again ok tracey
Stefan Sperling 61af9b21 2022-06-28T11:31:11 implement support for commit coloring in got-read-pack for speed ok op, tracey
Stefan Sperling a7472cb3 2022-04-14T15:00:59 check return value of RB_INSERT; ok + memleak fix by op@
Christian Weisgerber 70cc9832 2022-03-19T14:19:19 move got_errors[] table into a single compilation unit (error.c) ok stsp
Stefan Sperling 5c02d2a5 2021-09-26T17:40:10 for portability, handle errno variations upon open(2) failure with O_NOFOLLOW Problem pointed out by naddy for FreeBSD -portable. Discussed with millert, thomas adam, and naddy.
Stefan Sperling 9a02f8b7 2020-12-21T12:59:27 switch to strerror_r(3) in error.c for thread-safety
Stefan Sperling c884fd0a 2020-12-21T12:59:27 introduce got_custom_error array to support multiple errors in flight This is still not thread-safe but at least avoids errors overwriting each other in single-threaded contexts.
Stefan Sperling 73e7eb7d 2020-12-15T23:45:34 add got_error_fmt() got_error_fmt() could eventually replace got_error_path() which has already been used to construct errors with strings that are not actually paths... ok millert@
Stefan Sperling 4cc6a5a5 2020-12-15T22:42:20 add got_error_from_errno_fmt() for more flexibility in error messages suggested by and ok millert
Stefan Sperling 16aeacf7 2020-11-26T12:54:19 use size_t for loop indices to avoid signedness warnings; from emaste@freebsd
Stefan Sperling cc483380 2019-09-01T13:08:13 fix NULL deref in got_error_from_errno via got_error_uuid (found by jasper)
Stefan Sperling 7d45c7f1 2019-05-15T07:31:58 error.c: use <limits.h> instead of <sys/param.h>
Stefan Sperling df056ada 2019-05-15T07:27:06 introduce got_error_path()
Stefan Sperling 638f9024 2019-05-13T12:40:57 rename got_error_prefix_errno() to got_error_from_errno()
joshua stein 2af4a041 2019-05-11T16:21:20 got_error_set_errno: take a char arg to pass to got_error_prefix_errno $> got rm a got: : No such file or directory becomes $> got rm a got: /path/to/a: No such file or directory
joshua stein 230a42bd 2019-05-11T13:04:38 got_error_from_errno -> got_error_prefix_errno also add got_error_prefix_errno2 and got_error_prefix_errno3 which should hopefully all be merged into a single function with variadic args (but can't alloc mem)
joshua stein 48b8b0eb 2019-05-11T10:40:57 error: introduce got_error_prefix_errno for better errno messages
joshua stein 10689f3a 2019-05-11T10:30:34 error: fix definition of got_error_from_errno
Stefan Sperling 09589288 2019-03-10T15:45:07 add got_error_uuid()
Stefan Sperling 2aa0475c 2019-02-03T17:00:40 add got_error_not_ref()
Stefan Sperling 8fa9fd14 2018-11-11T15:14:58 remove unnecessary cast
Stefan Sperling 91a3d81f 2018-11-11T13:41:46 introduce got errors with custom messages; add one for ERR_NO_OBJ
Stefan Sperling 1a76625f 2018-10-22T21:36:39 make 'tog log' use background thread and introduce global mutex
Stefan Sperling b4691ea5 2018-04-02T11:11:43 simplify got_error_from_errno()
Stefan Sperling 8fd17454 2018-03-09T23:43:59 don't forget to set error message in got_error_from_errno()
Stefan Sperling 8251fdbc 2018-01-12T23:00:06 introduce got_ferror() and use it
Stefan Sperling 72bcf0f9 2018-01-12T21:22:05 bump copyright
Stefan Sperling 6c6d6589 2018-01-12T21:21:09 use strerror_r()
Stefan Sperling f334529e 2018-01-12T21:17:22 add a conversion function from errno to got_error and use it
Stefan Sperling 2b4402a2 2017-11-05T13:48:22 only define nitems() if it is not already defined
Stefan Sperling 7b19e0f1 2017-11-05T13:35:01 add copyright
Stefan Sperling 4027f31a 2017-11-04T19:41:54 initial import; current implementation only parses the .git/HEAD ref