diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/message.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/smbd/message.c b/source3/smbd/message.c index 21750f9cd4..9206442b94 100644 --- a/source3/smbd/message.c +++ b/source3/smbd/message.c @@ -40,8 +40,7 @@ deliver the message ****************************************************************************/ static void msg_deliver(void) { - pstring s; - fstring name; + pstring name; int i; int fd; @@ -53,10 +52,9 @@ static void msg_deliver(void) } /* put it in a temporary file */ - slprintf(s,sizeof(s)-1, "%s/msg.XXXXXX",tmpdir()); - fstrcpy(name,(char *)smbd_mktemp(s)); + slprintf(name,sizeof(name)-1, "%s/msg.XXXXXX",tmpdir()); + fd = smb_mkstemp(name); - fd = sys_open(name,O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,0600); if (fd == -1) { DEBUG(1,("can't open message file %s\n",name)); return; @@ -86,12 +84,13 @@ static void msg_deliver(void) { fstring alpha_msgfrom; fstring alpha_msgto; + pstring s; pstrcpy(s,lp_msg_command()); - pstring_sub(s,"%s",name); pstring_sub(s,"%f",alpha_strcpy(alpha_msgfrom,msgfrom,sizeof(alpha_msgfrom))); pstring_sub(s,"%t",alpha_strcpy(alpha_msgto,msgto,sizeof(alpha_msgto))); standard_sub_basic(s); + pstring_sub(s,"%s",name); smbrun(s,NULL,False); } |