Skip to content

Commit

Permalink
Remove stray newline
Browse files Browse the repository at this point in the history
  • Loading branch information
mbish committed Dec 4, 2024
1 parent f4cd91e commit 69e6a78
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion login_duo/login_duo.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ do_auth(struct login_ctx *ctx, const char *cmd)
config = ctx->config ? ctx->config : DUO_CONF;
flags = 0;

duo_syslog(LOG_INFO, "Loading config file %s\n", config);
duo_syslog(LOG_INFO, "Loading config file %s", config);

duo_config_default(&cfg);

Expand Down
10 changes: 5 additions & 5 deletions tests/test_login_duo.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def test_connection_timeout(self):
preload_script=os.path.join(TESTDIR, "login_duo.py"),
timeout=10,
)
for line in result["stderr"][2:5]:
for line in result["stderr"][1:4]:
self.assertEqual(line, "Attempting connection")

self.assertRegexSomeline(
Expand Down Expand Up @@ -617,8 +617,8 @@ def test_invalid_delimiter_value_whitespace(self):
result = login_duo(
["-d", "-c", temp.name, "true"],
)
self.assertEqual(
result["stderr"][2],
self.assertRegexSomeline(
result["stderr"],
"Invalid character option length. Character fields must be 1 character long: ''",
)
self.assertRegexSomeline(
Expand All @@ -635,8 +635,8 @@ def test_invalid_pos_value(self):
result = login_duo(
["-d", "-c", temp.name, "true"],
)
self.assertEqual(
result["stderr"][2],
self.assertRegexSomeline(
result["stderr"],
"Gecos position starts at 1",
)
self.assertRegexSomeline(
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pam_duo.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,15 @@ def test_invalid_pos_value(self):
["-d", "-c", temp.name, "true"],
)
self.assertEqual(
result["stderr"][1],
result["stderr"][0],
"Gecos position starts at 1",
)
self.assertRegex(
result["stderr"][2],
result["stderr"][1],
r"Invalid pam_duo option: 'gecos_username_pos'",
)
self.assertRegex(
result["stderr"][3],
result["stderr"][2],
r"Parse error in {config}, line \d+".format(config=temp.name),
)

Expand Down

0 comments on commit 69e6a78

Please sign in to comment.