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
e66f7ed1
...
e66f7ed1d4b5f6cb696e5b6e02033181d392dc1e
authored
2002-02-19 17:06:49 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_getpwuid() instead of getpwuid().
1 parent
24ed1e41
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
12 additions
and
12 deletions
imap4d/bye.c
imap4d/copy.c
imap4d/rename.c
imap4d/select.c
imap4d/status.c
mailbox/mbx_default.c
mailbox/message.c
mailbox/smtp.c
mailbox/wicket.c
mailbox2/mutil.c
imap4d/bye.c
View file @
e66f7ed
...
...
@@ -27,7 +27,7 @@ imap4d_bye (int reason)
int
imap4d_bye0
(
int
reason
,
struct
imap4d_command
*
command
)
{
struct
passwd
*
pw
=
getpwuid
(
getuid
());
struct
passwd
*
pw
=
mu_
getpwuid
(
getuid
());
const
char
*
username
;
int
status
=
EXIT_FAILURE
;
username
=
(
pw
)
?
pw
->
pw_name
:
"Unknown"
;
...
...
imap4d/copy.c
View file @
e66f7ed
...
...
@@ -75,7 +75,7 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen)
if
(
strcasecmp
(
name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
struct
passwd
*
pw
=
getpwuid
(
getuid
());
struct
passwd
*
pw
=
mu_
getpwuid
(
getuid
());
mailbox_name
=
strdup
((
pw
)
?
pw
->
pw_name
:
""
);
}
else
...
...
imap4d/rename.c
View file @
e66f7ed
...
...
@@ -89,7 +89,7 @@ imap4d_rename (struct imap4d_command *command, char *arg)
}
free
(
name
);
free
(
newname
);
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
)
{
mailbox_t
inbox
=
NULL
;
...
...
imap4d/select.c
View file @
e66f7ed
...
...
@@ -59,7 +59,7 @@ imap4d_select0 (struct imap4d_command *command, char *arg, int flags)
if
(
strcasecmp
(
mailbox_name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
)
{
mailbox_name
=
malloc
(
strlen
(
maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
...
...
imap4d/status.c
View file @
e66f7ed
...
...
@@ -47,7 +47,7 @@ imap4d_status (struct imap4d_command *command, char *arg)
if
(
strcasecmp
(
name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
struct
passwd
*
pw
=
getpwuid
(
getuid
());
struct
passwd
*
pw
=
mu_
getpwuid
(
getuid
());
mailbox_name
=
strdup
((
pw
)
?
pw
->
pw_name
:
""
);
}
else
...
...
mailbox/mbx_default.c
View file @
e66f7ed
...
...
@@ -86,12 +86,12 @@ get_homedir (const char *user)
homedir
=
getenv
(
"HOME"
);
if
(
homedir
==
NULL
)
{
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
)
homedir
=
pw
->
pw_dir
;
}
#else
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
)
homedir
=
pw
->
pw_dir
;
#endif
...
...
@@ -283,7 +283,7 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail)
if
(
user
==
NULL
)
{
struct
passwd
*
pw
;
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
)
user
=
pw
->
pw_name
;
else
...
...
mailbox/message.c
View file @
e66f7ed
...
...
@@ -925,7 +925,7 @@ message_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite)
{
struct
passwd
*
pw
;
const
char
*
sender
;
pw
=
getpwuid
(
getuid
());
pw
=
mu_
getpwuid
(
getuid
());
sender
=
(
pw
)
?
pw
->
pw_name
:
"unknown"
;
n
=
strlen
(
sender
);
if
(
buf
&&
len
>
0
)
...
...
mailbox/smtp.c
View file @
e66f7ed
...
...
@@ -621,7 +621,7 @@ get_from (message_t msg, char *localhost, address_t *pmail_from)
/* If it's not in the header create one form the passwd. */
if
(
status
!=
0
||
size
==
0
)
{
struct
passwd
*
pwd
=
getpwuid
(
getuid
());
struct
passwd
*
pwd
=
mu_
getpwuid
(
getuid
());
/* Not in the passwd ???? We have a problem. */
if
(
pwd
==
0
||
pwd
->
pw_name
==
NULL
)
{
...
...
mailbox/wicket.c
View file @
e66f7ed
...
...
@@ -397,7 +397,7 @@ get_user (url_t url, const char *filename, char **user)
}
else
{
struct
passwd
*
pw
=
getpwuid
(
getuid
());
struct
passwd
*
pw
=
mu_
getpwuid
(
getuid
());
if
(
pw
&&
pw
->
pw_name
)
{
u
=
strdup
(
pw
->
pw_name
);
...
...
mailbox2/mutil.c
View file @
e66f7ed
...
...
@@ -254,7 +254,7 @@ mu_get_homedir (void)
{
struct
passwd
*
pwd
;
pwd
=
getpwuid
(
getuid
());
pwd
=
mu_
getpwuid
(
getuid
());
if
(
!
pwd
)
return
NULL
;
homedir
=
pwd
->
pw_dir
;
...
...
Please
register
or
sign in
to post a comment