summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update NEWS and version ready for 1.3HEADmasterDaniel Silverstone2019-01-191-1/+1
|
* Update copyright dates etc ready for 1.2Daniel Silverstone2019-01-194-4/+4
|
* Preserve ssh authorized_keys suffix/prefixDaniel Silverstone2019-01-191-2/+31
|
* Ensure that config show will fail if none of the keys supplied are foundDaniel Silverstone2019-01-191-0/+9
|
* Fix issue where 'as' wasn't resetting keytag in _prep()Daniel Silverstone2019-01-191-0/+1
|
* admincommand: Fix 'as' to better hide bad usernamesDaniel Silverstone2019-01-191-5/+21
| | | | | | | | | | | Sometimes commands in their `_prep()` might need to assume the user they're running as does actually exist. Since there's only one user name guaranteed to exist (gitano-bypass) ensure that when `as` runs against a user which doesn't exist, we run the original command's `_prep()` against that user so that we don't leak the non-existence of a username via a crash/traceback. This fixes Debian bug #876078
* LACE: Correct a bug in iterating table form valuesDaniel Silverstone2018-06-061-1/+4
| | | | | | | When a tabular value is given to Lace, we assume that it is in 'set' form (i.e. the keys are the important thing to match against) and as such, we need to ensure we skip non-string keys since tables might be dual form (set, and list).
* Use new ssh type testPhillip Smyth2017-10-131-4/+1
|
* Use new ssh type testPhillip Smyth2017-10-131-4/+2
|
* Added ssh_type_is_invalid functionPhillip Smyth2017-10-131-0/+13
|
* Add config list example to config helpRichard Ipsum2017-08-061-0/+6
| | | | And a newline.
* Bump version to 1.2.0 ready for development cycleDaniel Silverstone2017-08-031-1/+1
|
* Move post-push dangling-HEAD check to post-receive hookRichard Maw2017-08-011-8/+1
| | | | | | | | | | | The smart-http interface starts http-backend which calls receive-pack. Unfortunately we were performing the dangling-HEAD check after calling receive-pack ourselves, so when using smart-http we weren't performing the check. By moving this into the post-receive hook the check can be performed in smart-http too.
* Use new lock/unlock functions to guard htpasswd updatesdsilvers/sysbranch-fixesDaniel Silverstone2017-07-312-1/+4
|
* Add lock and unlock utility functionsDaniel Silverstone2017-07-311-0/+18
|
* Update htpasswd when user names changeDaniel Silverstone2017-07-311-0/+32
| | | | | | When deleting or renaming users, the htpasswd file needs updating so that we don't leave stale or incorrectly assigned user credentials around.
* Fix an oopsie from the mergeDaniel Silverstone2017-07-091-3/+0
|
* Merge branch 'dsilvers/hooks'Daniel Silverstone2017-07-083-1/+161
|\
| * Add pre-authorisation commandline hookDaniel Silverstone2017-07-021-0/+18
| | | | | | | | | | | | | | | | This hook is permitted to adjust the command line before it is passed on to command authorisation. This is needed for a number of use-cases requested around permitting a plugin to provide domain specific command line shapes without needing to adjust Gitano's core command structures.
| * Export the gitano.hooks APIDaniel Silverstone2017-06-171-1/+3
| | | | | | | | | | | | | | This adjusts the core gitano module to export gitano.hooks. In addition, we bump the API version to 1.1.0 since we're adding in a new API (hooks)
| * Add hook names to hooks APIDaniel Silverstone2017-06-171-0/+36
| | | | | | | | | | | | This adds hook names to the gitano.hooks API which is there to explain what the hook functions should do, and to provide a logical name for hooks, rather than expecting people to not typo strings.
| * Add gitano.hooks module with basic functionalityDaniel Silverstone2017-06-171-0/+101
| | | | | | | | | | | | | | | | The gitano.hooks module is intended to support a variety of hooks, both those defined by Gitano itself; and those added by plugins. Hooks are meant as a means to propagate information and also to permit alteration of arguments before work is done.
* | Re-own repos when renaming usersDaniel Silverstone2017-07-081-0/+14
| |
* | Reduce verbosity of pattern definitionsrichardmaw/unified-patternsRichard Maw2017-07-081-68/+27
| | | | | | | | | | | | | | Having both local definitions for each exported pattern and the export in the package was not helpful, and in fact caused accidents while developing where the package was filled with undefined variables.
* | Export patterns as API and consume them in executablesRichard Maw2017-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | Gitano's executables, in addition to being required for operation, are intended to be examples of how to use the gitano library, so rather than importing with require "gitano.patterns", gitano should be imported and use gitano.patterns. No changes to imports are made inside lib/gitano/ because this would cause an import loop.
* | Centralise patterns into a single moduleRichard Maw2017-06-1710-59/+180
|/ | | | | | | This has moved every pattern that wasn't obviously just for string manipulation and has in the process of doing so reworked some logic so that fewer distinct patterns are used, and the repository path normalisation has been unified.
* ensures server-info files exist on new reposdsilvers/update-on-createDaniel Silverstone2017-04-081-0/+5
| | | | | This change ensures that the server-info files are created at the point that a repository is realised.
* adds support for coverage testingDaniel Silverstone2017-03-041-0/+52
|
* fixes HTTP action POST content-type defaultingDaniel Silverstone2017-02-121-1/+1
| | | | | | Correct the default expression for content-type in POST actions from application/octet-stream to "application/octet-stream" which is less likely to cause a nil/nil-nil type evaluation.
* Add a version number system to GitanoDaniel Silverstone2017-01-152-0/+67
|
* Copyright cleanupsDaniel Silverstone2017-01-1516-15/+435
|
* keyring: Make keyring name variable consistently namedRichard Maw2017-01-081-1/+1
| | | | | It was named keyring when listing keyrings, but all the other keyring commands called it keyringname.
* testing: Disable variable dump by defaultRichard Maw2017-01-081-0/+2
| | | | | | | | | It's a security risk to allow gitano to write to an arbitrary path based on the value of an environment variable. It's low risk since by default gitano is run directly by the http or ssh server, which do not set variables by default, but it's trivial enough to leave it commented out.
* testing: Add a way to extract variables from the test suiteRichard Maw2017-01-081-0/+23
|
* Remove /{prefix,suffix} matchesRichard Maw2017-01-021-4/+0
| | | | `prefix` and `suffix` operators exist, and make this redundant.
* Remove broken match type aliasRichard Maw2017-01-021-3/+0
|
* cleanups: Whitespace and indentation and untabifyDaniel Silverstone2017-01-0215-1102/+1099
| | | | | | This is a massive unpleasant commit which does whitespace cleanup and fixes indentation (including untabifying). Hopefully we won't need to do this ever again, if we keep an eye on commits.
* Ensure that if there is no : then readme gets one, for safetyDaniel Silverstone2017-01-021-0/+3
|
* Remove markdown.luaDaniel Silverstone2017-01-023-1036/+0
|
* Remove README support from repositoryDaniel Silverstone2017-01-021-53/+0
|
* Remove readme command, and (somewhat) empty testDaniel Silverstone2017-01-021-71/+0
|
* Fix updating htpasswd filesRichard Maw2016-12-181-2/+2
| | | | | | | | | | | | | | | | This would previously break because if it's updating htpasswd it passes an empty argument rather than no argument. Rather than stop it passing the empty argument this patch instead passes -i flags unconditionally and merges the flags argument. This is to make it use the batch-input code-path which doesn't attempt to use a tty for its input, since it caused issues in the test suite which fakes the server. This requires changing it to only pass the password as input once.
* Honour suppression of error messages from running comandsDaniel Silverstone2016-12-131-5/+7
|
* Support suppression of error messages from commandsDaniel Silverstone2016-12-131-2/+6
|
* Explain error codes when a command failsDaniel Silverstone2016-12-131-1/+1
|
* Fix broken match by moving dash to end of setBen Brown2016-12-111-1/+1
| | | | The '-' fails to represent a range between '.' and '_'.
* If you try to sshkey del the key you're using, you get told you can'tDaniel Silverstone2016-12-031-0/+4
|
* Finalise lace context simple matchesDaniel Silverstone2016-12-031-0/+4
|
* No BANANA todayDaniel Silverstone2016-12-031-1/+0
|
* Ensure gitano-auth passes the keytag through and that ↵Daniel Silverstone2016-12-031-2/+1
| | | | gitano.auth.is_authorized uses it