Displaying 20 results from an estimated 80 matches for "get_string".
Did you mean:
set_string
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
2014 Jan 14
2
extlinux device trouble
Hello,
i'm using version 4.07.
On my computer extlinux does not work.
after debugging, i found the trouble.
in the function parse_mountinfo there was using a function get_string.
in the function get_string there was a line (42) } else if (ch == '\\') {
but in my mountinfo list, there was \ , but not with octal digit.
so the function get_string will fail.
here are some information
### fstab ###
#Mount Build environment
//10.30.20.61/platform /home/platform...
2014 Jan 15
3
extlinux device trouble
...ohann Obermayr
> <johann.obermayr at sigmatek.at> wrote:
>> Hello,
>>
>> i'm using version 4.07.
>> On my computer extlinux does not work.
>> after debugging, i found the trouble.
>>
>> in the function parse_mountinfo there was using a function get_string.
>> in the function get_string there was a line (42) } else if (ch == '\\') {
>> but in my mountinfo list, there was \ , but not with octal digit.
>> so the function get_string will fail.
>>
>> here are some information
>> ### fstab ###
>> #Mount Bu...
2002 Nov 05
0
[PATCH] Add readonly mode to scp, sftp_server
...us);
+ return;
+ }
mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666;
TRACE("open id %u name %s flags %d mode 0%o", id, name, pflags,
mode);
fd = open(name, flags, mode);
***************
*** 587,592 ****
--- 596,606 ----
id = get_int();
name = get_string(NULL);
a = get_attrib();
+ if (readonly) {
+ status = SSH2_FX_PERMISSION_DENIED;
+ send_status(id, status);
+ return;
+ }
TRACE("setstat id %u name %s", id, name);
if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
ret = truncate(name, a->size);
***************
*** 8...
2014 Jan 15
1
extlinux device trouble
...;>>
>>>> Hello,
>>>>
>>>> i'm using version 4.07.
>>>> On my computer extlinux does not work.
>>>> after debugging, i found the trouble.
>>>>
>>>> in the function parse_mountinfo there was using a function get_string.
>>>> in the function get_string there was a line (42) } else if (ch == '\\')
>>>> {
>>>> but in my mountinfo list, there was \ , but not with octal digit.
>>>> so the function get_string will fail.
>>>>
>>>> here are s...
2007 Sep 20
3
Bug? in wxSugar enumerable_controls.rb
...fact, the find_all method uses the each method defined in
''wx_sugar/wx_classes/enumerable_controls.rb'' as following :
def each(&block)
last = get_count - 1
case block.arity
when 1
0.upto(last) { | i | yield i }
when 2
0.upto(last) { | i | yield i, get_string(i) }
when 3
0.upto(last) { | i | yield i, get_string(i), get_item_data(i) }
else
raise ArgumentError, "Invalid number of block parameters"
end
end
This method works well if used directly.
The problem is that methods from Enumerable like find_all, collect ...
cal...
2006 Nov 23
0
[754] trunk/wxruby2/samples/bigdemo: Rubified samples and added in missing client data sample code
...lines">@@ -36,25 +36,27 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def on_combobox(event)
</span><del>- @log.write_text("evt_combobox: " + event.get_string())
</del><ins>+ cb = event.get_event_object
+ data = cb.get_client_data(event.get_selection)
+ @log.write_text("evt_combobox: #{event.get_string}\nClient Data: #{data}")
</ins><span class="cx"> end
</span><span class=&quo...
2001 Jun 20
1
SFTP Logging Redux.
...TRACE("open id %d name %s flags %d mode 0%o", id, name, pflags, mode);
+ log("(%d/%d/%s) File/Dir opened: %s (%s,%04o)", ppid, cuid, CUNAME, name, sflags, mode);
fd = open(name, flags, mode);
if (fd < 0) {
status = errno_to_portable(errno);
@@ -589,6 +620,7 @@
name = get_string(NULL);
a = get_attrib();
TRACE("setstat id %d name %s", id, name);
+ log("(%d/%d/%s) Permissions altered: %s (%04o).", ppid, cuid, CUNAME, name, a->perm & 0777);
if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) {
ret = chmod(name, a->perm & 0777);...
2007 Dec 07
2
[PATCH] add statfs extension to sftp-server
...s);
+ buffer_put_int64(&msg, st->f_ffree);
+ send_msg(&msg);
+ buffer_free(&msg);
+}
+
/* parse incoming */
static void
@@ -1049,6 +1068,25 @@ process_symlink(void)
}
static void
+process_extended_statfs(u_int32_t id)
+{
+ char *path;
+ struct statfs st;
+ int ret;
+
+ path = get_string(NULL);
+ debug3("request %u: statfs", id);
+ logit("statfs \"%s\"", path);
+
+ ret = statfs(path, &st);
+ if (ret == -1)
+ send_status(id, errno_to_portable(errno));
+ else
+ send_statfs(id, &st);
+ xfree(path);
+}
+
+static void
process_extended(void...
2007 Nov 11
1
ftp-server patch - restrict user to directory
...e, RestrictDirectory, restlen) &&
+ resolvedname[restlen] == '/')
+ return(1);
+
+ error("Restricted access, %s disallowed for %.100s", reason, path);
+
+ return(0);
+}
+
static int
errno_to_portable(int unixerrno)
{
@@ -813,20 +948,24 @@
id = get_int();
path = get_string(NULL);
debug3("request %u: opendir", id);
- logit("opendir \"%s\"", path);
- dirp = opendir(path);
- if (dirp == NULL) {
- status = errno_to_portable(errno);
- } else {
- handle = handle_new(HANDLE_DIR, path, 0, dirp);
- if (handle < 0) {
- closedir(dirp);
+...
2014 Jan 15
0
extlinux device trouble
...n Tue, Jan 14, 2014 at 9:28 AM, Johann Obermayr
<johann.obermayr at sigmatek.at> wrote:
> Hello,
>
> i'm using version 4.07.
> On my computer extlinux does not work.
> after debugging, i found the trouble.
>
> in the function parse_mountinfo there was using a function get_string.
> in the function get_string there was a line (42) } else if (ch == '\\') {
> but in my mountinfo list, there was \ , but not with octal digit.
> so the function get_string will fail.
>
> here are some information
> ### fstab ###
> #Mount Build environment
> //10.30...
2014 Jan 15
0
extlinux device trouble
...nn.obermayr at sigmatek.at> wrote:
>>> Hello,
>>>
>>> i'm using version 4.07.
>>> On my computer extlinux does not work.
>>> after debugging, i found the trouble.
>>>
>>> in the function parse_mountinfo there was using a function get_string.
>>> in the function get_string there was a line (42) } else if (ch == '\\') {
>>> but in my mountinfo list, there was \ , but not with octal digit.
>>> so the function get_string will fail.
>>>
>>> here are some information
>>> ### fsta...
2003 Feb 05
2
Minor races in sftp-server.c
...tch shows:
--- sftp-server.c 28 Jan 2003 18:06:53 -0000 1.1.1.2
+++ sftp-server.c 5 Feb 2003 19:19:42 -0000
@@ -832,19 +832,22 @@
process_rename(void)
{
u_int32_t id;
- struct stat st;
char *oldpath, *newpath;
- int ret, status = SSH2_FX_FAILURE;
+ int status;
id = get_int();
oldpath = get_string(NULL);
newpath = get_string(NULL);
TRACE("rename id %u old %s new %s", id, oldpath, newpath);
/* fail if 'newpath' exists */
- if (stat(newpath, &st) == -1) {
- ret = rename(oldpath, newpath);
- status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
- }
+ if (li...
2013 Jun 04
1
[PATCH] add restricted mode to sftp-server
Hello.
These patches add a new mode of operation for the sftp server.
It is located between the ordinary, unrestricted mode and read-only mode.
It allows you to add files to the server, but only if these files do
not exist on the server before.
Changes to existing files - are prohibited.
Please review them, maybe these patches will be useful not only to me.
Thank you.
-------------- next part
2006 Aug 19
0
[PATCH] add atomic rename extension to sftp-server
...==========
--- ssh.orig/sftp-server.c 2006-08-19 16:49:03.000000000 +0200
+++ ssh/sftp-server.c 2006-08-19 16:51:26.000000000 +0200
@@ -1087,6 +1087,23 @@ process_extended_statfs(u_int32_t id)
}
static void
+process_extended_posix_rename(u_int32_t id)
+{
+ char *oldpath, *newpath;
+
+ oldpath = get_string(NULL);
+ newpath = get_string(NULL);
+ debug3("request %u: posix-rename", id);
+ logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath);
+ if (rename(oldpath, newpath) == -1)
+ send_status(id, errno_to_portable(errno));
+ else...
2007 Apr 02
0
[937] trunk/wxsugar/lib/wx_sugar/enumerable_controls.rb: Initial commit of enumerable_controls.rb
...tem. Note that if you don''t need the string or client data, it is
+ # more efficient to iterate over the indexes only.
+ def each(&block)
+ last = get_count - 1
+ case block.arity
+ when 1
+ 0.upto(last) { | i | yield i }
+ when 2
+ 0.upto(last) { | i | yield i, get_string(i) }
+ when 3
+ 0.upto(last) { | i | yield i, get_string(i), get_item_data(i) }
+ else
+ raise ArgumentError, "Invalid number of block parameters"
+ end
+ end
+
+ # Returns the index of the item in the control corresponding to
+ # +value+. +value+ may be a string lab...
2017 Apr 11
4
v2v: Implement -i vmx to read VMware vmx files directly (RHBZ#1441197).
https://bugzilla.redhat.com/show_bug.cgi?id=1441197
2007 Sep 20
7
Troubles with ListBox and CheckListBox events
...ed through the
event.selection? (or is_selection) call.
This is fine and this is what I expect but the wxRuby documentation
states that :
"CommandEvent#get_selection
Integer get_selection()
Returns item index for a listbox or choice selection event (not valid
for a deselection).
CommandEvent#get_string
String get_string()
Returns item string for a listbox or choice selection event (not valid
for a deselection)."
=> Question :
The documentation contradicts the actual behaviour which I find correct.
Is the documentation incorrect ?
- Troubles 2 & 3 :
When I check and when I uncheck an...
2006 Aug 17
0
[RFC] proposed extensions for SFTP
...ut_int(&msg, flag);
+ buffer_put_int(&msg, st->f_namemax);
+ send_msg(&msg);
+ buffer_free(&msg);
+}
+
/* parse incoming */
static void
@@ -1049,6 +1079,24 @@
}
static void
+process_extended_statvfs(u_int32_t id)
+{
+ char *path;
+ struct statvfs st;
+ int ret;
+
+ path = get_string(NULL);
+ debug3("request %u: statvfs", id);
+ verbose("statvfs \"%s\"", path);
+
+ ret = statvfs(path, &st);
+ if (ret == -1)
+ send_status(id, errno_to_portable(errno));
+ else
+ send_statvfs(id, &st);
+}
+
+static void
process_extended(void)
{
u_int32_t...
2006 Aug 19
0
[PATCH] add statfs extension to sftp-server
...s);
+ buffer_put_int64(&msg, st->f_ffree);
+ send_msg(&msg);
+ buffer_free(&msg);
+}
+
/* parse incoming */
static void
@@ -1049,6 +1068,25 @@ process_symlink(void)
}
static void
+process_extended_statfs(u_int32_t id)
+{
+ char *path;
+ struct statfs st;
+ int ret;
+
+ path = get_string(NULL);
+ debug3("request %u: statfs", id);
+ logit("statfs \"%s\"", path);
+
+ ret = statfs(path, &st);
+ if (ret == -1)
+ send_status(id, errno_to_portable(errno));
+ else
+ send_statfs(id, &st);
+ xfree(path);
+}
+
+static void
process_extended(void...