The Samba-Bugzilla – Attachment 9951 Details for
Bug 10617
lseek not receiving arguments properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
C program to reproduce the bug
main.c (text/x-csrc), 998 bytes, created by
kyleedwardsny
on 2014-05-19 00:25:05 UTC
(
hide
)
Description:
C program to reproduce the bug
Filename:
MIME Type:
Creator:
kyleedwardsny
Created:
2014-05-19 00:25:05 UTC
Size:
998 bytes
patch
obsolete
>#include <string.h> >#include <errno.h> >#include <stdio.h> >#include <unistd.h> > >#include <libsmbclient.h> > >static const char *test_str = "Hello world!\n"; > >int main(int argc, char **argv) >{ > SMBCCTX *context; > SMBCFILE *file; > smbc_open_fn smb_open; > smbc_write_fn smb_write; > smbc_lseek_fn smb_lseek; > smbc_close_fn smb_close; > off_t ret; > int err; > > context = smbc_new_context(); > smbc_init_context(context); > > smb_open = smbc_getFunctionOpen(context); > smb_write = smbc_getFunctionWrite(context); > smb_lseek = smbc_getFunctionLseek(context); > smb_close = smbc_getFunctionClose(context); > > file = smb_open(context, "smb://localhost/test/test.txt", O_WRONLY | O_CREAT | O_TRUNC, 0); > if (!file) > return 1; > smb_write(context, file, test_str, strlen(test_str)); > ret = smb_lseek(context, file, 0, SEEK_SET); > err = errno; > printf("Return value: %li\nError: %s\n", ret, strerror(err)); > > smb_close(context, file); > 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 10617
: 9951 |
9952