Displaying 20 results from an estimated 28 matches for "new_root".
Did you mean:
need_root
2001 Jan 03
1
chroot.diff
...openssh-2.3.0p1-chroot/session.c Wed Jan 3 19:29:11 2001
@@ -159,6 +159,8 @@
static login_cap_t *lc;
#endif
+#define CHROOT
+
/*
* Remove local Xauthority file.
*/
@@ -1011,6 +1013,10 @@
extern char **environ;
struct stat st;
char *argv[10];
+#ifdef CHROOT
+ char *user_dir;
+ char *new_root;
+#endif /* CHROOT */
#ifdef WITH_IRIX_PROJECT
prid_t projid;
#endif /* WITH_IRIX_PROJECT */
@@ -1076,6 +1082,26 @@
# else /* HAVE_LOGIN_CAP */
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));
+# ifdef CHROOT
+ user_dir = xstrdup(pw-&...
2010 May 19
10
R: default subvolume abilities/restrictions
Hi Anthony,
I think that for you may be interested to read this thread
http://kerneltrap.org/mailarchive/linux-btrfs/2009/11/20/6588643/thread
and to read a my blog about this argument
http://kreijack.blogspot.com/2010/01/linux-btrfs-example-of-layout.html
Regards
Goffredo
>----Messaggio originale----
>Da: anthony@extof.me
>Data: 19/05/2010 8.50
>A:
2001 Dec 18
1
chroot howto for sftp-server
...@@
#include "sftp.h"
#include "sftp-common.h"
+#define CHROOT
+
/* helper */
#define get_int64() buffer_get_int64(&iqueue);
#define get_int() buffer_get_int(&iqueue);
@@ -1008,6 +1010,36 @@
}
}
+#ifdef CHROOT
+void
+chroot_init(void)
+{
+ char *user_dir, *new_root;
+
+ user_dir = getenv("HOME");
+
+ if (!user_dir)
+ fatal("HOME isn't in environment");
+
+ new_root = user_dir + 1;
+
+ while ((new_root = strchr(new_root, '.')) != NULL) {
+ new_root--;
+ if (strncmp(new_root, "/./", 3) == 0) {
+ *new_root = '\0...
2003 Dec 26
1
[Bug 779] Chroot environment for sftp client crazy
...ad /home/user/htdocs/folder
4.- The same occur if it is a file name.
I have changed session.c file with this lines to chroot environment for aix:
+1228 do_setusercontext(struct passwd *pw)
+1229 {
+1230
+1231 /* CHROOT patch start */
+1232
+1233 char *user_dir;
+1234 char *new_root;
+1235
+1236 user_dir = xstrdup(pw->pw_dir);
+1237 new_root = user_dir + 1;
+1238
+1239 while((new_root = strchr(new_root, '.')) != NULL) {
+1240 new_root--;
+1241 if(strncmp(new_root, "/./", 3) == 0) {
+1242 *new_root = '\0'...
2001 Jul 20
0
Updated chroot patch
...ion.c Fri Jul 20 01:40:33 2001
@@ -93,6 +93,9 @@
# include <uinfo.h>
#endif
+/* support /./ in homedir */
+#define DOT_CHROOT
+
/* types */
#define TTYSZ 64
@@ -1037,6 +1040,10 @@
extern char **environ;
struct stat st;
char *argv[10];
+#ifdef DOT_CHROOT
+ char *user_dir;
+ char *new_root;
+#endif
int do_xauth = s->auth_proto != NULL && s->auth_data != NULL;
#ifdef WITH_IRIX_PROJECT
prid_t projid;
@@ -1093,6 +1100,25 @@
# ifdef HAVE_GETUSERATTR
set_limits_from_userattr(pw->pw_name);
# endif /* HAVE_GETUSERATTR */
+# ifdef DOT_CHROOT
+ user_dir = xstrdup...
2001 Nov 17
4
Updated chroot patch
...Sep 16 15:17:15 2001
+++ session.c.patched Sat Oct 6 11:23:19 2001
@@ -92,6 +92,8 @@
# include <uinfo.h>
#endif
+#define CHROOT
+
/* types */
#define TTYSZ 64
@@ -1028,6 +1030,11 @@
extern char **environ;
struct stat st;
char *argv[10];
+#ifdef CHROOT
+ char *user_dir;
+ char *new_root;
+#endif /* CHROOT */
+
int do_xauth;
#ifdef WITH_IRIX_PROJECT
prid_t projid;
@@ -1102,6 +1109,28 @@
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));
+
+#ifdef CHROOT
+ user_dir = xstrdup(pw->pw_dir);
+ new_root = user_dir + 1;...
2001 May 24
1
chroot sftp-server [PATCH]
I'm working on setting up a semi-trusted sftp service, and to get it
working, I need chroot capability.
I've taken the /./ wuftpd magic token code from contrib/chroot.diff and
put it into the sftp server. The main problem is that privileges have
been dropped by the time the subsystem is exec'ed, so my patch requires
that sftp-server be setuid root. Not ideal, I know, but I drop all
2001 Apr 22
1
relaxing access rights verifications
...1
+++ openssh-2.5.2p2/session.c Fri Apr 20 15:45:09 2001
@@ -93,6 +93,8 @@
# include <uinfo.h>
#endif
+#define CHROOT
+
/* types */
#define TTYSZ 64
@@ -1012,6 +1014,10 @@
extern char **environ;
struct stat st;
char *argv[10];
+#ifdef CHROOT
+ char *user_dir;
+ char *new_root;
+#endif /* CHROOT */
int do_xauth = s->auth_proto != NULL && s->auth_data != NULL;
#ifdef WITH_IRIX_PROJECT
prid_t projid;
@@ -1085,6 +1091,28 @@
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));
+
+#ifdef CHROOT
+ use...
2010 Oct 30
0
[PATCH] Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) - generated by Coccinelle
...node);
goto out;
}
em = rb_entry(rb_node, struct extent_map, rb_node);
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index ebe46c6..1bc7a0a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -380,7 +380,7 @@ static struct dentry *get_default_root(struct super_block *sb,
find_root:
new_root = btrfs_read_fs_root_no_name(root->fs_info, &location);
if (IS_ERR(new_root))
- return ERR_PTR(PTR_ERR(new_root));
+ return ERR_CAST(new_root);
if (btrfs_root_refs(&new_root->root_item) == 0)
return ERR_PTR(-ENOENT);
--
Chris Samuel : http://www.csamuel.org/ : Melb...
2011 Apr 06
3
[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set
...ACTIVE;
}
- root = get_default_root(s, subvol_objectid);
- if (IS_ERR(root)) {
- error = PTR_ERR(root);
- deactivate_locked_super(s);
- goto error_free_subvol_name;
- }
/* if they gave us a subvolume name bind mount into that */
if (strcmp(subvol_name, ".")) {
struct dentry *new_root;
+
+ root = get_default_root(s, subvol_rootid);
+ if (IS_ERR(root)) {
+ error = PTR_ERR(root);
+ deactivate_locked_super(s);
+ goto error_free_subvol_name;
+ }
+
mutex_lock(&root->d_inode->i_mutex);
new_root = lookup_one_len(subvol_name, root,
strlen(subvol_nam...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...diff -urp btrfs-progs-unstable/ctree.c btrfs-progs-2/ctree.c
--- btrfs-progs-unstable/ctree.c 2009-01-08 08:30:09.752081135 +0800
+++ btrfs-progs-2/ctree.c 2009-05-01 14:07:13.000000000 +0800
@@ -85,6 +85,7 @@ int btrfs_copy_root(struct btrfs_trans_h
int ret = 0;
int level;
struct btrfs_root *new_root;
+ struct btrfs_disk_key disk_key;
new_root = kmalloc(sizeof(*new_root), GFP_NOFS);
if (!new_root)
@@ -98,8 +99,12 @@ int btrfs_copy_root(struct btrfs_trans_h
WARN_ON(root->ref_cows && trans->transid != root->last_trans);
level = btrfs_header_level(buf);
- cow = btrfs_a...
2013 May 07
2
[PATCH] Btrfs: fix passing wrong arg gfp_t to decide the correct allocation mode
...o, GFP_ATOMIC, &tm);
if (ret < 0)
goto out;
@@ -679,7 +679,7 @@ __tree_mod_log_free_eb(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
static noinline int
tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
struct extent_buffer *old_root,
- struct extent_buffer *new_root, gfp_t flags,
+ struct extent_buffer *new_root,
int log_removal)
{
struct tree_mod_elem *tm;
@@ -691,7 +691,7 @@ tree_mod_log_insert_root(struct btrfs_fs_info *fs_info,
if (log_removal)
__tree_mod_log_free_eb(fs_info, old_root);
- ret = tree_mod_alloc(fs_info, flags, &tm);
+ r...
2002 Jul 04
4
Chroot patch (v3.4p1)
...lude <windows.h>
@@ -64,6 +66,8 @@
#define is_winnt (GetVersion() < 0x80000000)
#endif
+#define CHROOT
+
/* func */
Session *session_new(void);
@@ -1160,6 +1164,12 @@
do_setusercontext(struct passwd *pw)
{
char tty='\0';
+ int i;
+#ifdef CHROOT
+ char *new_root = "/";
+ const char *hostname = NULL;
+ const char *ipaddr = NULL;
+#endif /* CHROOT */
#ifdef HAVE_CYGWIN
if (is_winnt) {
@@ -1187,6 +1197,26 @@
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));
+#ifdef CHROOT
+
+ if...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32
times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the
extent buffer while we look for readahead targets. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ctree.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git
2000 Aug 26
0
New chroot patch, for 2.1.1p4
...openssh-2.1.1p4/session.c openssh-2.1.1p4-chroot/session.c
--- openssh-2.1.1p4/session.c Wed Jul 12 00:45:27 2000
+++ openssh-2.1.1p4-chroot/session.c Sat Aug 26 01:28:06 2000
@@ -897,6 +897,10 @@
extern char **environ;
struct stat st;
char *argv[10];
+#ifdef CHROOT
+ char *user_dir;
+ char *new_root;
+#endif /* CHROOT */
#ifdef WITH_IRIX_PROJECT
prid_t projid;
#endif /* WITH_IRIX_PROJECT */
@@ -922,6 +926,25 @@
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));
#endif
+#ifdef CHROOT
+ user_dir = xstrdup(pw->pw_dir);
+ new_root = user_dir...
2012 Feb 10
0
[PATCH] btrfs: honor umask when creating subvol root
...tions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 32214fe..b88e71a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6696,8 +6696,10 @@ int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
int err;
u64 index = 0;
- inode = btrfs_new_inode(trans, new_root, NULL, "..", 2, new_dirid,
- new_dirid, S_IFDIR | 0700, &index);
+ inode = btrfs_new_inode(trans, new_root, NULL, "..", 2,
+ new_dirid, new_dirid,
+ S_IFDIR | (~current_umask() & S_IRWXUGO),
+ &index);
if (IS_ERR(inode))
return PTR_ERR(inode);
inod...
2008 May 24
1
to_xml for Foo::Bar active records
20 / 20 hind sight, I would probably do things different today but I
have most of my active record classes under different parent classes.
For example:
module Foo
class Bar < ActiveRecord::Base
...
end
end
The to_xml for this produces <foo/bar> .... </foo/bar>
The / in a tag name is not allowed. Questions:
1) Is this a bug?
2) If so, suggestion of what to convert it to?
2007 Dec 29
5
Directories Used by Asterisk
I successfully obtained the Asterisk code and extracted them into /usr/src.
When I make and install asterisk, zaptel, libpri etc. Are they supposed to
move automatically into their respective directories?
I cannot find:
/etc/asterisk/
/usr/lib/asterisk/modules/
/var/lib/asterisk
Do I have to manually create them or this is failed install? Thanks.
-------------- next part --------------
An
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...(trans, tree_root, name, namelen, objectid,
+ ret = btrfs_insert_inode_ref(trans, tree_root, name, strlen(name),
+ objectid,
btrfs_super_root_dir(&fs_info->super_copy));
if (ret)
goto fail;
@@ -1030,9 +1061,8 @@ struct btrfs_root *create_subvol(struct
BUG_ON(ret);
new_root = btrfs_read_fs_root(fs_info, &location);
- if (!new_root) {
- return NULL;
- }
+ if (!new_root || IS_ERR(new_root))
+ goto fail;
trans = btrfs_start_transaction(new_root, 1);
BUG_ON(!trans);
@@ -1145,38 +1175,69 @@ err:
}
/*
- * Migrate super block to it's default position.
- * T...
2002 Aug 08
0
Probable bug in Chroot patch (v3.4p1)
...root(new_home) == -1) {
/* continue to try to use freed memory block pointed to by 'new_home' */
fatal("chroot to %s failed: %s",
new_home, strerror(errno));
/* continue to try to use freed memory block pointed to by 'new_home' */
}
else
pw->pw_dir = new_root;
}
}
====================================================
Kent Wick, TxMHMR, Unix/Network Systems Programmer
Email: kent.wick at mhmr.state.tx.us
Phone: (512) 206-5931 Fax: (512) 206-4838
Snail mail: PO Box 12668, Austin, Tx 78711-2668