From 1fd1cdf4c15d3736aad506ce1ce6e73bdb0b2c94 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 09:17:17 +0100 Subject: [PATCH 01/16] README.adoc, TODO.adoc: mention endian limitations --- README.adoc | 2 ++ TODO.adoc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.adoc b/README.adoc index 8918da8..d9ea579 100644 --- a/README.adoc +++ b/README.adoc @@ -70,6 +70,8 @@ Nsscash is licensed under AGPL version 3 or later. - github.com/BurntSushi/toml - C compiler, for `libnss_cash.so.2` +- NSS module is only supported on Little-endian systems (for now) + - HTTP(S) server to provide the passwd/group/etc. files Tested on Debian Buster, but should work on any GNU/Linux system. With diff --git a/TODO.adoc b/TODO.adoc index d1d7d20..a51b4d1 100644 --- a/TODO.adoc +++ b/TODO.adoc @@ -1,5 +1,7 @@ = TODOs +- Support big-endian systems in NSS module; the Go-part is endian agnostic + - Currently, all files are fetched first and then updated one-by-one. This protects against partial updates if the server has issues, but won't help if the disk is full. In that case it's possible that only passwd is updated but -- 2.44.1 From a8a8f9daebe164d067d004458679dd7e7f0dc087 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 10:34:38 +0100 Subject: [PATCH 02/16] nsscash: main_test: create state file in sub-directory This is the proper way to test what happens when this directory is not writable. The previous solution was hacky. --- main_test.go | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/main_test.go b/main_test.go index 181930f..31c9e50 100644 --- a/main_test.go +++ b/main_test.go @@ -25,6 +25,7 @@ import ( "net/http" "net/http/httptest" "os" + "path/filepath" "reflect" "runtime" "strings" @@ -34,7 +35,7 @@ import ( const ( configPath = "testdata/config.toml" - statePath = "testdata/state.json" + statePath = "testdata/var/state.json" passwdPath = "testdata/passwd.nsscash" plainPath = "testdata/plain" groupPath = "testdata/group.nsscash" @@ -269,6 +270,13 @@ func runMainTest(t *testing.T, f func(args), tls *tls.Config) { // Remove the file at the end of this test run, if it // was created defer os.Remove(p) + + dir := filepath.Dir(p) + err = os.MkdirAll(dir, 0755) + if err != nil { + t.Fatal(err) + } + defer os.Remove(dir) // remove empty directories } var handler func(http.ResponseWriter, *http.Request) @@ -710,23 +718,27 @@ func fetchStateCannotWrite(a args) { mustHaveHash(t, groupPath, "da39a3ee5e6b4b0d3255bfef95601890afd80709") *a.handler = func(w http.ResponseWriter, r *http.Request) { - // To prevent mainFetch() from trying to update groupPath - // which will also fail - w.WriteHeader(http.StatusNotModified) + if r.URL.Path != "/group" { + return + } + + fmt.Fprintln(w, "root:x:0:") + fmt.Fprintln(w, "daemon:x:1:andariel,duriel,mephisto,diablo,baal") } - err := os.Chmod("testdata", 0500) + err := os.Chmod(filepath.Dir(statePath), 0500) if err != nil { t.Fatal(err) } - defer os.Chmod("testdata", 0755) + defer os.Chmod(filepath.Dir(statePath), 0755) err = mainFetch(configPath) mustBeErrorWithSubstring(t, err, "permission denied") mustNotExist(t, statePath, passwdPath, plainPath) - mustBeOld(t, groupPath) + mustBeNew(t, groupPath) + mustHaveHash(t, groupPath, "8c27a8403278ba2e392b86d98d4dff1fdefcafdd") } func fetchCannotDeploy(a args) { -- 2.44.1 From e9cde5247dbdf34b9648fa7e755564d74cff8a64 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 11:04:11 +0100 Subject: [PATCH 03/16] Add build manifests for build.sr.ht Also add ci/run as helper script --- .builds/README.adoc | 3 +++ .builds/debian-sid.yml | 11 +++++++++++ .builds/debian-stable.yml | 11 +++++++++++ .builds/debian-testing.yml | 11 +++++++++++ ci/run | 16 ++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 .builds/README.adoc create mode 100644 .builds/debian-sid.yml create mode 100644 .builds/debian-stable.yml create mode 100644 .builds/debian-testing.yml create mode 100755 ci/run diff --git a/.builds/README.adoc b/.builds/README.adoc new file mode 100644 index 0000000..45f276e --- /dev/null +++ b/.builds/README.adoc @@ -0,0 +1,3 @@ += README + +Build manifests for build.sr.ht to test on multiple platforms diff --git a/.builds/debian-sid.yml b/.builds/debian-sid.yml new file mode 100644 index 0000000..18474bd --- /dev/null +++ b/.builds/debian-sid.yml @@ -0,0 +1,11 @@ +image: debian/sid +packages: + - build-essential + - clang + - git + - golang + - golang-golang-x-tools +tasks: + - all: | + cd nsscash + ./ci/run diff --git a/.builds/debian-stable.yml b/.builds/debian-stable.yml new file mode 100644 index 0000000..8f2eb95 --- /dev/null +++ b/.builds/debian-stable.yml @@ -0,0 +1,11 @@ +image: debian/stable +packages: + - build-essential + - clang + - git + - golang + - golang-golang-x-tools +tasks: + - all: | + cd nsscash + ./ci/run diff --git a/.builds/debian-testing.yml b/.builds/debian-testing.yml new file mode 100644 index 0000000..052b5e1 --- /dev/null +++ b/.builds/debian-testing.yml @@ -0,0 +1,11 @@ +image: debian/testing +packages: + - build-essential + - clang + - git + - golang + - golang-golang-x-tools +tasks: + - all: | + cd nsscash + ./ci/run diff --git a/ci/run b/ci/run new file mode 100755 index 0000000..7217067 --- /dev/null +++ b/ci/run @@ -0,0 +1,16 @@ +#!/bin/sh + +set -eu +set -x + + +make +make test + +test -z "$(git clean -nd)" # any untracked files left? +make clean +test -z "$(git clean -ndx)" # any unignored files left? + +# Build with clang +make CC=clang +make test CC=clang -- 2.44.1 From 4403833dcfc3d296dd9664b1752f722e5f64a275 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 11:22:07 +0100 Subject: [PATCH 04/16] .gitlab-ci.yml: use ci/run and switch to GOPATH-less build The ca-certificates package is required for connections to proxy.golang.org --- .gitlab-ci.yml | 12 ++---------- ci/run | 13 +++++++++---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6442ec4..c43c983 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,22 +1,14 @@ .template-docker: &template-docker before_script: - apt-get update - - apt-get install --no-install-recommends --yes golang golang-golang-x-tools golang-github-pkg-errors-dev golang-github-burntsushi-toml-dev build-essential clang git + - apt-get install --no-install-recommends --yes golang golang-golang-x-tools build-essential clang git ca-certificates script: - - 'test -z "$GOPATH" && export GOPATH=/usr/share/gocode' # Run as user nobody so CAP_DAC_OVERRIDE is dropped and the tests can # chmod a file 0000 to force "permission denied" errors. - export HOME=/tmp # writable by nobody - chown -R nobody . # Empty TEST_* as -fsanitize doesn't work in a Docker container - - runuser -p -u nobody -- make TEST_CFLAGS= TEST_LDFLAGS= - - runuser -p -u nobody -- make test TEST_CFLAGS= TEST_LDFLAGS= - - 'test -z "$(git clean -nd)"' # any untracked files left? - - runuser -p -u nobody -- make clean - - 'test -z "$(git clean -ndx)"' # any unignored files left? - # Build with clang - - runuser -p -u nobody -- make CC=clang TEST_CFLAGS= TEST_LDFLAGS= - - runuser -p -u nobody -- make test CC=clang TEST_CFLAGS= TEST_LDFLAGS= + - runuser -p -u nobody -- ./ci/run TEST_CFLAGS= TEST_LDFLAGS= debian-stable: <<: *template-docker diff --git a/ci/run b/ci/run index 7217067..d4bd6f5 100755 --- a/ci/run +++ b/ci/run @@ -4,13 +4,18 @@ set -eu set -x -make -make test +flags= +if test $# -ne 0; then + flags="$*" +fi + +make $flags +make test $flags test -z "$(git clean -nd)" # any untracked files left? make clean test -z "$(git clean -ndx)" # any unignored files left? # Build with clang -make CC=clang -make test CC=clang +make CC=clang $flags +make test CC=clang $flags -- 2.44.1 From 5f90bfd1ae2fb737d14532d74d93e3f1c1763f99 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 11:19:33 +0100 Subject: [PATCH 05/16] nsscash: guard against unexpected 304 A 304 (status not modified) from the server was always considered a non-error even if we did not send a If-Modified-Since. This could hide errors for buggy servers. --- file.go | 5 +++++ main_test.go | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/file.go b/file.go index e06a9bc..5b8fffe 100644 --- a/file.go +++ b/file.go @@ -89,12 +89,17 @@ func fetchFile(file *File, state *State) error { t = zero // force download } + oldT := t status, body, err := fetchIfModified(file.Url, file.Username, file.Password, file.CA, &t) if err != nil { return err } if status == http.StatusNotModified { + if oldT.IsZero() { + return fmt.Errorf("status code 304 " + + "but did not send If-Modified-Since") + } log.Printf("%q -> %q: not modified", file.Url, file.Path) return nil } diff --git a/main_test.go b/main_test.go index 31c9e50..c4afa79 100644 --- a/main_test.go +++ b/main_test.go @@ -198,6 +198,7 @@ func TestMainFetch(t *testing.T) { // Perform most tests with passwd for simplicity fetchPasswdCacheFileDoesNotExist, fetchPasswd404, + fetchPasswdUnexpected304, fetchPasswdEmpty, fetchPasswdInvalid, fetchPasswdLimits, @@ -329,6 +330,24 @@ func fetchPasswd404(a args) { mustBeOld(a.t, passwdPath) } +func fetchPasswdUnexpected304(a args) { + t := a.t + mustWritePasswdConfig(t, a.url) + mustCreate(t, passwdPath) + + *a.handler = func(w http.ResponseWriter, r *http.Request) { + // 304 + w.WriteHeader(http.StatusNotModified) + } + + err := mainFetch(configPath) + mustBeErrorWithSubstring(t, err, + "status code 304 but did not send If-Modified-Since") + + mustNotExist(t, statePath, plainPath, groupPath) + mustBeOld(a.t, passwdPath) +} + func fetchPasswdEmpty(a args) { t := a.t mustWritePasswdConfig(t, a.url) -- 2.44.1 From 3e00cb77e22a3bac5821cac1b3610e54eff42494 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 11:37:40 +0100 Subject: [PATCH 06/16] README.adoc: reorder requirements --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index d9ea579..b379d83 100644 --- a/README.adoc +++ b/README.adoc @@ -70,10 +70,10 @@ Nsscash is licensed under AGPL version 3 or later. - github.com/BurntSushi/toml - C compiler, for `libnss_cash.so.2` -- NSS module is only supported on Little-endian systems (for now) - - HTTP(S) server to provide the passwd/group/etc. files +- NSS module is only supported on Little-endian systems (for now) + Tested on Debian Buster, but should work on any GNU/Linux system. With adaptations to the NSS module it should work on any UNIX-like system which uses NSS. -- 2.44.1 From 65ff7f7d8105b835ff2aee388b2e5c7dc01e9775 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 11:38:11 +0100 Subject: [PATCH 07/16] README.adoc: fix asciidoc syntax Lists must be separated by an empty line --- README.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.adoc b/README.adoc index b379d83..a434103 100644 --- a/README.adoc +++ b/README.adoc @@ -21,6 +21,7 @@ Nsscash can also be used separately from the NSS module to deploy arbitrary files to many hosts and keep them up-to-date. Nsscash is very careful when deploying the changes: + - All files are updated using the standard "write to temporary file", "sync", "rename" steps which is atomic on UNIX file systems. The indices are stored in the same file preventing stale data during the update. @@ -41,6 +42,7 @@ Nsscash is very careful when deploying the changes: and verified on each `nsscash` run. The passwd/group files have the following size restrictions: + - maximum number of entries: '2^64-1' (uint64_t) - maximum passwd entry size: 65543 bytes (including newline) - maximum group entry size: 65535 bytes (including newline, only one member) -- 2.44.1 From 8a4d54349dc16a19c829e1a9d48fee2c0ea09a0c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:48:59 +0100 Subject: [PATCH 08/16] testdata: rename README to README.adoc --- testdata/{README => README.adoc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename testdata/{README => README.adoc} (100%) diff --git a/testdata/README b/testdata/README.adoc similarity index 100% rename from testdata/README rename to testdata/README.adoc -- 2.44.1 From 271a54506b9931ca647f065d3b686b1932b3600b Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:50:10 +0100 Subject: [PATCH 09/16] nsscash: fix typos in comments --- group.go | 2 +- main_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/group.go b/group.go index 66da8f0..4741171 100644 --- a/group.go +++ b/group.go @@ -194,7 +194,7 @@ func SerializeGroups(w io.Writer, grs []Group) error { tmp := make([]byte, 8) // Create index "sorted" in input order, used when iterating over all - // passwd entries (getgrent_r); keeping the original order makes + // group entries (getgrent_r); keeping the original order makes // debugging easier var indexOrig bytes.Buffer for _, g := range grs { diff --git a/main_test.go b/main_test.go index c4afa79..4e9a83b 100644 --- a/main_test.go +++ b/main_test.go @@ -156,8 +156,8 @@ func mustMakeOld(t *testing.T, paths ...string) { } } -// mustMakeOld verifies that all paths have a modification time in the past, -// as set by mustMakeOld(). +// mustBeOld verifies that all paths have a modification time in the past, as +// set by mustMakeOld. func mustBeOld(t *testing.T, paths ...string) { for _, p := range paths { i, err := os.Stat(p) -- 2.44.1 From 886b911524a2f14bd7fc76e5a7478e0cfb2fc14d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:50:27 +0100 Subject: [PATCH 10/16] nsscash: main_test: use existing t variable instead of a.t t is set at the beginning of each function. --- main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_test.go b/main_test.go index 4e9a83b..a5c488e 100644 --- a/main_test.go +++ b/main_test.go @@ -327,7 +327,7 @@ func fetchPasswd404(a args) { "status code 404") mustNotExist(t, statePath, plainPath, groupPath) - mustBeOld(a.t, passwdPath) + mustBeOld(t, passwdPath) } func fetchPasswdUnexpected304(a args) { @@ -345,7 +345,7 @@ func fetchPasswdUnexpected304(a args) { "status code 304 but did not send If-Modified-Since") mustNotExist(t, statePath, plainPath, groupPath) - mustBeOld(a.t, passwdPath) + mustBeOld(t, passwdPath) } func fetchPasswdEmpty(a args) { -- 2.44.1 From 999fa3508eab3bba561202b91c520aaa5893bf11 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:51:08 +0100 Subject: [PATCH 11/16] nsscash: main_test: add missing check for statePath --- main_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main_test.go b/main_test.go index a5c488e..145abe9 100644 --- a/main_test.go +++ b/main_test.go @@ -715,6 +715,7 @@ func fetchStateCannotRead(a args) { statePath+": permission denied") mustNotExist(t, passwdPath, plainPath, groupPath) + mustBeOld(t, statePath) } func fetchStateInvalid(a args) { -- 2.44.1 From 2f775b91b1871aa2eacdb19ead52f8801ba75b29 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:52:49 +0100 Subject: [PATCH 12/16] nsscash: main_test: use time.Since() --- main_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main_test.go b/main_test.go index 145abe9..ffb176f 100644 --- a/main_test.go +++ b/main_test.go @@ -166,8 +166,7 @@ func mustBeOld(t *testing.T, paths ...string) { } mtime := i.ModTime() - now := time.Now() - if now.Sub(mtime) < time.Hour { + if time.Since(mtime) < time.Hour { t.Errorf("%q was recently modified", p) } } @@ -182,8 +181,7 @@ func mustBeNew(t *testing.T, paths ...string) { } mtime := i.ModTime() - now := time.Now() - if now.Sub(mtime) > time.Hour { + if time.Since(mtime) > time.Hour { t.Errorf("%q was not recently modified", p) } } -- 2.44.1 From d946c291618d93e4ab4ad898c1ae317fbe2256e3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 15:53:16 +0100 Subject: [PATCH 13/16] nsscash: main_test: use configPath variable --- main_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main_test.go b/main_test.go index ffb176f..3584537 100644 --- a/main_test.go +++ b/main_test.go @@ -888,7 +888,7 @@ password = "%[6]s" err = mainFetch(configPath) mustBeErrorWithSubstring(t, err, "file[0].username/passsword in use and unsafe permissions "+ - "-rw-r--r-- on \"testdata/config.toml\"") + "-rw-r--r-- on \""+configPath+"\"") mustNotExist(t, statePath, groupPath, plainPath) mustBeOld(t, passwdPath) -- 2.44.1 From bbb45dc081444bc108edafaa6c32bb5329444ae4 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 15 Dec 2019 22:48:33 +0100 Subject: [PATCH 14/16] nsscash: main_test: add disabled test case for todo --- main_test.go | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/main_test.go b/main_test.go index 3584537..ca03fc8 100644 --- a/main_test.go +++ b/main_test.go @@ -216,6 +216,7 @@ func TestMainFetch(t *testing.T) { fetchCannotDeploy, fetchSecondFetchFails, fetchBasicAuth, + // TODO: fetchCannotDeployMultiple, } // HTTP tests @@ -966,3 +967,52 @@ ca = "%[4]s" mustNotExist(t, statePath, plainPath, groupPath) mustBeOld(t, passwdPath) } + +/* +TODO: implement code for this test + +func fetchCannotDeployMultiple(a args) { + t := a.t + newPlainDir := "testdata/x" + newPlainPath := newPlainDir + "/plain" + mustWriteConfig(t, fmt.Sprintf(` +statepath = "%[1]s" + +[[file]] +type = "group" +url = "%[2]s/group" +path = "%[3]s" + +[[file]] +type = "plain" +url = "%[2]s/plain" +path = "%[4]s" +`, statePath, a.url, groupPath, newPlainPath)) + os.Mkdir(newPlainDir, 0755) + defer os.RemoveAll(newPlainDir) + mustCreate(t, groupPath) + mustCreate(t, newPlainPath) + mustHaveHash(t, groupPath, "da39a3ee5e6b4b0d3255bfef95601890afd80709") + + *a.handler = func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/group" { + fmt.Fprintln(w, "root:x:0:") + } + if r.URL.Path == "/plain" { + fmt.Fprintln(w, "some file") + } + } + + err := os.Chmod(newPlainDir, 0500) + if err != nil { + t.Fatal(err) + } + + err = mainFetch(configPath) + mustBeErrorWithSubstring(t, err, + "permission denied") + + mustNotExist(t, statePath, passwdPath, plainPath) + mustBeOld(t, groupPath, newPlainPath) +} +*/ -- 2.44.1 From 833348f2a29247f955e53302e0c1c323190893a7 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Dec 2019 11:21:35 +0100 Subject: [PATCH 15/16] README.adoc: fix syntax for nested list --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index a434103..3cc5295 100644 --- a/README.adoc +++ b/README.adoc @@ -68,8 +68,8 @@ Nsscash is licensed under AGPL version 3 or later. == REQUIREMENTS - Go, for `nsscash` - - github.com/pkg/errors - - github.com/BurntSushi/toml + * github.com/pkg/errors + * github.com/BurntSushi/toml - C compiler, for `libnss_cash.so.2` - HTTP(S) server to provide the passwd/group/etc. files -- 2.44.1 From 1002c514a8530bb6608c556b4446e853be390917 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 18 Feb 2020 06:01:47 +0100 Subject: [PATCH 16/16] Update copyright years --- README.adoc | 2 +- config.go | 2 +- fetch.go | 2 +- file.go | 2 +- file_test.go | 2 +- group.go | 2 +- group_test.go | 2 +- main.go | 2 +- main_test.go | 2 +- misc.go | 2 +- nss/cash_nss.h | 2 +- nss/file.c | 2 +- nss/file.h | 2 +- nss/gr.c | 2 +- nss/pw.c | 2 +- nss/search.c | 2 +- nss/search.h | 2 +- nss/tests/gr.c | 2 +- nss/tests/pw.c | 2 +- passwd.go | 2 +- passwd_test.go | 2 +- state.go | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.adoc b/README.adoc index 3cc5295..93deb40 100644 --- a/README.adoc +++ b/README.adoc @@ -188,7 +188,7 @@ Written by Simon Ruderich . This program is licensed under AGPL version 3 or later. -Copyright (C) 2019 Simon Ruderich +Copyright (C) 2019-2020 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/config.go b/config.go index 01bbff8..ea33d5b 100644 --- a/config.go +++ b/config.go @@ -1,6 +1,6 @@ // Configuration file parsing and validation -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/fetch.go b/fetch.go index 16e8d90..d5cce10 100644 --- a/fetch.go +++ b/fetch.go @@ -1,6 +1,6 @@ // Download files via HTTP with support for If-Modified-Since -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/file.go b/file.go index 5b8fffe..c7e5809 100644 --- a/file.go +++ b/file.go @@ -1,6 +1,6 @@ // Download and write files atomically to the file system -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/file_test.go b/file_test.go index 72fa58c..576e02a 100644 --- a/file_test.go +++ b/file_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/group.go b/group.go index 4741171..0940c2f 100644 --- a/group.go +++ b/group.go @@ -1,6 +1,6 @@ // Parse /etc/group files and serialize them -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/group_test.go b/group_test.go index d5509b9..047c6de 100644 --- a/group_test.go +++ b/group_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/main.go b/main.go index 5455dfe..31ef049 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ // Main file for nsscash -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/main_test.go b/main_test.go index ca03fc8..151e188 100644 --- a/main_test.go +++ b/main_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/misc.go b/misc.go index 2e60507..947bb51 100644 --- a/misc.go +++ b/misc.go @@ -1,6 +1,6 @@ // Miscellaneous functions -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/nss/cash_nss.h b/nss/cash_nss.h index 741d411..41eae37 100644 --- a/nss/cash_nss.h +++ b/nss/cash_nss.h @@ -1,7 +1,7 @@ /* * NSS function definitions provided by this NSS module * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/file.c b/nss/file.c index ba6c481..5dba688 100644 --- a/nss/file.c +++ b/nss/file.c @@ -1,7 +1,7 @@ /* * Load and unload nsscash files * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/file.h b/nss/file.h index fb94a8f..ac04ce3 100644 --- a/nss/file.h +++ b/nss/file.h @@ -1,7 +1,7 @@ /* * Load and unload nsscash files (header) * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/gr.c b/nss/gr.c index 544cc9d..e0e8873 100644 --- a/nss/gr.c +++ b/nss/gr.c @@ -1,7 +1,7 @@ /* * Handle group entries via struct group * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/pw.c b/nss/pw.c index 78a252f..fc2128e 100644 --- a/nss/pw.c +++ b/nss/pw.c @@ -1,7 +1,7 @@ /* * Handle passwd entries via struct passwd * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/search.c b/nss/search.c index 62e8f43..44e29d7 100644 --- a/nss/search.c +++ b/nss/search.c @@ -1,7 +1,7 @@ /* * Search entries in nsscash files by using indices and binary search * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/search.h b/nss/search.h index 3812791..6bd3c19 100644 --- a/nss/search.h +++ b/nss/search.h @@ -1,7 +1,7 @@ /* * Search entries in nsscash files by using indices and binary search (header) * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/tests/gr.c b/nss/tests/gr.c index c96cb03..a54e9e2 100644 --- a/nss/tests/gr.c +++ b/nss/tests/gr.c @@ -1,7 +1,7 @@ /* * Tests for the NSS cash module * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/nss/tests/pw.c b/nss/tests/pw.c index cf4f92d..88260c4 100644 --- a/nss/tests/pw.c +++ b/nss/tests/pw.c @@ -1,7 +1,7 @@ /* * Tests for the NSS cash module * - * Copyright (C) 2019 Simon Ruderich + * Copyright (C) 2019-2020 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/passwd.go b/passwd.go index 7364639..9b4b78c 100644 --- a/passwd.go +++ b/passwd.go @@ -1,6 +1,6 @@ // Parse /etc/passwd files and serialize them -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/passwd_test.go b/passwd_test.go index 34ba21d..b68cffe 100644 --- a/passwd_test.go +++ b/passwd_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by diff --git a/state.go b/state.go index 9b67d9a..4b31241 100644 --- a/state.go +++ b/state.go @@ -1,6 +1,6 @@ // Read and write the state file used to keep data over multiple runs -// Copyright (C) 2019 Simon Ruderich +// Copyright (C) 2019-2020 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by -- 2.44.1