Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
76ec9ddd
...
76ec9dddc475384183fa4930cd09d1533ac3cb80
authored
2001-05-23 16:48:26 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Patch from Sergey.
1 parent
567a68fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
ChangeLog
imap4d/login.c
mailbox/mbx_mbox.c
pop3d/user.c
ChangeLog
View file @
76ec9dd
2001-05-23 Sergey Poznyakoff
* pop3d/user.c: check for NULL return from getpwnam()
* imap4d/login.c: Likewised.
2001-05-21 Alain Magloire
GNU md5 is GPL, but we agreed that the libraries should
...
...
imap4d/login.c
View file @
76ec9dd
...
...
@@ -101,9 +101,11 @@ imap4d_login (struct imap4d_command *command, char *arg)
return
util_finish
(
command
,
RESP_NO
,
"Too many args"
);
pw
=
getpwnam
(
username
);
if
(
pw
==
NULL
)
return
util_finish
(
command
,
RESP_NO
,
"User name or passwd rejected"
);
#ifndef USE_LIBPAM
if
(
pw
==
NULL
||
pw
->
pw_uid
<
1
)
if
(
pw
->
pw_uid
<
1
)
return
util_finish
(
command
,
RESP_NO
,
"User name or passwd rejected"
);
if
(
strcmp
(
pw
->
pw_passwd
,
(
char
*
)
crypt
(
pass
,
pw
->
pw_passwd
)))
{
...
...
mailbox/mbx_mbox.c
View file @
76ec9dd
...
...
@@ -396,7 +396,7 @@ static int
mbox_close
(
mailbox_t
mailbox
)
{
mbox_data_t
mud
=
mailbox
->
data
;
size_t
i
;
/* size_t i; */
if
(
mud
==
NULL
)
return
EINVAL
;
...
...
@@ -407,6 +407,9 @@ mbox_close (mailbox_t mailbox)
locker_unlock
(
mailbox
->
locker
);
#if 0
/* RFC: I'm not sure on the right approach especially if the client is
working in disconnected mode, where it can mailbox_close/mailbox_open
for each request, maybe we should keep them for a while. */
monitor_wrlock (mailbox->monitor);
/* Before closing we need to remove all the messages
- to reclaim the memory
...
...
pop3d/user.c
View file @
76ec9dd
...
...
@@ -134,8 +134,14 @@ pop3d_user (const char *arg)
#endif
pw
=
getpwnam
(
arg
);
if
(
pw
==
NULL
)
{
syslog
(
LOG_INFO
,
"User '%s': nonexistent"
,
arg
);
return
ERR_BAD_LOGIN
;
}
#ifndef USE_LIBPAM
if
(
pw
==
NULL
||
pw
->
pw_uid
<
1
)
if
(
pw
->
pw_uid
<
1
)
return
ERR_BAD_LOGIN
;
if
(
strcmp
(
pw
->
pw_passwd
,
(
char
*
)
crypt
(
pass
,
pw
->
pw_passwd
)))
{
...
...
@@ -177,7 +183,7 @@ pop3d_user (const char *arg)
}
#endif
/* USE_LIBPAM */
if
(
pw
!=
NULL
&&
pw
->
pw_uid
>
1
)
if
(
pw
->
pw_uid
>
1
)
setuid
(
pw
->
pw_uid
);
mailbox_name
=
calloc
(
strlen
(
_PATH_MAILDIR
)
+
1
...
...
Please
register
or
sign in
to post a comment