search for: o_creat

Displaying 20 results from an estimated 446 matches for "o_creat".

2003 Nov 23
1
[PATCH] dd O_CREAT permission
O_CREAT requires a mode argument for open() This patch passes the current umask of the dd process. --- usr/klibc/klibc-0.81.orig/utils/dd.c 2002-09-03 00:49:08.000000000 +0200 +++ usr/klibc/klibc-0.81/utils/dd.c 2003-11-23 18:04:11.000000000 +0100 @@ -8,6 +8,8 @@ #include <stdio.h> #include <s...
2002 Jul 17
1
Re: smb.conf - fixed? :)
open("/usr/local/samba/var/log.smbd", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EACCES (Permission denied) umask(0) = 022 brk(0x81e6000) = 0x81e6000 stat64("", 0xbfffed80) = -1 ENOENT (No such file or directory) umask(022) = 0 That "No s...
2004 Jul 20
3
Bug? 1.0.0-test28 NFS locking problems
...box files at all. 1) fcntl with F_SETLKW will not work against a Solaris 2.8 server as proved with a small test program. Other forms of fcntl (ie F_SETLK) are OK. I noticed there are some code witches, but setting mbox_lock_timeout=0 only seems to knock one of the fcntl's over to F_SETLK 2) O_CREAT | O_EXCL are documented not to work over NFS properly (see man open(2) on linux). So I knocked out the O_EXCL and combined with (1) dovecot will talk over NFS to remote mbox files. THESE ARE NOT VIABLE CODE PATCHES They illustrate a problem I found - they are hackish and totally wrong. I'm no...
1999 Sep 15
0
FreeBSD Security Advisory: FreeBSD-SA-99:04.core
...ct_elf.c 1999/07/09 19:10:14 1.61 --- kern/imgact_elf.c 1999/08/26 17:32:48 1.62 *************** *** 722,729 **** if (name == NULL) return (EFAULT); /* XXX -- not the best error */ ! NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, name, p); ! error = vn_open(&nd, O_CREAT | FWRITE, S_IRUSR | S_IWUSR); free(name, M_TEMP); if (error) return (error); --- 722,729 ---- if (name == NULL) return (EFAULT); /* XXX -- not the best error */ ! NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, p); ! error = vn_open(&nd, O_CREAT |...
2003 Apr 08
1
[Bug 539] open() requires 3 arguments when using O_CREAT
http://bugzilla.mindrot.org/show_bug.cgi?id=539 Summary: open() requires 3 arguments when using O_CREAT Product: Portable OpenSSH Version: 3.6p1 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: sshd AssignedTo: openssh-unix-dev at mindrot.org ReportedBy: matth at eecs.berk...
2004 Aug 17
1
[Bug] LTP: mkdir fail after setreuid
...RRNO =3D EBADF >call returned -1 and ERRNO =3D EBADF >call returned -1 and ERRNO =3D EBADF >call returned -1 and ERRNO =3D EBADF >fchmod04 1 BROK : mkdir(2) of testdir_4 failed >fchmod05 1 BROK : mkdir(2) of testdir failed >fstat02 1 BROK : open(testfile, O_RDWR|O_CREAT, 0644) Failed, >errno=3D13 : Permission denied >fstat04 1 BROK : open(testfile, O_RDWR|O_CREAT, 0644) Failed, >errno=3D13 : Permission denied >Starting test, possible errnos are; EBADF(9) EINVAL(22) > ENOENT(2) EACCES(13) EPERM(1) >Starting test1 >Test Failed as Expecte...
2002 Jun 17
1
O_EXCL unreliable?
Hi all, I fear I can't rely on "open (path, O_CREAT | O_EXCL)" behaviour on samba share. The libc's doc says: If both `O_CREAT' and `O_EXCL' are set, then `open' fails if the specified file already exists. This is guaranteed to never clobber an existing file. But this isn't probably true on network filesys...
2002 Mar 06
1
samba 2.2.3a on PPC
...= 0 munmap(0x30016000, 4096) = 0 gettimeofday({1015378306, 575771}, NULL) = 0 stat64(0x7fffe538, 0x7fffe938) = -1 ENOENT (No such file or directory) time(NULL) = 1015378306 umask(022) = 022 open("", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 ENOENT (No such file or directory) umask(022) = 022 umask(022) = 022 open("", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 ENOENT (No such file or directory) umask(022)...
2005 Nov 23
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...t;temp.GNU.a", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0600, st_size=4210, ...}) = 0 mmap2(NULL, 8192, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000 gettimeofday({1132714484, 283020}, NULL) = 0 getpid() = 28656 open("temp.GNU.a-O1Q6E8", O_RDWR|O_CREAT|O_EXCL, 0600) = 4 close(4) = 0 open("temp.GNU.a-O1Q6E8", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4 close(4) = 0 *** SIGNAL HANDLING REMOVED *** open("temp.GNU.a-O1Q6E8", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4 brk(0)...
2001 May 17
6
scp: Problem when source and destination are identical
If the source and destination file are identical, the receiving scp truncates the file. On the sending end, read() returns 0, and garbage is sent instead of actual data, and the receiving end puts it into the file, which at least confuses the users. -- Florian Weimer Florian.Weimer at RUS.Uni-Stuttgart.DE University of Stuttgart http://cert.uni-stuttgart.de/
2008 Feb 19
1
DLMFS on OracleVM 2.1 (OEL5.0 based)
...lly sleeps e.g. 30 sec. While the script is running I execute the getlocks script on node2. The following ouput appears - as expected: --- OUTPUT ---- Traceback (most recent call last): File "/INSTALL/getlocks.py", line 12, in ? fd=os.open(dir + "/" + mach, os.O_RDWR|os.O_CREAT|os.O_NONBLOCK) OSError: [Errno 26] Text file busy: '/dlm/xen/TermServ' --- OUTPUT ---- Thats what I expected. But when the getlocks script is finished on node1 and I run getlocks on node2 again the ERROR above appers also. Shouldn't it be possible that the lock is aquired on node2 wh...
2001 Nov 29
1
cannot create .hosts.b0WX1x : File exists
...ave exactly the same LinuX distribution, permissions and users than on the problem targethost. I have exactly the same configuration than on the other machines, except on probelm targethost I have SCSI hard disk. When i strace the rsync --deamon i get: 4697 open(".hosts.b0WX1x", O_RDWR|O_CREAT|O_EXCL|0x8000, 0600) = 4 4697 open(".hosts.b0WX1x", O_WRONLY|O_CREAT|O_EXCL|0x8000, 0600) = -1 EEXIST (File exists) It seems like it opens the file ReadWrite and then tries to open it readonly. I don't know why. It bangs then. Thanks for any hint, Rok Krulec Portoroz/Slovenia,...
2003 May 14
1
Bug with Large Files on AIX
...& !defined(_AIX) { int fd = mkstemp(template); if (fd == -1) return -1; *************** *** 164,170 **** --- 164,174 ---- } #else if (!mktemp(template)) return -1; + #if defined(O_LARGEFILE) + return do_open(template, O_RDWR|O_EXCL|O_CREAT|O_LARGEFILE, perms); + #else return do_open(template, O_RDWR|O_EXCL|O_CREAT, perms); + #endif #endif } Regards, Martin Schaller
2007 May 08
2
TDB functionality document
...h explains the TDB structure. functionalites, and format of the TDB files etc. I need to understand why some of the TDBs like messages.tdb, unexpected.tdb, brlock if not read_only, locking.tdb, session.tdb, wins.tdb are called with TDB_CLEAR_IF_FIRST tdb flags. Why some TDBs are opend with O_RDWR|O_CREAT flags viz. gencache.tdb, group_mapping.tdb, account_policy.tdb, share_info.tdb, secrets.tdb. schannel_store.tdb etc. etc. why registry.tdb is uniquely been tried to open with O_RDWR flag and if fails then tried with O_RDWR|O_CREAT flag. and such internal details of the TDBs. >From the code st...
2012 Jul 25
1
[PATCH] fish: Use minimal permissions when initially creating history file
...sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/fish.c b/fish/fish.c index ded80ec..9bb8c90 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1455,7 +1455,7 @@ cleanup_readline (void) int fd; if (histfile[0] != '\0') { - fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0644); + fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0600); if (fd == -1) { perror (histfile); return; -- 1.7.10.4
2011 Jun 28
0
[PATCH] cpio: cleanup O_BINARY usage.
...> #endif -#ifndef O_BINARY -# define O_BINARY 0 -#endif - # ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' # endif @@ -576,8 +572,7 @@ static void create_final_defers(void) if (link_res == 0) { continue; } - out_file_des = open(d->header.c_name, - O_CREAT | O_WRONLY | O_BINARY, 0600); + out_file_des = open(d->header.c_name, O_CREAT | O_WRONLY, 0600); if (out_file_des < 0) { fprintf(stderr, "%s: open %s: %s\n", progname, d->header.c_name, strerror(errno)); @@ -647,8 +642,7 @@ copyin_regular_file(struct new_cpio_header...
2006 Oct 25
2
Re: [Xen-staging] [xen-unstable] [XEND] Open xend-debug.log in append mode.
...ls/python/xen/xend/server/SrvDaemon.py Wed Oct 25 10:27:03 > 2006 +0100 > @@ -106,12 +106,12 @@ class Daemon: > os.close(2) > if XEND_DEBUG: > os.open(''/dev/null'', os.O_RDONLY) > - os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT) > + os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT| > os.O_APPEND) > os.dup(1) > else: > os.open(''/dev/null'', os.O_RDWR) > os.dup(0) > - os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT) &gt...
2012 Jun 06
2
[LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'
...orkspacecpp/llvm-svn/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc > /san01/home/chatsiri/workspacecpp/llvm-svn/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:47:36: > error: use of > undeclared identifier 'O_CLOEXEC' > write ? O_WRONLY | O_CREAT | O_CLOEXEC : O_RDONLY, > 0660); ^ > 1 error generated. > > Who have any idea with error these? > The code in sanitizer_linux.cc calls libc function "open" and passes O_CLOEXEC as a flag to it. "man open" says: "O_CLOEXEC (S...
2016 Apr 26
2
poor samba performance with many smaller files
Hi, I need to to open existing readonly files. Yes you are right, not the open call takes the time, but stat() system call. I looked at aio_pthread source, the lines which needs to be removed to make it work are just the lines which tests for O_CREAT|O_EXCL? What problems can cause such solution for readonly share? On Tue, Apr 26, 2016 at 8:42 PM, Jeremy Allison <jra at samba.org> wrote: > On Tue, Apr 26, 2016 at 03:49:44PM +0200, Peter Bulin wrote: > > Hi, > > > > I have problem with my samba. I have shared folder...
2001 Nov 13
2
direct write patch
...tf(FINFO,"recv_files(%d) starting\n",flist->count); @@ -404,22 +407,29 @@ buf = NULL; } - if (!get_tmpname(fnametmp,fname)) { - if (buf) unmap_file(buf); - if (fd1 != -1) close(fd1); - continue; - } + if(direct_write) { + fnametmp = fname; + write_flags = O_WRONLY|O_CREAT; + } else { + fnametmp = fnametmpbuf; + if (!get_tmpname(fnametmp,fname)) { + if (buf) unmap_file(buf); + if (fd1 != -1) close(fd1); + continue; + } + write_flags = O_WRONLY|O_CREAT|O_EXCL; /* mktemp is deliberately used here instead of mkstemp. because O_EXCL is used o...