Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goatherd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CIP-Admins
goatherd
Commits
0d40e7bd
Commit
0d40e7bd
authored
7 years ago
by
Lukas Braun
Browse files
Options
Downloads
Patches
Plain Diff
pam_goatherd: formatting
parent
ea91a8cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pam_goatherd.c
+14
-4
14 additions, 4 deletions
pam_goatherd.c
with
14 additions
and
4 deletions
pam_goatherd.c
+
14
−
4
View file @
0d40e7bd
...
...
@@ -75,12 +75,16 @@ static int verify_cb(gnutls_session_t session) {
static
int
send_full
(
gnutls_session_t
session
,
const
void
*
data
,
size_t
len
)
{
ssize_t
sent
;
while
(
len
>
0
&&
(
sent
=
gnutls_record_send
(
session
,
data
,
len
))
>
0
)
{
while
(
len
>
0
&&
(
sent
=
gnutls_record_send
(
session
,
data
,
len
))
>
0
)
{
data
+=
sent
;
len
-=
(
size_t
)
sent
;
}
if
(
sent
<
0
)
{
return
(
int
)
sent
;
}
return
0
;
}
...
...
@@ -177,7 +181,9 @@ static int check_hotp(struct cfg cfg, size_t n_server, const char *user, const c
do
{
err
=
gnutls_handshake
(
session
);
}
while
(
err
<
0
&&
!
gnutls_error_is_fatal
(
err
));
}
while
(
err
<
0
&&
!
gnutls_error_is_fatal
(
err
));
if
(
err
<
0
)
{
dbgp
(
"handshake failed"
);
...
...
@@ -212,10 +218,14 @@ static int check_hotp(struct cfg cfg, size_t n_server, const char *user, const c
if
(
recvd
>=
strlen
(
str_ok
)
&&
!
strncmp
(
buf
,
str_ok
,
strlen
(
str_ok
)))
{
dbgp
(
"OK"
);
err
=
PAM_SUCCESS
;
}
else
if
(
recvd
>=
strlen
(
str_fail
)
&&
!
strncmp
(
buf
,
str_fail
,
strlen
(
str_fail
)))
{
}
else
if
(
recvd
>=
strlen
(
str_fail
)
&&
!
strncmp
(
buf
,
str_fail
,
strlen
(
str_fail
)))
{
dbgp
(
"FAIL"
);
err
=
PAM_AUTH_ERR
;
}
else
{
}
else
{
dbgp
(
"Unexpected response"
);
err
=
PAM_AUTHINFO_UNAVAIL
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment