From 79b74f5c90f61a0c683cd265e530d9ddb7fdc109 Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 28 Feb 2017 15:00:44 +0900 Subject: [PATCH 1/5] add true --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c6862d3..f626091 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ testdev: ## Test without dependencies installation integration_test: build install ## Run integration test @echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Integration Testing$(RESET)" - test -d /usr/lib/x86_64-linux-gnu && ln -sf /usr/lib/libnss_octopass.so.2.0 /usr/lib/x86_64-linux-gnu/libnss_octopass.so.2.0 + test -d /usr/lib/x86_64-linux-gnu && ln -sf /usr/lib/libnss_octopass.so.2.0 /usr/lib/x86_64-linux-gnu/libnss_octopass.so.2.0 || true cp octopass.conf.example /etc/octopass.conf sed -i -e 's/^passwd:.*/passwd: files octopass/g' /etc/nsswitch.conf sed -i -e 's/^shadow:.*/shadow: files octopass/g' /etc/nsswitch.conf From c116d41bd6e905506aeac31e98ecdf6d3083debe Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 28 Feb 2017 17:12:58 +0900 Subject: [PATCH 2/5] add prefix to methods --- octopass_cli.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/octopass_cli.c b/octopass_cli.c index d0ee99a..fb3b10d 100644 --- a/octopass_cli.c +++ b/octopass_cli.c @@ -54,7 +54,7 @@ void help(void) printf("\n"); } -int public_keys_unlocked(char *name) +int octopass_public_keys_unlocked(char *name) { struct config con; octopass_config_loading(&con, OCTOPASS_CONFIG_FILE); @@ -80,15 +80,15 @@ int public_keys_unlocked(char *name) return 0; } -int public_keys(char *name) +int octopass_public_keys(char *name) { OCTOPASS_LOCK(); - int res = public_keys_unlocked(name); + int res = octopass_public_keys_unlocked(name); OCTOPASS_UNLOCK(); return res; } -int authentication_unlocked(int argc, char **argv) +int octopass_authentication_unlocked(int argc, char **argv) { char token[40 + 1]; fgets(token, sizeof(token), stdin); @@ -113,10 +113,10 @@ int authentication_unlocked(int argc, char **argv) return octopass_autentication_with_token(&con, user, token); } -int authentication(int argc, char **argv) +int octopass_authentication(int argc, char **argv) { OCTOPASS_LOCK(); - int res = authentication_unlocked(argc, argv); + int res = octopass_authentication_unlocked(argc, argv); OCTOPASS_UNLOCK(); return res; } @@ -182,9 +182,9 @@ int main(int argc, char **argv) // PAM if (strcmp(argv[1], "pam") == 0) { - return authentication(argc, argv); + return octopass_authentication(argc, argv); } // PUBLIC KEYS - return public_keys((char *)argv[1]); + return octopass_public_keys((char *)argv[1]); } From 410f5c888f022ad8876625293cac85e46e248e1e Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 28 Feb 2017 17:25:33 +0900 Subject: [PATCH 3/5] add integration test for shared users keys --- test/integration.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/integration.sh b/test/integration.sh index 1a4fd3a..5beee08 100755 --- a/test/integration.sh +++ b/test/integration.sh @@ -97,6 +97,21 @@ function test_public_keys_user_not_on_github() { fi } +function test_shared_user_public_keys() { + sed -i -e 's/^#SharedUser/SharedUser/g' /etc/octopass.conf + + actual="$(/usr/bin/octopass admin | wc -l)" + expected="5" + + if [ "x$actual" == "x$expected" ]; then + pass "${FUNCNAME[0]}" + else + fail "${FUNCNAME[0]}" "$expected" "$actual" + fi + + sed -i -e 's/^SharedUser/#SharedUser/g' /etc/octopass.conf +} + function test_authentication() { actual="$(echo $OCTOPASS_TOKEN | /usr/bin/octopass pam linyows; echo $?)" expected="0" From 4eafdc9b910ce1e632fcbd3ec9545cbb4c5f329b Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 28 Feb 2017 17:27:30 +0900 Subject: [PATCH 4/5] typo --- octopass.conf.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octopass.conf.example b/octopass.conf.example index 9ee9e8f..211b8de 100644 --- a/octopass.conf.example +++ b/octopass.conf.example @@ -16,4 +16,4 @@ Team = "yourteam" #Syslog = false # Advanced -#SharedUser = [ "admin", "deploy" ] +#SharedUsers = [ "admin", "deploy" ] From b0bd1f88ce38ef187ebb2eba0bdda8383a36a06f Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 28 Feb 2017 17:33:13 +0900 Subject: [PATCH 5/5] bump version to 0.3.2 --- debian/changelog | 5 +++++ octopass.h | 2 +- rpm/octopass.spec | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c0407ab..814e928 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,8 @@ +octopass (0.3.2-1) xenial; urgency=medium + + * Example Typo + + -- linyows Tue, 28 Feb 2017 17:20:00 +0900 octopass (0.3.1-1) xenial; urgency=medium * Bug fixes diff --git a/octopass.h b/octopass.h index 055add4..b092484 100644 --- a/octopass.h +++ b/octopass.h @@ -34,7 +34,7 @@ #include #include -#define OCTOPASS_VERSION "0.3.1" +#define OCTOPASS_VERSION "0.3.2" #define OCTOPASS_VERSION_WITH_NAME "octopass/" OCTOPASS_VERSION #ifndef OCTOPASS_CONFIG_FILE #define OCTOPASS_CONFIG_FILE "/etc/octopass.conf" diff --git a/rpm/octopass.spec b/rpm/octopass.spec index 0589caf..084b4a5 100644 --- a/rpm/octopass.spec +++ b/rpm/octopass.spec @@ -1,6 +1,6 @@ Summary: Management linux user and authentication with the organization/team on Github. Name: octopass -Version: 0.3.1 +Version: 0.3.2 Release: 1 License: GPLv3 URL: https://github.com/linyows/octopass @@ -52,6 +52,8 @@ install -m 644 octopass.conf.example %{buildroot}%{_sysconfdir}/octopass.conf.ex /etc/octopass.conf.example %changelog +* Tue Feb 28 2017 linyows - 0.3.2-1 +- Example typo * Mon Feb 27 2017 linyows - 0.3.1-1 - Bugfixes * Sun Feb 26 2017 linyows - 0.3.0-1