Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
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
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
b28ac7df
Commit
b28ac7df
authored
32 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Added time-out in get_real_username.
parent
5438ee07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/server/ChangeLog
+11
-1
11 additions, 1 deletion
src/server/ChangeLog
src/server/connections.c
+3
-3
3 additions, 3 deletions
src/server/connections.c
src/server/rfc931.c
+22
-4
22 additions, 4 deletions
src/server/rfc931.c
src/server/rfc931.h
+3
-2
3 additions, 2 deletions
src/server/rfc931.h
with
39 additions
and
10 deletions
src/server/ChangeLog
+
11
−
1
View file @
b28ac7df
Wed Aug 12 01:38:22 1992 Per Cederqvist (ceder@robin)
* rfc931.c (get_real_username): Introduce 20-second timeout. Log
any ident queries that takes more than 3 seconds. New argument:
hostname (only used for the log).
* connections.c (login_request): Send the new argument.
* log.c (logv): Print the log message on a single line, with the
time in the first 20 columns. (Facilitate log browsing).
Wed Aug 12 00:33:55 1992 Inge Wallin (inge@lysator)
* simple-cache.c(save_one_text): Write texts to file as long as
* simple-cache.c
(save_one_text): Write texts to file as long as
they are removed.
Thu Jun 11 16:28:39 1992 Per Cederqvist (ceder@lysator)
...
...
This diff is collapsed.
Click to expand it.
src/server/connections.c
+
3
−
3
View file @
b28ac7df
/*
* $Id: connections.c,v 0.
19
1992/0
6
/1
1 1
4:
3
2:5
4
ceder Exp $
* $Id: connections.c,v 0.
20
1992/0
8
/1
2 0
4:
1
2:5
3
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -30,7 +30,7 @@
* Created by Willf|r 31/3-90. Mostly written by ceder.
*/
static
char
*
rcsid
=
"$Id: connections.c,v 0.
19
1992/0
6
/1
1 1
4:
3
2:5
4
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: connections.c,v 0.
20
1992/0
8
/1
2 0
4:
1
2:5
3
ceder Exp $"
;
#include
<errno.h>
...
...
@@ -781,7 +781,7 @@ login_request(IscEvent *event)
/* Get the real user name, as returned by the Ident protocol
(rfc 931). */
realuser
=
get_real_username
(
event
->
session
);
realuser
=
get_real_username
(
event
->
session
,
hostname
);
if
(
realuser
!=
NULL
)
s_crea_str
(
&
cp
->
ident_user
,
realuser
);
...
...
This diff is collapsed.
Click to expand it.
src/server/rfc931.c
+
22
−
4
View file @
b28ac7df
/*
* $Id: rfc931.c,v 1.
2
1992/0
4/01 20:32:03
ceder Exp $
* $Id: rfc931.c,v 1.
3
1992/0
8/12 04:12:57
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -36,22 +36,40 @@
#include
<m-config.h>
#include
"rfc931.h"
#include
<authuser.h>
#include
<errno.h>
#include
"log.h"
#ifdef RFC_931
char
*
get_real_username
(
IscSession
*
scb
)
get_real_username
(
IscSession
*
scb
,
char
*
hostname
)
{
unsigned
long
inlocal
;
unsigned
long
inremote
;
unsigned
short
local
;
unsigned
short
remote
;
char
*
result
;
time_t
before
,
after
;
if
(
auth_fd2
(
scb
->
fd
,
&
inlocal
,
&
inremote
,
&
local
,
&
remote
)
==
-
1
)
return
NULL
;
return
auth_tcpuser2
(
inlocal
,
inremote
,
local
,
remote
);
time
(
&
before
);
result
=
auth_tcpuser3
(
inlocal
,
inremote
,
local
,
remote
,
20
);
if
(
result
==
NULL
&&
errno
==
ETIMEDOUT
)
log
(
"Identd request to %s timed out.
\n
"
,
hostname
);
else
{
time
(
&
after
);
if
(
difftime
(
after
,
before
)
>
3
)
log
(
"Identd request to %s yielded %s after %d seconds.
\n
"
,
hostname
,
result
==
NULL
?
"(null)"
:
result
,
(
int
)
difftime
(
after
,
before
));
}
return
result
;
}
#endif
This diff is collapsed.
Click to expand it.
src/server/rfc931.h
+
3
−
2
View file @
b28ac7df
/*
* $Id: rfc931.h,v 1.
1
1992/0
3/31 21:51:34
ceder Exp $
* $Id: rfc931.h,v 1.
2
1992/0
8/12 04:13:01
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -23,4 +23,5 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
char
*
get_real_username
(
IscSession
*
scb
);
char
*
get_real_username
(
IscSession
*
scb
,
char
*
hostname
);
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