The Samba-Bugzilla – Attachment 9988 Details for
Bug 10639
close() overwrites timestamp set by utimes()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test program
testwrite.c (text/x-csrc), 952 bytes, created by
Ross Lagerwall
on 2014-05-28 07:54:31 UTC
(
hide
)
Description:
test program
Filename:
MIME Type:
Creator:
Ross Lagerwall
Created:
2014-05-28 07:54:31 UTC
Size:
952 bytes
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <string.h> >#include <time.h> >#include <libsmbclient.h> > >static void >get_auth_data_fn(const char * pServer, > const char * pShare, > char * pWorkgroup, > int maxLenWorkgroup, > char * pUsername, > int maxLenUsername, > char * pPassword, > int maxLenPassword) >{ >} > >int main(int argc, char * argv[]) >{ > struct timeval tbuf[2]; > int fd, ret; > > smbc_init(get_auth_data_fn, 10); > > if ((fd = smbc_open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0) > perror("smbc_open"); > > ret = smbc_write(fd, "x", 1); > if (ret < 0) > perror("write"); > > tbuf[0].tv_sec = 1000000000; > tbuf[0].tv_usec = 0; > tbuf[1].tv_sec = 1000000000; > tbuf[1].tv_usec = 0; > > ret = smbc_utimes (argv[1], tbuf); > if (ret < 0) > perror("utimes"); > > smbc_close(fd); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10639
: 9988