search for: tcsaflush

Displaying 20 results from an estimated 26 matches for "tcsaflush".

2008 May 26
4
xvm-gate: arrow keys broken in pygrub
...n key mode; gnome-terminal / xterm / dtterm starts sending the ESC O ... cursor key sequences. Now the problem seems to be that the xenconsole process opens the domain''s slave pty, and uses the init_term() function to configure the terminal for "raw" mode. init_term() uses a TCSAFLUSH ioctl to set the new terminal attributes, but that apparently flushes queued data (the" ESC [ ? 1 h" vt100 init sequence for switching to application mode) that is already waiting in the pty''s output queue. Why doesn''t xen.hg/tools/console/client/main.c use TCSANOW whe...
2020 Jun 01
0
[PATCH nbdkit 1/3] server: Disallow password=- from non-tty and fix error message (RHBZ#1842440).
..."); + if (read_password_interactive (password) == -1) return -1; - } - - printf ("password: "); - - /* Set no echo. */ - tty = isatty (0); - if (tty) { - tcgetattr (0, &orig); - temp = orig; - temp.c_lflag &= ~ECHO; - tcsetattr (0, TCSAFLUSH, &temp); - } - - r = getline (password, &n, stdin); - err = errno; - - /* Restore echo. */ - if (tty) - tcsetattr (0, TCSAFLUSH, &orig); - - /* Complete the printf above. */ - printf ("\n"); - - if (r == -1) { - errno = err; - nbdkit_erro...
2008 Jan 16
8
PATCH [xenconsoled]: makes pty slave raw early
Hi, on my system (Linux 2.6.18.8 - ia64), if a domain write on the xencons before xenconsole is initialized the domain gets back what it wrote. This patch fixes this issue by making raw the pty slave very early. (I suppose it doesn''t happen with linux as a guest because it takes a little bit of time before writing to xencons). Tristan. _______________________________________________
2020 Jun 01
7
server: Fix reading passwords interactively.
https://bugzilla.redhat.com/show_bug.cgi?id=1842440 Patches 1 and 2 address fairly obvious bugs in how we handle reading passwords from stdin. There are other ways we may consider fixing these bugs: - Should password=- always open /dev/tty and ignore stdin entirely? - Should we make password=-0/-1/-2 work by skipping the close? Or perhaps reopen the file descriptors on /dev/null after
2001 Oct 18
0
Patch for hanging ssh-add under Solaris CDE
...add, but it is set for other things. - Dave Dykstra --- openbsd-compat/readpassphrase.c.O Fri Oct 12 17:12:22 2001 +++ openbsd-compat/readpassphrase.c Thu Oct 18 13:59:25 2001 @@ -36,12 +36,6 @@ #include <termios.h> #include <readpassphrase.h> -#ifdef TCSASOFT -# define _T_FLUSH (TCSAFLUSH|TCSASOFT) -#else -# define _T_FLUSH (TCSAFLUSH) -#endif - char * readpassphrase(prompt, buf, bufsiz, flags) const char *prompt; @@ -102,13 +96,13 @@ term.c_cc[VSTATUS] = _POSIX_VDISABLE; } #endif - (void)tcsetattr(input, _T_FLUSH, &term); + (void)tcsetattr(input, TCSANOW, &ter...
1999 Oct 20
2
Samba - Unix password sync
Hi, in the last weeks I've unsuccessfully tried to get Samba (2.0.5a) - Unix (Suse 6.2) password sync working. Maybe somebody can give me a hint, what's wrong. Enclosed you'll find additional information. Thank you for helping, Johannes -------- smb.conf: passwd chat = *password* %n\n *password* %n\n *Password* -------- password chat (manually): homer:~ # /bin/passwd web New
2020 Jun 01
3
[PATCH v2v 0/2] v2v: nbdkit: Don't use password=- parameter.
Part 2 fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1842440 Actually this fix on its own should be sufficient, but probably we want the nbdkit fixes too. Note this uses actual OCaml 4.05 features! ("let open" and the Unix.tcgetattr functions). I checked that both features are available on RHEL 7's OCaml. Rich.
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 2/5] lib: Move code for parsing, passwords and paths into libnbdkit.so.
...assword = NULL; - - /* Read from stdin. */ - if (strcmp (value, "-") == 0) { - printf ("password: "); - - /* Set no echo. */ - tty = isatty (0); - if (tty) { - tcgetattr (0, &orig); - temp = orig; - temp.c_lflag &= ~ECHO; - tcsetattr (0, TCSAFLUSH, &temp); - } - - r = getline (password, &n, stdin); - err = errno; - - /* Restore echo. */ - if (tty) - tcsetattr (0, TCSAFLUSH, &orig); - - /* Complete the printf above. */ - printf ("\n"); - - if (r == -1) { - errno = err; - nbdkit_erro...
2005 Nov 18
1
OSerror [err no 5] while booting
...xen/xm/main.py", line 259, in main create.main(args) File "/usr/lib/python/xen/xm/create.py", line 550, in main console_client.connect(''localhost'', console) File "/usr/lib/python/xen/util/console_client.py", line 77, in connect tcsetattr(0, TCSAFLUSH, nattrs) termios.error: (5, ''Input/output error'') Traceback (most recent call last): File "/usr/sbin/xm", line 9, in ? main.main(sys.argv) File "/usr/lib/python/xen/xm/main.py", line 808, in main xm.main(args) File "/usr/lib/python/xen/xm/mai...
2020 Jun 01
1
Re: [PATCH nbdkit 1/3] server: Disallow password=- from non-tty and fix error message (RHBZ#1842440).
...inguish between error and EOF we have to check errno. > + * getline can return -1 and errno = 0 which means we got end of > + * file. > + */ > + errno = 0; > + r = getline (password, &n, stdin); > + err = errno; > + > + /* Restore echo. */ > + tcsetattr (0, TCSAFLUSH, &orig); > + > + /* Complete the printf above. */ > + printf ("\n"); > + > + if (r == -1) { > + if (err == 0) > + nbdkit_error ("could not read password from stdin: end of file"); Is this actually an error? EOF on a tty merely means that the...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into reviewable chunks. This passes bisection with -x 'make && make check', but I didn't work very hard on the commit messages, so I refer you back to the original patch to explain how it works: https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html Rich.
2019 Jan 14
6
[PATCH nbdkit incomplete 0/5] Port to Windows.
This is an incomplete port to Windows. Currently the server compiles and starts up successfully, but goes into an infinite loop when you connect to it. Nevertheless I think the approach is ready for feedback. This being Windows the changes go quite deep. Rich.
2000 Jan 27
1
Long awaited round 1 of NeXT patches.
...termios *t; +{ + struct termios localterm; + + if (opt & TCSASOFT) { + localterm = *t; + localterm.c_cflag |= CIGNORE; + t = &localterm; + } + switch (opt & ~TCSASOFT) { + case TCSANOW: + return (ioctl(fd, TIOCSETA, t)); + case TCSADRAIN: + return (ioctl(fd, TIOCSETAW, t)); + case TCSAFLUSH: + return (ioctl(fd, TIOCSETAF, t)); + default: + errno = EINVAL; + return (-1); + } +} + +int tcsetpgrp(int fd, pid_t pgrp) +{ + int s; + + s = pgrp; + return (ioctl(fd, TIOCSPGRP, &s)); +} + +pid_t tcgetpgrp(int fd) +{ + int s; + + if (ioctl(fd, TIOCGPGRP, &s) < 0) + return ((pid_t...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...w input mode. Allows get_key to get just - * 1 key sequence (without delay or display) - */ -void rosh_console_raw(void) -{ -// struct termios itio, ntio; -// tcgetattr(0, &itio); -// rosh_print_tc(&itio); -/* ntio = itio; - ntio.c_lflag &= ~(ICANON|ECHO); - tcsetattr(0, TCSAFLUSH, &ntio);*/ - console_ansi_raw(); /* Allows get_key to get just 1 key sequence - (w/o delay or display */ -// tcgetattr(0, &ntio); -// rosh_print_tc(&ntio); -} - -/* - * Switches back to standard getline mode. - */ -void rosh_console_std(void) -{ -// struct termi...
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com> Here are the patches that I've got queued up based on the very helpful feedback I received from people testing Syslinux 5.00-pre9. Unless anyone has any concerns these will make it into Syslinux 5.00-pre10. Matt Fleming (9): pxe: Don't call open_config() from the pxe core ldlinux: Print a warning if no config file is found
2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...EAGAIN) + continue; + ret = -errno; + break; + } + count -= ret; + b += ret; + sum += ret; + } + return (ret >= 0 ? sum : ret); } /* don''t worry too much if setting terminal attributes fail */ @@ -91,79 +142,360 @@ static void restore_term(int fd, struct tcsetattr(fd, TCSAFLUSH, old); } -static int console_loop(int fd) -{ - int ret; +static struct message *alloc_msg(char* data, size_t len) +{ + struct message *msg; + + msg = malloc(sizeof(*msg)); + if (!msg) + return NULL; + + memset(msg, 0, sizeof(*msg)); + + msg->next = NULL; + msg->data = data; + msg->len...
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...ne string * cmdstr Output command string @@ -216,16 +243,8 @@ void rosh_print_tc(struct termios *tio) */ void rosh_console_raw() { -// struct termios itio, ntio; -// tcgetattr(0, &itio); -// rosh_print_tc(&itio); -/* ntio = itio; - ntio.c_lflag &= ~(ICANON|ECHO); - tcsetattr(0, TCSAFLUSH, &ntio);*/ console_ansi_raw(); /* Allows get_key to get just 1 key sequence (w/o delay or display */ -// tcgetattr(0, &ntio); -// rosh_print_tc(&ntio); } /* @@ -233,9 +252,7 @@ void rosh_console_raw() */ void rosh_console_std() { -// struct termios itio, ntio; console_...
2009 Feb 15
2
COM32 module: Read-Only shell
...nsole over to raw input mode. Allows get_key to get just + * 1 key sequence (without delay or display) + */ +void rosh_console_raw() +{ +// struct termios itio, ntio; +// tcgetattr(0, &itio); +// rosh_print_tc(&itio); +/* ntio = itio; + ntio.c_lflag &= ~(ICANON|ECHO); + tcsetattr(0, TCSAFLUSH, &ntio);*/ + console_ansi_raw(); /* Allows get_key to get just 1 key sequence + (w/o delay or display */ +// tcgetattr(0, &ntio); +// rosh_print_tc(&ntio); +} + +/* + * Switches back to standard getline mode. + */ +void rosh_console_std() +{ +// struct termios itio, ntio; + console...
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread: https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203 test-delay-shutdown.sh fails for unclear reasons. This series starts by reverting "tests: Don't strand hung nbdkit processes" which is because several other tests fail randomly unless I revert this patch. I didn't investigate this yet so it
2005 Aug 30
4
Re: [Xen-changelog] New console transport and update xenconsoled.
...> static bool domain_is_valid(int domid) > { >@@ -107,7 +140,7 @@ > > static int domain_create_tty(struct domain *dom) > { >- char path[1024]; >+ char *path; > int master; > > if ((master = getpt()) == -1 || >@@ -126,22 +159,106 @@ > tcsetattr(master, TCSAFLUSH, &term); > } > >- xs_mkdir(xs, "/console"); >- snprintf(path, sizeof(path), "/console/%d", dom->domid); >- xs_mkdir(xs, path); >- strcat(path, "/tty"); >- >+ asprintf(&path, "/console/%d/tty", dom->domid); >...