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
6c01b9d8
...
6c01b9d8055dfdb55a8deab5bc8aefd118a90f1f
authored
2002-04-15 09:04:02 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Removed unnecessary code: namespace_getfullpath() now translates INBOX to filename.
1 parent
bf6389f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
43 deletions
imap4d/copy.c
imap4d/select.c
imap4d/status.c
imap4d/copy.c
View file @
6c01b9d
...
...
@@ -73,13 +73,7 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen)
return
RESP_BAD
;
}
if
(
strcasecmp
(
name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
struct
passwd
*
pw
=
mu_getpwuid
(
getuid
());
mailbox_name
=
strdup
((
pw
)
?
pw
->
pw_name
:
""
);
}
else
mailbox_name
=
namespace_getfullpath
(
name
,
delim
);
mailbox_name
=
namespace_getfullpath
(
name
,
delim
);
if
(
!
mailbox_name
)
{
...
...
@@ -117,7 +111,7 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen)
return
RESP_OK
;
}
/* Unless it is certain that the destination mailb
i
x can not be created,
/* Unless it is certain that the destination mailb
o
x can not be created,
the server MUST send the response code "[TRYCREATE]" as the prefix
of the text of the tagged NO response. This gives a hint to the
client that it can attempt a CREATE command and retry the copy if
...
...
imap4d/select.c
View file @
6c01b9d
...
...
@@ -57,25 +57,7 @@ imap4d_select0 (struct imap4d_command *command, char *arg, int flags)
imap4d_sync
();
}
if
(
strcasecmp
(
mailbox_name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
pw
=
mu_getpwuid
(
getuid
());
if
(
pw
)
{
mailbox_name
=
malloc
(
strlen
(
mu_path_maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
if
(
!
mailbox_name
)
{
syslog
(
LOG_ERR
,
"Not enough memory"
);
return
util_finish
(
command
,
RESP_NO
,
"Not enough memory"
);
}
sprintf
(
mailbox_name
,
"%s%s"
,
mu_path_maildir
,
pw
->
pw_name
);
}
else
mailbox_name
=
strdup
(
"/dev/null"
);
}
else
mailbox_name
=
namespace_getfullpath
(
mailbox_name
,
"/"
);
mailbox_name
=
namespace_getfullpath
(
mailbox_name
,
"/"
);
if
(
!
mailbox_name
)
return
util_finish
(
command
,
RESP_NO
,
"Couldn't open mailbox"
);
...
...
imap4d/status.c
View file @
6c01b9d
...
...
@@ -72,22 +72,7 @@ imap4d_status (struct imap4d_command *command, char *arg)
if
(
!
name
||
*
name
==
'\0'
||
!
sp
||
*
sp
==
'\0'
)
return
util_finish
(
command
,
RESP_BAD
,
"Too few args"
);
if
(
strcasecmp
(
name
,
"INBOX"
)
==
0
&&
!
mu_virtual_domain
)
{
struct
passwd
*
pw
=
mu_getpwuid
(
getuid
());
if
(
!
pw
)
return
util_finish
(
command
,
RESP_NO
,
"Cannot map UID to username"
);
mailbox_name
=
malloc
(
strlen
(
mu_path_maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
if
(
!
mailbox_name
)
{
syslog
(
LOG_ERR
,
"Not enough memory"
);
return
util_finish
(
command
,
RESP_NO
,
"Not enough memory"
);
}
sprintf
(
mailbox_name
,
"%s%s"
,
mu_path_maildir
,
pw
->
pw_name
);
}
else
mailbox_name
=
namespace_getfullpath
(
name
,
delim
);
mailbox_name
=
namespace_getfullpath
(
name
,
delim
);
if
(
!
mailbox_name
)
return
util_finish
(
command
,
RESP_NO
,
"Error opening mailbox"
);
...
...
Please
register
or
sign in
to post a comment