diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-11 23:19:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-11 23:19:08 +0000 |
commit | 6578fd874283ee97c2896bcf7257db7f3e37c2ec (patch) | |
tree | a5e9ee2ed36b4b0ba1521edbe961f3e2f9026f13 /source3/smbd | |
parent | 0ca9f5c023df2ee498dcd1bdb2f29abc632a5d60 (diff) | |
download | samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.gz samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.bz2 samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.zip |
To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
(This used to be commit 9b32b8a8cfc8ddb93c14d5581f433d2e93f89ed2)
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); } |