summaryrefslogtreecommitdiff
path: root/libpamc
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2011-10-26 23:56:54 +0000
committerDmitry V. Levin <ldv@altlinux.org>2011-10-26 23:56:54 +0000
commit1814aec611a5f9e03eceee81237ad3a3f51c954a (patch)
tree9f0ab1c38d5fbdd5f8ed8f792bf5649bcd50a416 /libpamc
parentfc772e7236a7aea9c9c26b0be2ee6f3ed8ae444a (diff)
Fix whitespace issues
Cleanup trailing whitespaces, indentation that uses spaces before tabs, and blank lines at EOF. Make the project free of warnings reported by git diff --check 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD
Diffstat (limited to 'libpamc')
-rw-r--r--libpamc/License1
-rw-r--r--libpamc/include/security/pam_client.h2
-rw-r--r--libpamc/pamc_client.c6
-rw-r--r--libpamc/pamc_load.c8
-rwxr-xr-xlibpamc/test/agents/secret@here9
-rw-r--r--libpamc/test/modules/pam_secret.c2
-rw-r--r--libpamc/test/regress/test.libpamc.c4
-rwxr-xr-xlibpamc/test/regress/test.secret@here3
8 files changed, 16 insertions, 19 deletions
diff --git a/libpamc/License b/libpamc/License
index 90106954..93160780 100644
--- a/libpamc/License
+++ b/libpamc/License
@@ -39,4 +39,3 @@ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
-------------------------------------------------------------------------
-
diff --git a/libpamc/include/security/pam_client.h b/libpamc/include/security/pam_client.h
index 988c2456..47e41aaf 100644
--- a/libpamc/include/security/pam_client.h
+++ b/libpamc/include/security/pam_client.h
@@ -121,7 +121,7 @@ do { \
\
__size = PAM_BP_MIN_SIZE + data_length; \
if ((*(old_p) = PAM_BP_CALLOC(1, 1+__size))) { \
- __PAM_BP_WOCTET(*(old_p), 3) = __size & 0xFF; \
+ __PAM_BP_WOCTET(*(old_p), 3) = __size & 0xFF; \
__PAM_BP_WOCTET(*(old_p), 2) = (__size>>=8) & 0xFF; \
__PAM_BP_WOCTET(*(old_p), 1) = (__size>>=8) & 0xFF; \
__PAM_BP_WOCTET(*(old_p), 0) = (__size>>=8) & 0xFF; \
diff --git a/libpamc/pamc_client.c b/libpamc/pamc_client.c
index 9d2bc671..175f424d 100644
--- a/libpamc/pamc_client.c
+++ b/libpamc/pamc_client.c
@@ -66,7 +66,7 @@ pamc_handle_t pamc_start(void)
if ( default_path[i] == PAMC_SYSTEM_AGENT_SEPARATOR
|| !default_path[i] ) {
int length;
-
+
pch->agent_paths[this] = malloc(length = 1+i-last);
if (pch->agent_paths[this] == NULL) {
@@ -102,7 +102,7 @@ drop_pch:
}
/*
- * shutdown each of the loaded agents and
+ * shutdown each of the loaded agents and
*/
static int __pamc_shutdown_agents(pamc_handle_t pch)
@@ -110,7 +110,7 @@ static int __pamc_shutdown_agents(pamc_handle_t pch)
int retval = PAM_BPC_TRUE;
D(("called"));
-
+
while (pch->chain) {
pid_t pid;
int status;
diff --git a/libpamc/pamc_load.c b/libpamc/pamc_load.c
index dbbfbd59..5155e0ae 100644
--- a/libpamc/pamc_load.c
+++ b/libpamc/pamc_load.c
@@ -25,7 +25,7 @@ static int __pamc_exec_agent(pamc_handle_t pch, pamc_agent_t *agent)
return PAM_BPC_FAIL;
}
}
-
+
/* enough memory for any path + this agent */
reset_length = 3 + pch->max_path + agent->id_length;
D(("reset_length = %d (3+%d+%d)",
@@ -57,7 +57,7 @@ static int __pamc_exec_agent(pamc_handle_t pch, pamc_agent_t *agent)
D(("no agent was found"));
goto free_and_return;
}
-
+
if (pipe(to_agent)) {
D(("failed to open pipe to agent"));
goto free_and_return;
@@ -262,7 +262,7 @@ int pamc_load(pamc_handle_t pch, const char *agent_id)
D(("sorry agent is disabled"));
return PAM_BPC_FALSE;
}
-
+
length = strlen(agent_id);
/* scan list to see if agent is loaded */
@@ -296,7 +296,7 @@ int pamc_load(pamc_handle_t pch, const char *agent_id)
agent->next = pch->chain;
pch->chain = agent;
-
+
return PAM_BPC_TRUE;
fail_free_agent_id:
diff --git a/libpamc/test/agents/secret@here b/libpamc/test/agents/secret@here
index afdcbaa8..8d82c013 100755
--- a/libpamc/test/agents/secret@here
+++ b/libpamc/test/agents/secret@here
@@ -41,7 +41,7 @@ for (;;) {
($reply_control, $reply_data) = HandleContinuation($data);
} else {
if ($debug) {
- print STDERR
+ print STDERR
"agent: unrecognized packet $control {$data} to read\n";
}
($reply_control, $reply_data) = (0x04, "");
@@ -133,7 +133,7 @@ sub HandleContinuation ($) {
}
my $expected_digest = CreateDigest($state{$key});
- my ($local_cookie, $remote_cookie, $shared_secret)
+ my ($local_cookie, $remote_cookie, $shared_secret)
= split '\|', $state{$key};
delete $state{$key};
@@ -154,7 +154,7 @@ sub HandleContinuation ($) {
print STDERR "agent: server appears to know the secret\n";
}
- my $session_authenticated_ticket =
+ my $session_authenticated_ticket =
CreateDigest($remote_cookie."|".$shared_secret."|".$local_cookie);
# FIXME: Agent should set a derived session key environment
@@ -183,7 +183,7 @@ sub ReadBinaryPrompt {
# broken packet header
return (-1, "");
}
-
+
my ($length, $control) = unpack("N C", $buffer);
if ($length < 5) {
# broken packet length
@@ -305,4 +305,3 @@ sub GetRandom {
}
}
-
diff --git a/libpamc/test/modules/pam_secret.c b/libpamc/test/modules/pam_secret.c
index 6316f7f5..f1c74c6f 100644
--- a/libpamc/test/modules/pam_secret.c
+++ b/libpamc/test/modules/pam_secret.c
@@ -664,6 +664,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
old_data = NULL;
D(("done (%d)", retval));
-
+
return retval;
}
diff --git a/libpamc/test/regress/test.libpamc.c b/libpamc/test/regress/test.libpamc.c
index 91f8d121..b0fff9c6 100644
--- a/libpamc/test/regress/test.libpamc.c
+++ b/libpamc/test/regress/test.libpamc.c
@@ -172,7 +172,7 @@ void prompt_to_packet(pamc_bp_t prompt, struct internal_packet *packet)
data_length = PAM_BP_LENGTH(prompt);
packet->at = 0;
append_data(packet, data_length, NULL);
-
+
PAM_BP_EXTRACT(prompt, 0, data_length, packet->buffer);
fprintf(stderr, "server received[%d]: {%d|0x%.2x|%s}\n",
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
digest);
}
-
+
retval = pamc_end(&pch);
fprintf(stderr, "server: agent(s) were %shappy to terminate\n",
diff --git a/libpamc/test/regress/test.secret@here b/libpamc/test/regress/test.secret@here
index 2e0b9b94..67fe22ec 100755
--- a/libpamc/test/regress/test.secret@here
+++ b/libpamc/test/regress/test.secret@here
@@ -94,7 +94,7 @@ sub ReadBinaryPrompt ($) {
# broken packet header
return (-1, "");
}
-
+
my ($length, $control) = unpack("N C", $buffer);
if ($length < 5) {
# broken packet length
@@ -149,4 +149,3 @@ sub IdentifyLocalSecret ($) {
return $secret;
}
-