The Samba-Bugzilla – Attachment 3829 Details for
Bug 5993
mount -o remount, brl or -o remount, nobrl changes the reported "mand" option, but has no effect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test case provided by our user
testlocking.c (text/x-csrc), 1.00 KB, created by
Debian samba package maintainers (PUBLIC MAILING LIST)
on 2008-12-25 11:26:46 UTC
(
hide
)
Description:
Test case provided by our user
Filename:
MIME Type:
Creator:
Debian samba package maintainers (PUBLIC MAILING LIST)
Created:
2008-12-25 11:26:46 UTC
Size:
1.00 KB
patch
obsolete
>/* grep open(2) for O_LARGEFILE to explain this: */ >#define _FILE_OFFSET_BITS 64 > >#include <sys/types.h> >#include <sys/stat.h> >#include <unistd.h> >#include <fcntl.h> >#include <stdio.h> > >/* > Author: Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net> > Date: 2008-05-28 > > This is a demonstration program for testing > http://bugs.debian.org/483216 > */ > >int main(int argc, char* argv[]) { > struct flock flock; > int fd; > > flock.l_whence=SEEK_SET; > > /* open file, get file descriptor */ > fd = open(argv[1], O_RDWR|O_CREAT, 0644); > > fcntl(fd, F_SETFD, FD_CLOEXEC | fcntl(fd, F_GETFD)); > > /* get read lock: */ > flock.l_type=F_RDLCK; > flock.l_start=0; > flock.l_len = 1; > if (0 != fcntl(fd, F_SETLK64, &flock)) { > perror("read lock failed"); > return 1; > } > > /* get write lock for same range: */ > flock.l_type=F_WRLCK; > if (0 != fcntl(fd, F_SETLK64, &flock)) { > /* fails here when used on CIFS share mounted without nobrl option */ > perror("write lock failed"); > return 1; > } > > 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 5993
: 3829