aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-07 11:01:51 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-07 11:01:51 +0100
commitea05a6160c17460f8cdde00ac35f6023e47dd6a7 (patch)
tree7654383ad9548584a8e6b39782f1e13e8f527974
parent7099005f38ff72fa5de5f245eb15077d8708efd6 (diff)
downloadlibpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.tar.gz
libpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.tar.bz2
libpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.zip
White-space clean-up.
-rw-r--r--Makefile.am.coverage10
-rw-r--r--m4/gcov.m44
-rw-r--r--src/pam-freerdp.c6
-rw-r--r--tests/mock_guest.c2
-rw-r--r--tests/mock_pam.c2
-rw-r--r--tests/test-freerdp-wrapper.cc18
6 files changed, 21 insertions, 21 deletions
diff --git a/Makefile.am.coverage b/Makefile.am.coverage
index fb97747..e134a61 100644
--- a/Makefile.am.coverage
+++ b/Makefile.am.coverage
@@ -16,16 +16,16 @@ clean-gcno:
clean-gcda:
@echo Removing old coverage results
-find -name '*.gcda' -print | xargs -r rm
-
+
coverage-html: clean-gcda
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
-
+
generate-coverage-html:
@echo Collecting coverage data
$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
-
+
clean-coverage-html: clean-gcda
-$(LCOV) --directory $(top_builddir) -z
-rm -rf coverage.info coveragereport
@@ -35,11 +35,11 @@ if HAVE_GCOVR
coverage-gcovr: clean-gcda
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr
-
+
generate-coverage-gcovr:
@echo Generating coverage GCOVR report
$(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml
-
+
clean-coverage-gcovr: clean-gcda
-rm -rf $(top_builddir)/coverage.xml
diff --git a/m4/gcov.m4 b/m4/gcov.m4
index 3163584..d243eeb 100644
--- a/m4/gcov.m4
+++ b/m4/gcov.m4
@@ -3,7 +3,7 @@
# * lcov
# * genhtml
# * gcovr
-#
+#
# Sets ac_cv_check_gcov to yes if tooling is present
# and reports the executables to the variables LCOV, GCOVR and GENHTML.
AC_DEFUN([AC_TDD_GCOV],
@@ -71,7 +71,7 @@ AC_DEFUN([AC_TDD_GCOV],
# Add the special gcc flags
COVERAGE_CFLAGS="-O0 -fprofile-arcs -ftest-coverage"
- COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
+ COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
COVERAGE_LDFLAGS="-lgcov"
# Check availability of gcovr
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index d411f56..21bff56 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -312,7 +312,7 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv
pid_t pid = fork();
if (pid == 0) {
-
+
int ret = session_socket_handler(pwdent, sessionready[1], ruser, rhost, rdomain, password);
close(sessionready[1]);
@@ -367,7 +367,7 @@ done:
return retval;
}
-/* Drop privs and try to kill the process with the PID of session_pid.
+/* Drop privs and try to kill the process with the PID of session_pid.
This ensures that we don't kill something important if there is PID wrap
around. */
static int
@@ -403,7 +403,7 @@ unpriveleged_kill (struct passwd * pwdent)
track that but there are a lot of reason that we could fail there and
it's not a bad thing. Really we're attempting a best effort to clean up
we won't be able to gaurantee it. */
- _exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
} else if (pid < 0) {
retval = PAM_SYSTEM_ERR;
} else {
diff --git a/tests/mock_guest.c b/tests/mock_guest.c
index 8bf2c3a..7fb4581 100644
--- a/tests/mock_guest.c
+++ b/tests/mock_guest.c
@@ -84,7 +84,7 @@ socket_sucker ()
}
serv_addr.sun_family = AF_UNIX;
-
+
int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp-socket");
if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) {
return -1;
diff --git a/tests/mock_pam.c b/tests/mock_pam.c
index 2a1dcc7..7aef55a 100644
--- a/tests/mock_pam.c
+++ b/tests/mock_pam.c
@@ -112,7 +112,7 @@ int pam_get_item (const pam_handle_t *pamh, int type, const void **value)
*value = pamh->conv;
else if (pamh->item[type] != NULL)
*value = pamh->item[type];
- else
+ else
*value = NULL; /* will result in a prompt conversation */
return PAM_SUCCESS;
diff --git a/tests/test-freerdp-wrapper.cc b/tests/test-freerdp-wrapper.cc
index 6ba670f..ce1282b 100644
--- a/tests/test-freerdp-wrapper.cc
+++ b/tests/test-freerdp-wrapper.cc
@@ -63,25 +63,25 @@ namespace {
pam_handle_t *pamh = pam_handle_empty_pswd_new ();
- EXPECT_EQ (PAM_AUTH_ERR,
+ EXPECT_EQ (PAM_AUTH_ERR,
pam_sm_authenticate (pamh, 0, 0, argv));
-
+
}
-
+
TEST_F(FreerdpclientWrapperTest, canCallPamOpenSession) {
const char *argv[] = { NULL };
pam_handle_t *pamh = pam_handle_new ();
- EXPECT_EQ (PAM_SUCCESS,
+ EXPECT_EQ (PAM_SUCCESS,
pam_sm_authenticate (pamh, 0, 0, argv));
- EXPECT_EQ (PAM_SUCCESS,
+ EXPECT_EQ (PAM_SUCCESS,
pam_sm_setcred (pamh, 0, 0, argv));
-
- EXPECT_EQ (PAM_SUCCESS,
+
+ EXPECT_EQ (PAM_SUCCESS,
pam_sm_open_session (pamh, 0, 0, argv));
- EXPECT_EQ(0, socket_sucker());
- EXPECT_EQ (PAM_SUCCESS,
+ EXPECT_EQ(0, socket_sucker());
+ EXPECT_EQ (PAM_SUCCESS,
pam_sm_close_session (pamh, 0, 0, argv));
}