search for: o_append

Displaying 20 results from an estimated 108 matches for "o_append".

2007 Apr 07
8
How to get rid of locks
Although Dovecot is already read-lockless and it uses only short- lived write locks, it's be really nice to just get rid of the locking completely. :) I just figured out that O_APPEND is pretty great. If the operating system updates seek position after writing to a file opened with O_APPEND, writes to Dovecot's transaction log file can be made lockless. I see that this works with Linux and Solaris, but not with OS X. Could you BSD people try if it works there? http:/...
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 &q...
2003 Nov 17
1
rsync --daemon and logfile that can't be created
...hatsoever, as rsync forks itself into the background before checking the config, opening the log file, etc. Worse still, it gets a SIGSEGV, and dumps core. Here's a strace from a fairly recent CVS: 15154 umask(022) = 0 15154 open("/var/log/rsync/log", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 ENOTDIR (Not a directory) 15154 umask(0) = 022 15154 umask(022) = 0 15154 open("/var/log/rsync/log", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 ENOTDIR (Not a directory) 15154 umask(0)...
2007 Dec 19
2
maildirsize quota counting locking account?
Hi, I've just straced a dovecot imap process and found one thread sitting there doing hundreds and hundreds of maildirsize updates as follows: > > open("/home/virtual/mydomain.com/home/admin/Maildir/maildirsize", O_RDWR|O_APPEND) = 7 > read(7, "10485760000S\n1562717408 107547\n-"..., 5120) = 2446 > read(7, "", 2674) = 0 > write(1, "* 1810 FETCH (UID 1815 RFC822.SI"..., 2031) = 2031 > setsockopt(1, SOL_TCP, TCP_CORK, [0], 4) = 0 > epoll_wait(4, {{EPOLLIN, {u...
2013 Nov 22
4
[PATCH 0/2] libxl/xl: two more coverity related fixes
The first patch is a leftover from the switch to libxl__create_qemu_logfile, and while there it also handles possible errors when opening /dev/null. The second one is a fix for the issues present in do_daemonize. Thanks, Roger.
2003 Oct 24
0
pam_smbpass can't find password database
...= 0 13820: close(3) = 0 13820: sigaction(SIGPIPE, 0xFFBEFA98, 0xFFBEFB1C) = 0 13820: time() = 1067009197 13820: umask(022) = 022 13820: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT 13820: umask(022) = 022 13820: umask(022) = 022 13820: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT 13820: umask(022) = 022 13...
2006 Oct 25
2
Re: [Xen-staging] [xen-unstable] [XEND] Open xend-debug.log in append mode.
...-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) > + os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT| > os.O_APPEND) &gt...
2016 May 05
3
pread() failures when using mdbox on btrfs
(Note: I am not subscribed to this ML, so please be sure to CC me in replies.) Hello, I see a strange bug when running dovecot under btrfs with a mailbox in mdbox format. At some point, which can take a few minutes or more than a day, dovecot starts logging pread() failures, like so: Apr 02 23:43:42 thetick dovecot[570]: imap(marcec): Error: pread() failed with file
2015 Jul 13
2
Bug#784880: [PATCH for-4.6] tools: libxl: Handle failure to create qemu dm logfile
..._create_qemu_logfile(libxl__gc *gc, char *name) { char *logfile; - int logfile_w; + int rc, logfile_w; + + rc = libxl_create_logfile(CTX, name, &logfile); + if (rc) return rc; - libxl_create_logfile(CTX, name, &logfile); logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644); free(logfile); -- 2.1.4
2007 Aug 09
1
Mails causing imap process to hang.
...e(1, " * 4 0 F E T C H (".., 36) = 36 sendfilev64(1, 1, 0xFFBFF2C0, 1, 0xFFBFF2B4) = 65536 close(10) = 0 close(8) = 0 open64("/var/qmail/maildirs/09/44/XXXXXX/Maildir/maildirsize", O_RDWR|O_APPEND) = 8 read(8, " 1 0 4 8 5 7 6 0 S\n 6 4".., 5120) = 1188 read(8, 0xFFBFE3FC, 3932) = 0 write(1, " )\r\n 0 0 0 0 0 0 1 0 ".., 33) = 33 pollsys(0x000B0378, 3, 0xFFBFF888, 0x00000000) = 1 read(0, " 0 0 0 0 0 0 1 1 F E T".., 2769) = 42...
2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
..., req); > > > + > > > + type = le16_to_cpu(req->type); > > > + > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > + flags |= O_TRUNC; > > > + } else if (type == VIRTIO_PSTORE_TYPE_CONSOLE) { > > > + flags |= O_APPEND; > > > + } > > > + > > > + fd = open(path, flags, 0644); > > > + if (fd < 0) { > > > + error_report("cannot open %s", path); > > > + return -1; > > > + } > > > + len = writev(fd, out_sg...
2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
..., req); > > > + > > > + type = le16_to_cpu(req->type); > > > + > > > + if (type == VIRTIO_PSTORE_TYPE_DMESG) { > > > + flags |= O_TRUNC; > > > + } else if (type == VIRTIO_PSTORE_TYPE_CONSOLE) { > > > + flags |= O_APPEND; > > > + } > > > + > > > + fd = open(path, flags, 0644); > > > + if (fd < 0) { > > > + error_report("cannot open %s", path); > > > + return -1; > > > + } > > > + len = writev(fd, out_sg...
1996 Nov 26
7
denial of service attack on login
Hi, I''ve been writing a login application to utilize the features of both PAM and libpwdb. Not surprisingly, this has meant looking at some old code.. The following denial of service attack seems to work quite nicely on my ancient Red Hat 3.0.3 system with the standard login application. Perhaps this is not a problem with 4.0? Does anyone know about other distributions? joe$ nvi
2007 Mar 02
2
maildirsize corruption
Using maildir++ with LDA and POP/IMAP we have been seeing intermittant maildirsize corruption. Where an operation will be prepended by a handful of ASCI null characters ^@^@. Eg: # cat maildirsize 5120000S -46895 -1 93359 1 60576 1 2858 1 49547 1 -206340 -4 94603 1 84785 1 54463 1 82486 1 97104 1 ^@^@^@^@^@^@^@^@40488 1 73397 1 83662 1 24668 1 42673 1 12081 1 -713606 -12 The instances of this
2007 Jan 24
1
too many open files error when using quota plugin
...ls on it (fetches all messages). Watching an strace on the imap process I'm connected to, the problem seems to be when the plugin goes to close the maildirsize file, it's not closing the correct file descriptor: open("/var/mailstore/01/1a/301620/Maildir/./maildirsize", O_RDWR|O_APPEND) = 1016 read(1016, "1024S\n395 1\n397 1\n", 5120) = 18 read(1016, "", 5102) = 0 close(4294967295) = -1 EBADF (Bad file descriptor) It closes that same descriptor every time. On a side note, I'm just curious why it needs to read t...
2004 Jul 21
0
pam_smbpass: Cannot access samba password database
...se" messages in the syslog. I ran my test code using "truss" and there are some interesting open() calls: --------------------------------------------------------------------- 20247: open64("/secrets.tdb", O_RDWR|O_CREAT, 0600) = 3 20247: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT 20247: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT --------------------------------------------------------------------- I _know_ that my private directory is not set to "/". And what are those attempts to open ""? Th...
1996 Nov 29
1
Denial of service.
There are conflicting reports about wether or not Red Hat 4.0 is vulnerable to the login-lockout described earlier. I have the impression that if you install the updates it will have been fixed. Approval of messages about this subject is now restricted to "here is a patch", and a vendors "We have made a patch available". Roger.
2011 Jun 03
1
[PATCH] JOBS: fix klibc DEBUG compilation
...2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/show.c b/src/show.c index 14dbef3..b4160e1 100644 --- a/src/show.c +++ b/src/show.c @@ -394,7 +394,9 @@ opentrace(void) if ((flags = fcntl(fileno(tracefile), F_GETFL, 0)) >= 0) fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND); #endif +#ifndef SMALL setlinebuf(tracefile); +#endif /* SMALL */ fputs("\nTracing started.\n", tracefile); } #endif /* DEBUG */ -- 1.7.4.4
2003 Apr 05
1
flock a file in a NT server
...is released but given full access to it. I suppose it is a matter of configuration of my clients but what should I use to get propper file locking? Windows machines lock without problems. Here it is a short verson of the test program I'm using: f=open("/mnt/smb/file",O_RDWR|O_CREAT|O_APPEND,S_IRUSR|S_IWUSR); if (flock(f, LOCK_EX)) { printf("Error locking"); exit; } printf("Text: "); scanf("%s",c); strcat(c,"\n"); write(f,c,strlen(c)); printf("Say something to quit: "); scanf("%s",c); if (flock(f, LOCK_UN)) { printf(&quo...
2013 Oct 14
0
[PATCH-resend] Implement SSH2_FXF_APPEND
...14 diff -u -p -r1.114 sftp-server.c --- sftp-server.c 1 Jun 2013 21:31:19 -0000 1.114 +++ sftp-server.c 30 Sep 2013 08:16:57 -0000 @@ -130,6 +130,8 @@ flags_from_portable(int pflags) } else if (pflags & SSH2_FXF_WRITE) { flags = O_WRONLY; } + if (pflags & SSH2_FXF_APPEND) + flags |= O_APPEND; if (pflags & SSH2_FXF_CREAT) flags |= O_CREAT; if (pflags & SSH2_FXF_TRUNC) @@ -156,6 +158,8 @@ string_from_portable(int pflags) PAPPEND("READ") if (pflags & SSH2_FXF_WRITE) PAPPEND("WRITE") + if (pflags & SSH2_FXF_APPEND) + PAPPEND("APPEND&...