Displaying 20 results from an estimated 173 matches for "name_len".
2013 Nov 25
1
[PATCH 3/3, take 2] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...----------
1 file changed, 35 insertions(+), 15 deletions(-)
diff --git a/lib/write.c b/lib/write.c
index dbb8292..8c4dd8e 100644
--- a/lib/write.c
+++ b/lib/write.c
@@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name)
return 0;
}
+ size_t recoded_name_len;
+ int use_utf16 = 0;
+ char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16);
+ if (recoded_name == NULL) {
+ SET_ERRNO (EINVAL, "malformed name");
+ return 0;
+ }
+
/* Create the new nk-record. */
static const char nk_id[2] = { 'n...
2013 Nov 25
3
Re: [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...eletions(-)
>
> diff --git a/lib/write.c b/lib/write.c
> index dbb8292..72b1f8a 100644
> --- a/lib/write.c
> +++ b/lib/write.c
> @@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name)
> return 0;
> }
>
> + size_t recoded_name_len;
> + int use_utf16 = 0;
> + char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16);
> + if (recoded_name == NULL) {
> + SET_ERRNO (EINVAL, "malformed name");
> + return 0;
> + }
> +
> /* Create the new nk-record. */
>...
2001 Jun 28
1
Adding 'name' key types
Playing around with the [wonderful] GSS-API patches for OpenSSH [1] I
noticed that there is a bit of functionality missing from
OpenSSH/GSS-API, namely that authorized_keys2 has no meaning when using
GSS authentication.
Yes, ~/.k5login can be used to grant access to an account for
applications that support Kerberos, as does OpenSSH with those GSS
patches, but .k5login does not and cannot provide
2002 Jan 06
3
puzzling error message
Hi
RedHat 7.2, ext3 on /, kernel 2.4.18p1.
whilst updatedb was running, i had these messages appear...
Jan 6 22:18:42 jaguar kernel: EXT3-fs error (device ide0(3,3)):
ext3_readdir: bad entry in directory #147553: rec_len %% 4 != 0 -
offset=0, inode=1651076143, rec_len=19527, name_len=85
Jan 6 22:18:42 jaguar kernel: EXT3-fs error (device ide0(3,3)):
ext3_readdir: bad entry in directory #50619: rec_len is too small for
name_len - offset=0, inode=574907, rec_len=12, name_len=9
Jan 6 22:18:43 jaguar kernel: EXT3-fs error (device ide0(3,3)):
ext3_readdir: bad entry in director...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
---
lib/hivex-internal.h | 8 +++++---
lib/utf16.c | 11 +++++++----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h
index 4135f58..64fd49a 100644
--- a/lib/hivex-internal.h
+++ b/lib/hivex-internal.h
@@ -268,11 +268,13 @@ extern size_t * _hivex_return_offset_list (offset_list *list);
extern void _hivex_print_offset_list
2001 Aug 15
0
[ossh patch] principal name/patterns in authorized_keys2
...patches (*).
NOTE: I did not strive too hard to keep to the code style of OpenSSH.
Point me a the description of the OpenSSH code style and I'll
modify my patch accordingly.
Files modified:
- key.h
- added KEY_NAME key type
- added KEY_NAME_PAT key type
- added name, name_len and name_type fields to the Key struct
(I realize that the name_len field is useless, I may remove it)
- added prototype for key_match()
- key.c
- added initialization/finalization of new Key fields to key_new()/key_free()
- added named/pattern key type support to a variety of functi...
2013 Nov 24
0
[PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...----------
1 file changed, 34 insertions(+), 15 deletions(-)
diff --git a/lib/write.c b/lib/write.c
index dbb8292..72b1f8a 100644
--- a/lib/write.c
+++ b/lib/write.c
@@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name)
return 0;
}
+ size_t recoded_name_len;
+ int use_utf16 = 0;
+ char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16);
+ if (recoded_name == NULL) {
+ SET_ERRNO (EINVAL, "malformed name");
+ return 0;
+ }
+
/* Create the new nk-record. */
static const char nk_id[2] = { 'n...
2004 Apr 14
2
Question about EXT3 error messages in /var/log/messages
Hello list
I've been having the following error messages pop up in my kernel log:
Apr 12 04:08:09 hal kernel: EXT3-fs error (device md(9,2)): ext3_readdir:
bad entry in directory #2670595: rec_len %% 4 != 0 - offset=0,
inode=827218527, rec_len=20275, name_len=73
Apr 12 04:08:14 hal kernel: EXT3-fs error (device md(9,2)): ext3_readdir:
bad entry in directory #2670596: rec_len %% 4 != 0 - offset=0,
inode=861103477, rec_len=95, name_len=95
Apr 12 04:08:17 hal kernel: EXT3-fs error (device md(9,2)): ext3_readdir:
bad entry in directory #2670597: rec_len %%...
2013 Apr 11
0
[PATCH] Btrfs-progs: enhance 'btrfs subvolume list'
..._list_comparer_set *set;
@@ -391,52 +490,70 @@ static struct root_info *root_tree_search(struct root_lookup *root_tree,
return NULL;
}
-static int update_root(struct root_lookup *root_lookup,
- u64 root_id, u64 ref_tree, u64 root_offset, u64 flags,
- u64 dir_id, char *name, int name_len, u64 ogen, u64 gen,
- time_t ot, void *uuid, void *puuid)
+static int set_root_info(struct root_info *rinfo, u64 ref_tree, u64 root_offset,
+ u64 dir_id, char *name, int name_len,
+ struct btrfs_root_item *ritem, u32 ritem_len)
{
- struct root_info *ri;
+ int is_v0 = (ritem_len <=...
2017 Feb 07
2
[Bug 12568] New: Integer overflow still affects xattrs.c
...: wayned at samba.org
Reporter: shqking at gmail.com
QA Contact: rsync-qa at samba.org
A suspicious integer overflow is found in xattrs.c:692.
The code snippet is as follows.
684 for (num = 1; num <= count; num++) {
685 char *ptr, *name;
686 rsync_xa *rxa;
687 size_t name_len = read_varint(f);
688 size_t datum_len = read_varint(f);
689 size_t dget_len = datum_len > MAX_FULL_DATUM ? 1 + MAX_DIGEST_LEN :
datum_len;
690 size_t extra_len = MIGHT_NEED_RPRE ? RPRE_LEN : 0;
691 if ((dget_len + extra_len < dget_len)
692 || (dget_len + extra_len + name_len...
2009 Feb 11
2
[PATCH 0/2] ocfs2: two fixes for xattr
Hi,
For EAs data structure in inode/block are little different from them in
bucket. These two patches try to make them same for the most part.
The first patch set xh_free_start and xh_name_value_len when EAs in
inode/block. xh_free_start is useful to keep the minimum offset of the
xattr name/value. But xh_name_value_len is not very useful because we
don't have "hole" when EAs in
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...+#define BTRFS_ORPHAN_DIR_ITEM_KEY 9
/* reserve 2-15 close to the inode for later flexibility */
/*
@@ -1485,7 +1491,7 @@ int btrfs_find_dead_roots(struct btrfs_r
/* dir-item.c */
int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
*root, const char *name, int name_len, u64 dir,
- struct btrfs_key *location, u8 type);
+ struct btrfs_key *location, u8 type, int index);
struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path, u64 dir,
@@ -1513,6 +1519,15 @@ struct...
2009 Feb 16
3
[PATCH 0/2] ocfs2: two fixes for xattr -v2
Hi,
I have fixed the problems in version 1 patches. These two patches based
on the latest main line kernel.
Thanks,
tiger
> For EAs data structure in inode/block are little different from them in
> bucket. These two patches try to make them same for the most part.
>
> The first patch set xh_free_start and xh_name_value_len when EAs in
> inode/block. xh_free_start is useful to
2004 Mar 01
1
Re: smb_panic() in name_len()
...thing like 'smb-share'.
Thanks in advance,
Juer
----- Original Message -----
From: "Juer Lee" <juer.lee@raidtec.ie>
To: "Andrew Bartlett" <abartlet@samba.org>
Cc: <samba@lists.samba.org>
Sent: Monday, March 01, 2004 10:58 AM
Subject: Re: smb_panic() in name_len()
> Thanks, Andrew,
>
> But the share name is just something like 'share1'.
>
> Juer
> ----- Original Message -----
> From: "Andrew Bartlett" <abartlet@samba.org>
> To: "Juer Lee" <juer.lee@raidtec.ie>
> Cc: <samba@lists.samba....
2013 Apr 25
1
[syslinux:rockridge] iso9660.c did not copy terminating 0 of Rock Ridge name
...x 0f7b3d2..492adc6 100644
> --- a/core/fs/iso9660/iso9660.c
> +++ b/core/fs/iso9660/iso9660.c
> @@ -240,7 +240,7 @@ static int iso_readdir(struct file *file, struct dirent *dirent)
> /* Try to get Rock Ridge name */
> ret = susp_rr_get_nm(fs, (char *) de, &rr_name, &name_len);
> if (ret > 0) {
> - memcpy(dirent->d_name, rr_name, name_len);
> + memcpy(dirent->d_name, rr_name, name_len + 1);
memcpy(dirent->d_name, rr_name, name_len);
dirent->d_name[name_len] = '\0';
?
-hpa
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...cation, u8 type, u64 index);
struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct btrfs_path *path, u64 dir,
+ struct inode *dir,
+ struct btrfs_path *path, u64 dirid,
const char *name, int name_len,
int mod);
struct btrfs_dir_item *
@@ -2851,7 +2876,8 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
struct btrfs_dir_item *di);
int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct btrfs_path *path,...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...edef u16 __le16;
+
+#define BTRFS_ROOT_BACKREF_KEY 144
+#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL
+#define BTRFS_DIR_ITEM_KEY 84
+
+/*
+ * * this is used for both forward and backward root refs
+ * */
+struct btrfs_root_ref {
+ __le64 dirid;
+ __le64 sequence;
+ __le16 name_len;
+} __attribute__ ((__packed__));
+
+struct btrfs_disk_key {
+ __le64 objectid;
+ u8 type;
+ __le64 offset;
+} __attribute__ ((__packed__));
+
+struct btrfs_dir_item {
+ struct btrfs_disk_key location;
+ __le64 transid;
+ __le16 data_len;
+ __le16 na...
2006 Dec 27
5
Problem with ext3 filesystem
...ecial_inode: bogus i_mode (170101)
init_special_inode: bogus i_mode (115140)
init_special_inode: bogus i_mode (117302)
init_special_inode: bogus i_mode (111700)
EXT3-fs error (device sda1): ext3_readdir: bad entry in directory
#143278260: rec_len % 4 != 0 - offset=0, inode=1857588108, rec_len=8466,
name_len=34
Dec 22 14:25:03 datahaven kernel: init_special_inode: bogus i_mode (111501)
Dec 22 14:25:03 datahaven kernel: init_special_inode: bogus i_mode (113301)
Dec 22 14:25:03 datahaven kernel: init_special_inode: bogus i_mode (170101)
Dec 22 14:25:03 datahaven kernel: init_special_inode: bogus i_mode...
2011 Sep 02
1
[PATCH 4/7] hivex: Add metadata length functions for nodes and values
...)
return ret;
}
+size_t
+hivex_node_struct_length (hive_h *h, hive_node_h node)
+{
+ if (!IS_VALID_BLOCK (h, node) || !BLOCK_ID_EQ (h, node, "nk")) {
+ errno = EINVAL;
+ return 0;
+ }
+
+ struct ntreg_nk_record *nk = (struct ntreg_nk_record *) (h->addr + node);
+ size_t name_len = le16toh (nk->name_len);
+ /* -1 to avoid double-counting the first name character */
+ size_t ret = name_len + sizeof (struct ntreg_nk_record) - 1;
+ int used;
+ size_t seg_len = block_len (h, node, &used);
+ if (ret > seg_len) {
+ if (h->msglvl >= 2)
+ fprintf (stder...
2007 Sep 19
1
[PATCH 06/15] ocfs2: Remove open coded readdir()
...ournal.c
index 8bbfc80..f9d01e2 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1213,17 +1213,49 @@ bail:
return status;
}
+struct ocfs2_orphan_filldir_priv {
+ struct inode *head;
+ struct ocfs2_super *osb;
+};
+
+static int ocfs2_orphan_filldir(void *priv, const char *name, int name_len,
+ loff_t pos, u64 ino, unsigned type)
+{
+ struct ocfs2_orphan_filldir_priv *p = priv;
+ struct inode *iter;
+
+ if (name_len == 1 && !strncmp(".", name, 1))
+ return 0;
+ if (name_len == 2 && !strncmp("..", name, 2))
+ return 0;
+
+ /* Skip bad inodes so t...