Displaying 20 results from an estimated 65 matches for "enotdir".
2010 Sep 23
2
rename(2) errno processing
...ting a Unix environment on Windows. The code configured easily and compiled without any modifications or ifdef's added to the code.
The backup test was failing because it didn't create a subdirectory. In tracing the code I realized the problem was in robust_move() in backup.c. UWIN returns ENOTDIR, when the rename(2) is called when a directory component is not in the new pathname. According to the Open Group website this is a valid errno value. The code in robust_move() only checked for ENOENT. When I added checking for ENOTDIR, the backup test passes.
I suggest changing lines 192 and 264 o...
2003 Nov 17
1
rsync --daemon and logfile that can't be created
...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) = 022
15154 getpid()...
2006 Aug 06
1
How to use omega to search remote back end?
...ontaining_Xapian_da"..., 8192) = 404
read(3, "", 4096) = 0
read(3, "", 8192) = 0
close(3) = 0
munmap(0x40018000, 4096) = 0
stat64("/svr/xapian/stub/default", 0xbfffecb0) = -1 ENOTDIR (Not a directory)
stat64("/svr/xapian/stub/default/record_DB", 0xbfffecb0) = -1 ENOTDIR (Not a directory)
stat64("/svr/xapian/stub/default/iamflint", 0xbfffecb0) = -1 ENOTDIR (Not a directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Return 126 on most errors in shellexec
...a332ebdaa13d3eaf70082e1be214c42645bc186a ]
Currently when shellexec fails on most errors the shell will exit
with exit status 2. This patch changes it to 126 in order to avoid
ambiguities with the exit status from a successful exec.
The errors that result in 127 has also been expanded to include
ENOTDIR, ENAMETOOLONG and ELOOP.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/exec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index e9e29b7e.....
2013 Feb 07
1
[PATCH] New API: is_whole_device
...LL;
+ if (asprintf (&devpath, "/sys/block/%s/device",
+ device + strlen (PREFIX)) == -1)
+ {
+ reply_with_perror ("asprintf");
+ return -1;
+ }
+
+ struct stat statbuf;
+ if (stat (devpath, &statbuf) == -1) {
+ if (errno == ENOENT || errno == ENOTDIR) return 0;
+
+ reply_with_perror ("stat");
+ return -1;
+ }
+
+ return 1;
+}
+
+int
do_device_index (const char *device)
{
size_t i;
diff --git a/generator/actions.ml b/generator/actions.ml
index 96702f7..711f97e 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@...
2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
...should either
+ * a. be owner of dir, or
+ * b. be owner of victim, or
+ * c. have CAP_FOWNER capability
+ * 6. If the victim is append-only or immutable we can''t do antyhing with
+ * links pointing to it.
+ * 7. If we were asked to remove a directory and victim isn''t one - ENOTDIR.
+ * 8. If we were asked to remove a non-directory and victim isn''t one - EISDIR.
+ * 9. We can''t remove a root or mountpoint.
+ * 10. We don''t allow removal of NFS sillyrenamed files; it''s handled by
+ * nfs_async_unlink().
+ */
+
+static int btrfs_may_del...
2006 Feb 20
1
DO NOT REPLY [Bug 3527] New: rsync: tries to chdir() into a device
...86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned@samba.org
ReportedBy: philipp.marek@bmlv.gv.at
QAContact: rsync-qa@samba.org
With the following test-script I get an error of ENOTDIR; see
below for strace. It runs on an shmfs, and that may be some cause
for that bug, because previously it ran on a normal ext3 partition and
I didn't see this message.
The script makes some files, devices, symlinks and directories; then changes
the type of nearly all entries and tries to co...
2016 May 21
1
[PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7.
...p;
+ CLEANUP_FREE char *path = NULL, *line = NULL;
+ size_t allocsize;
+ ssize_t len;
+ unsigned int mask;
+ bool found = false;
+
+ path = safe_asprintf (g, "/proc/%d/status", getpid ());
+ fp = fopen (path, "r");
+ if (fp == NULL) {
+ if (errno == ENOENT || errno == ENOTDIR)
+ return -2; /* fallback */
+ perrorf (g, "open: %s", path);
+ return -1;
+ }
+
+ while ((len = getline (&line, &allocsize, fp)) != -1) {
+ if (len > 0 && line[len-1] == '\n')
+ line[--len] = '\0';
+
+ /* Looking f...
2018 May 18
9
[Bug 13445] New: Fuzzy searching in link-dest tries to open regular file as directory
...normal
Priority: P5
Component: core
Assignee: wayned at samba.org
Reporter: alguien at respiranto.de
QA Contact: rsync-qa at samba.org
Created attachment 14205
--> https://bugzilla.samba.org/attachment.cgi?id=14205&action=edit
Patch to handle ENOTDIR in flist.c:send_directory()
If rsync is called with doubled --fuzzy flag and --link-dest
(or --compare-dest, --copy-dest), it fails in a situation as described below.
The problem appears in both version 3.1.3 and the current development version
3.1.4dev.
Let there be the following directory stru...
2005 Jul 12
1
problem mounting ocfs2: heartbeat
When attempting to mount the OCFS2 file system I'm getting the
following error message:
ocfs2_hb_ctl: Internal logic failure while starting heartbeat
mount.ocfs2: Error when attempting to run /sbin/ocfs2_hb_ctl:
"Operation not permitted"
I followed the steps given in the users_guide:
modprobe ocfs2_dlmfs
mount -t configfs none /config
mount -t ocfs2_dlmfs none /dlm
o2cb_ctl
2011 Feb 27
4
[PATCH] Add minimal mkstemp(3) implementation.
...y */
+ cp = sp;
+ while (cp > template && *cp != '/')
+ --cp;
+ if (cp > template) {
+ *cp = '\0';
+ i = stat(template, &sbuf);
+ *cp = '/';
+
+ if (i != 0)
+ /* stat failed, pass errno */
+ return (-1);
+ if (!S_ISDIR(sbuf.st_mode)) {
+ errno = ENOTDIR;
+ return (-1);
+ }
+ }
+
+ while (1) {
+ if ((i = open(template, O_CREAT|O_EXCL|O_RDWR, 0600)) >= 0 ||
+ errno != EEXIST)
+ break;
+
+ while (*cp == 'Z')
+ if (!*++cp)
+ return (-1);
+ if (*cp == 'z')
+ *cp = 'A';
+ else
+ ++*cp;
+ }
+ return (i);...
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...2.cs_bounce, tpath, __com32.cs_bounce_size);
regs.eax.w[0] = 0x0020;
regs.esi.w[0] = OFFS(__com32.cs_bounce);
@@ -34,6 +45,10 @@ DIR *opendir(const char *pathname)
newdir->dd_fd = regs.esi.w[0];
newdir->dd_sect = regs.eax.l;
newdir->dd_stat = 0;
+ errno = 0;
+ } else {
+ /* ENOTDIR is another but a file must exist */
+ errno = ENOENT;
}
/* We're done */
2009 Mar 05
0
[PATCH 1/1] COM32/opendir: free for malloc
...-off-by: Gene Cumm <gene.cumm at gmail.com>
---
Matching the malloc with a free.
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
index 7063f8c..5129273 100644
--- a/com32/lib/opendir.c
+++ b/com32/lib/opendir.c
@@ -50,6 +50,8 @@ DIR *opendir(const char *pathname)
/* ENOTDIR is another but a file must exist */
errno = ENOENT;
}
+ if (pathname != tpath)
+ free(tpath);
/* We're done */
return newdir;
2009 Mar 06
0
[PATCH 1/2] COM32/opendir: remove unneeded zeroing
...129273..fe2ee2e 100644
--- a/com32/lib/opendir.c
+++ b/com32/lib/opendir.c
@@ -44,8 +44,6 @@ DIR *opendir(const char *pathname)
strcpy(newdir->dd_name, pathname);
newdir->dd_fd = regs.esi.w[0];
newdir->dd_sect = regs.eax.l;
- newdir->dd_stat = 0;
- errno = 0;
} else {
/* ENOTDIR is another but a file must exist */
errno = ENOENT;
2011 Oct 10
1
Convert-tool maildir > mbox
...n't create mailbox Sent/test: Mailbox
doesn't allow inferior mailboxes
Error: Internal failure
Strace give show me a failure after :
access("/var/mail/example.com/user1/.Sent.test/cur", W_OK) = 0
stat("/var/mail/example.com/user1-mbox/Sent/test", 0x7fff843e73b0) = -1
ENOTDIR (Not a directory)
write(2, "Error: Mailbox conversion: Couldn"..., 103Error: Mailbox
conversion: Couldn't create mailbox Sent/test: Mailbox doesn't allow
inferior mailboxes
) = 103
lstat("/var/mail/example.com/user1/.dovecot.convert.lock",
{st_mode=S_IFREG|0644, st_si...
2009 Oct 26
2
[PATCH 0/2] New API: case_sensitive_path
This is the previously controversial 1/3 patch, split into two parts.
The first patch contains these changes from last time:
- set errno = 0 before readdir, and check for errors after
- check for other errors from the chdir call which weren't ENOTDIR
- the documentation is clarified about when you might use this function
- more comprehensive tests, including the corner cases Matt mentioned.
The second patch changes the chdir(2) implementation to use openat/
fdopendir. I'm not convinced that this is a good thing since the
chdir impleme...
2014 May 22
0
[PATCH] openssh - loginrec.c - Non-atomic file operations.
...fd = -1;
+
+ /* Try to open directory */
+ lastlog_dir = opendir(lastlog_file);
+ if (lastlog_dir != NULL) {
+ /* So. We are directory. */
+ dir_fd = dirfd(lastlog_dir);
+ snprintf(lastlog_file, sizeof(lastlog_file), "/dev/fd/%d/%s",
+ dir_fd, li->username);
+ } else if ((errno == ENOTDIR) || (errno == ENOENT)) {
+ /* Not directory. Try to open as file. */
strlcpy(lastlog_file, LASTLOG_FILE, sizeof(lastlog_file));
+ } else if (errno == EACCES) {
+ logit("%s: %.100s permission denied!", __func__,
+ LASTLOG_FILE);
+ return (0);
} else {
- logit("%s: %.100s is...
2023 Mar 19
3
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
.../f; execve_fail empty/f ENOENT
> +run "" fifo/f; execve_fail fifo/f EACCES
> ++run "" subdir/f; execve_fail subdir/f EACCES
> +run "" nxregf/f; execve_fail nxregf/f EACCES
> +run "" nxregf/f/; execve_fail nxregf/f/ ENOTDIR
> +run "" symlink/f; execve_fail symlink/f ELOOP
> @@ lib/test-fork-safe-execvpe.sh (new)
> +#
> +# Show that, if the last candidate fails execve() with an error number that
> +# would not be fatal otherwise, we do get that error number.
> -+r...
2008 Nov 29
2
My Rsync script is broken! Pls Help.
Hello everyone, First post here :-D I been looking for answers for the past 2
days but I can't find anything that will solve my problem. Hopefully this
forum will be the end of my search!
I've had an Rsync script that I wrote myself working for the past several
months. Not too long ago I had to reformat and Installed a fresh copy of
Ubuntu 8.10 (Intrepid) (Used ext3 this time around..I
2001 Sep 07
4
ext3-2.4-0.9.9
...y in the presence of software and hardware
errors, rather than forcing a panic.
* Stephen's fix for the journal_revoke assertion failure which
three people have reported.
There have been two reports of a possible interaction problem with vfat
where a readdir on the vfat mountpoint returns ENOTDIR when ext3 is
present in the kernel. This has proved elusive and in fact has
been observed on systems where ext3 was never used. It is probably
a vfat bug.
At the above website there is also a patch from Ted Ts'o which will
provide significant speedups for accessing large directories. Ted...