Displaying 17 results from an estimated 17 matches for "do_rmdir".
Did you mean:
do_mkdir
2007 Apr 03
0
Modifications to NOT recursively make_backup
...mp; zap_dir)) {
ok = 0;
errno = ENOTEMPTY;
! } else if (make_backups && !backup_dir && !is_backup_file(fname)
- && !(flags & DEL_FORCE_RECURSE))
ok = make_backup(fname);
else
ok = do_rmdir(fname) == 0;
--- 190,198 ----
|| (dry_run && zap_dir)) {
ok = 0;
errno = ENOTEMPTY;
! } else if (make_backups)
ok = make_backup(fname);
else
ok = do_rmdir(fname) == 0;
*** rsync 2.6.6/backup.c...
2023 Feb 01
1
Hanging, uninterruptible smbd-process in "D"-state
...e topmost
element should be the task where it got stuck which is:
rwsem_down_write_slowpath which waits for getting a write lock semaphore:
cat /proc/10193/stack
[<0>] rwsem_down_write_slowpath+0x2e2/0x620
[<0>] nfs_rmdir+0x117/0x1b0 [nfs]
[<0>] vfs_rmdir+0x7c/0x1b0
[<0>] do_rmdir+0x216/0x230
[<0>] do_syscall_64+0x5b/0x80
[<0>] entry_SYSCALL_64_after_hwframe+0x61/0xcb
The strange is that all of a sudden this setup (nfsserver+samba-client)
fails, where it has worked for 10 years without any trouble.
Thanks
Rainer
Am 01.02.23 um 11:38 schrieb Ralph Boehme via s...
2012 Oct 23
4
Disable rm on sftp
Hi,
Thanks a lot for this great software :)
I'm trying to do something to secure my server. I need to disable removing
file or removing directory using SFTP. In other words, the user can only
write, move but not delete the file. This will be used to store logs so, I
need to make sure once the logs written to my server the user cannot remove
it.
I tried doing this by changing the code of
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...+61,8 @@
return lchown(path, owner, group);
}
-#if HAVE_MKNOD
-int do_mknod(char *pathname, mode_t mode, dev_t dev)
+#ifdef HAVE_MKNOD
+int do_mknod(const char *pathname, mode_t mode, dev_t dev)
{
if (dry_run) return 0;
CHECK_RO
@@ -67,14 +70,14 @@
}
#endif
-int do_rmdir(char *pathname)
+int do_rmdir(const char *pathname)
{
if (dry_run) return 0;
CHECK_RO
return rmdir(pathname);
}
-int do_open(char *pathname, int flags, mode_t mode)
+int do_open(const char * pathname, int flags, mode_t mode)
{
if (flags != O_RDONLY) {...
2003 Sep 05
1
new option suggestion '--backup-only'
...al filesystem */
case EXDEV:
@@ -225,7 +231,8 @@
}
}
kept = 1;
- do_unlink(fname);
+ if (!backup_only)
+ do_unlink(fname);
}
#endif
@@ -233,11 +240,11 @@
/* make an empty directory */
make_bak_dir(fname, backup_dir);
do_mkdir(keep_name, file->mode);
- ret_code = do_rmdir(fname);
- if(verbose>2) {
- rprintf(FINFO, "make_backup : RMDIR %s returns %i\n",
- fname, ret_code);
+ if (!backup_only) {
+ ret_code=do_rmdir(fname);
+ if(verbose>2)
+ rprintf(FINFO,"make_backup : RMDIR %s returns %i\n",fname,ret_code);
}
kept =...
2011 Aug 23
0
[PATCH] Btrfs: fix an oops when deleting snapshots
...one
$ rm -fr /mnt/btrfs/*
$ rm -fr /mnt/btrfs/*
then we''ll get
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:2264!
[...]
Call Trace:
[<ffffffffa05578c7>] btrfs_rmdir+0xf7/0x1b0 [btrfs]
[<ffffffff81150b95>] vfs_rmdir+0xa5/0xf0
[<ffffffff81153cc3>] do_rmdir+0x123/0x140
[<ffffffff81145ac7>] ? fput+0x197/0x260
[<ffffffff810aecff>] ? audit_syscall_entry+0x1bf/0x1f0
[<ffffffff81153d0d>] sys_unlinkat+0x2d/0x40
[<ffffffff8147896b>] system_call_fastpath+0x16/0x1b
RIP [<ffffffffa054f7b9>] btrfs_orphan_add+0x179/0x1a0 [btrfs]...
2005 May 18
1
Possible bug - delete complains about parent directory in new version
I have what I believe to be a bug in the behavior of the current (2.6.4)
version of rsync. While trying to upgrade from version 2.5.2 to the
current version (for security concerns), I noticed the following
difference in behavior between the two versions which is preventing the
upgrade:
If you have a directory tree on the target such as the following:
dir/pdf/file1.pdf
dir/pdf/file2.pdf
2008 Feb 15
4
Revised flags patch
...);
+void undo_make_mutable(const char *fname, mode_t mode, uint32 fileflags);
int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
const char *fnamecmp, int flags);
RETSIGTYPE sig_int(UNUSED(int val));
@@ -296,6 +298,7 @@ int do_mknod(const char *pathname, mode_
int do_rmdir(const char *pathname);
int do_open(const char *pathname, int flags, mode_t mode);
int do_chmod(const char *path, mode_t mode);
+int do_chflags(const char *path, u_long flags);
int do_rename(const char *fname1, const char *fname2);
void trim_trailing_slashes(char *name);
int do_mkdir(char *fnam...
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...; int do_link(const char *fname1, const char *fname2);
> -int do_lchown(const char *path, uid_t owner, gid_t group);
> +int do_lchown(const char *path, uid_t owner, gid_t group, mode_t
> mode, uint32 fileflags);
> int do_mknod(const char *pathname, mode_t mode, dev_t dev);
> int do_rmdir(const char *pathname);
> int do_open(const char *pathname, int flags, mode_t mode);
> -int do_chmod(const char *path, mode_t mode);
> +int do_chmod(const char *path, mode_t mode, uint32 fileflags);
> +int do_chflags(const char *path, uint32 fileflags);
> int do_rename(const char *f...
2009 Nov 10
12
[RFC] big fat transaction ioctl
...48,7 @@ SYSCALL_DEFINE2(mkdir, const char __user *, pathname, int, mode)
{
return sys_mkdirat(AT_FDCWD, pathname, mode);
}
+EXPORT_SYMBOL(sys_mkdir);
/*
* We try to drop the dentry early: we should have
@@ -2262,6 +2263,7 @@ SYSCALL_DEFINE1(rmdir, const char __user *, pathname)
{
return do_rmdir(AT_FDCWD, pathname);
}
+EXPORT_SYMBOL(sys_rmdir);
int vfs_unlink(struct inode *dir, struct dentry *dentry)
{
@@ -2369,6 +2371,7 @@ SYSCALL_DEFINE1(unlink, const char __user *, pathname)
{
return do_unlinkat(AT_FDCWD, pathname);
}
+EXPORT_SYMBOL(sys_unlink);
int vfs_symlink(struct inode...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...-1) {
reply_with_error ("%s", err);
free (out);
diff --git a/daemon/dir.c b/daemon/dir.c
index 3b18d48..aed45d6 100644
--- a/daemon/dir.c
+++ b/daemon/dir.c
@@ -29,6 +29,8 @@
#include "daemon.h"
#include "actions.h"
+GUESTFSD_EXT_CMD(str_rm, rm);
+
int
do_rmdir (const char *path)
{
@@ -67,7 +69,7 @@ do_rm_rf (const char *path)
return -1;
}
- r = command (NULL, &err, "rm", "-rf", buf, NULL);
+ r = command (NULL, &err, str_rm, "-rf", buf, NULL);
free (buf);
/* rm -rf is never supposed to fail. I/O...
2012 Aug 30
1
[PATCH] collect list of called external commands
...= -1) {
reply_with_error ("%s", err);
free (out);
diff --git a/daemon/dir.c b/daemon/dir.c
index 3b18d48..6ddc8a4 100644
--- a/daemon/dir.c
+++ b/daemon/dir.c
@@ -29,6 +29,8 @@
#include "daemon.h"
#include "actions.h"
+GUESTFS_EXT_CMD(str_rm, rm);
+
int
do_rmdir (const char *path)
{
@@ -67,7 +69,7 @@ do_rm_rf (const char *path)
return -1;
}
- r = command (NULL, &err, "rm", "-rf", buf, NULL);
+ r = command (NULL, &err, str_rm, "-rf", buf, NULL);
free (buf);
/* rm -rf is never supposed to fail. I/O...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...{
reply_with_error ("%s", err);
free (out);
diff --git a/daemon/dir.c b/daemon/dir.c
index 07dc68f17..b79aca1e5 100644
--- a/daemon/dir.c
+++ b/daemon/dir.c
@@ -29,8 +29,6 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_rm, rm);
-
int
do_rmdir (const char *path)
{
@@ -69,7 +67,7 @@ do_rm_rf (const char *path)
return -1;
}
- r = command (NULL, &err, str_rm, "-rf", buf, NULL);
+ r = command (NULL, &err, "rm", "-rf", buf, NULL);
/* rm -rf is never supposed to fail. I/O errors perhaps? *...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...r);
free (out);
diff --git a/daemon/dir.c b/daemon/dir.c
index 07dc68f17..4f4ba207e 100644
--- a/daemon/dir.c
+++ b/daemon/dir.c
@@ -29,7 +29,7 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_rm, rm);
+DECLARE_EXTERNAL_COMMANDS ("rm")
int
do_rmdir (const char *path)
@@ -69,7 +69,7 @@ do_rm_rf (const char *path)
return -1;
}
- r = command (NULL, &err, str_rm, "-rf", buf, NULL);
+ r = command (NULL, &err, "rm", "-rf", buf, NULL);
/* rm -rf is never supposed to fail. I/O errors perhaps? */...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’