search for: do_rm

Displaying 5 results from an estimated 5 matches for "do_rm".

Did you mean: do_re
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
2006 Aug 02
0
[PATCH] xenstore-chmod
...-t] key [...]", progname); #elif defined(CLIENT_exists) || defined(CLIENT_list) errx(1, "Usage: %s [-h] [-s] key [...]", progname); +#elif defined(CLIENT_chmod) + errx(1, "Usage: %s [-h] [-s] key <mode [modes...]>", progname); #endif } @@ -78,10 +80,61 @@ do_rm(char *path, struct xs_handle *xsh, } #endif +#if defined(CLIENT_chmod) +#define PATH_SEP ''/'' +#define MAX_PATH_LEN 256 + +static void +do_chmod(char *path, struct xs_permissions *perms, int nperms, int upto, + int recurse, struct xs_handle *xsh, xs_transaction_t xth) +{ +...
2005 Aug 04
0
[PATCH 6/11] Xenstore watch rework
...turn; + + if (!new_directory(conn, node, NULL, 0)) { + send_error(conn, errno); + return; + } add_change_node(conn->transaction, node, false); + fire_watches(conn, node, false); send_ack(conn, XS_MKDIR); - fire_watches(conn->transaction, node, false); - return false; -} - -static bool do_rm(struct connection *conn, const char *node) +} + +static void do_rm(struct connection *conn, const char *node) { char *tmppath, *path; node = canonicalize(conn, node); - if (!check_node_perms(conn, node, XS_PERM_WRITE)) - return send_error(conn, errno); - - if (!within_transaction(conn->t...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all Im using sftp 1:4.7p1-8ubuntu1.2 in a batchjob Ive noticed that sftp needs a long time for sending a filelist. The timespan increases exponential if many files are on the remoteserver. for example "ls -la *.txt" needs 10 seconds for 2000 files but needs 50 seconds for 4000 files. For 150.000 Files i have to wait 15 minutes for example but the
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-