Re: Lilo and "once"

2008-06-06 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

I am looking for an option to tell Lilo to boot a certain kernel ONCE, and if 
it fails - to revert (after the reboot) to the previous one.


Is this possible?

  

lilo -D override_default
lilo -R the_command_line_to_run_once

So, after upgrade on a remote machine, the lilo.conf file usually points 
to the new kernel as default. I do:

lilo -D LinuxOLD
(so that now the default is the old kernel, despite the fact that 
lilo.conf says its the new one)

lilo -R Linux
(Next boot, lilo will behave as if I typed "Linux" on the command line, 
which is the name of the profile for the new kernel)


Reboot.

If everything goes fine, just run "lilo" with no parameters to make this 
the fixed setting.

If the machine doesn't boot, ask the hosting to reboot it.

Better yet, add "panic=10" to all your kernel command lines. This will 
cause the kernel to automatically reboot on panic after 10 seconds. 
Usually* that will be enough to make sure you can get by without your 
friendly neighborhood hosting's help.


* I say "usually" because it has already happened to me that the thing 
actually wrong with the new kernel was that the network driver didn't 
work. There was no panic, so panic= didn't help, but I still couldn't 
get to it remotely.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Help with printf

2008-06-11 Thread Shachar Shemesh

Dan Bar Dov wrote:



I'm not using it from shell, that was just an example. I need to read  
format strings from file
and use them to print stuff like error  reports (the error includes 
only parameters, and the format string comes from a file.


Please bear in mind that allowing a party to write your format strings 
for you is equivalent to giving them an known buffer overrun. A format 
string is enough to get arbitrary code to be run by the program.


Under many circumstances, that's ok. If the program is not a network 
program and is not SUID, and the format strings are manipulated by the 
same permission level that the program itself is installed with, then 
the attack vectors are blocked. I'm just trying to make you aware of it.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Under which keywords can such systems be found?

2008-06-13 Thread Shachar Shemesh

Omer Zak wrote:

I am looking for a computer with small form factor (cellphone sized or
even smaller) with the following features:
1. Runs Linux.
2. RAM+disk - as needed to run a Linux system without X-Window.
3. Audio input.
4. At least one USB port.
5. Ethernet port.
6. Runs on batteries.
7. A way (such as a memory card built on another system) to install
Linux on the computer.
(Keyboard and display are not needed - programming can be done by
sshing.)

I would appreciate suggestions under which keywords to search for such a
system in Google (or in specialized product search Websites), and where
can it be obtained in Israel.
  --- Omer
  

Two questions (Spanish inquisition non-withstanding).
1. How much do you want to pay for it?
2. Does it have to be Intel based?
3. How many units do you need?
4. USB host or device?

Any "computer on a chip" system can provide you with everything you 
asked for (well, you will need to adapt the battery yourself, but the 
voltage and, more importantly, amperage are compatible with battery 
operation). They should all have USB device support, I'm not sure 
whether it can be easily turned into USB host support or not. 
Development boards can go as low as 300$ for a board with hardly enough 
RAM to run Linux,  and start climbing from there.


And best of all, if your answer to "3" is "a lot", the prices drop to 
peanuts.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Finding which type of FS a DVD has

2008-06-16 Thread Shachar Shemesh

Lior Kaplan wrote:


$ file myfs.iso
myfs.iso: , 44.1 kHz, Stereo

any ideas ?

  


Yesterday I got that very same reply for the first 10KB of an ext-2 
image that someone changed its magic number. Viewed from khexedit, the 
first block and something were just nulls.


I have no idea why file would answer that, but there you go.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Herouth Maoz wrote:

Quoting Dotan Cohen <[EMAIL PROTECTED]>:


Please vote for this KDE bidi bug, even if you are not a KDE user:
http://bugs.kde.org/show_bug.cgi?id=165406


What bothers me about this bug description is that you use the word 
"alignment", and that really has nothing to do with the problem at 
hand, which is directionality. You wish the various pieces of the text 
to be correctly ordered from right to left. If they just justify it to 
the right, it would be a great waste of votes, and that's what the 
word "alignment" implies.
What bothers me even more is that this is just KDE working as it should. 
The bug is in kate and the rest of the programs that decided not to have 
bidi support. There is NO way to provide a generic solution to this 
problem at the toolkit level.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Dotan Cohen wrote:

At what level do you suggest that the directionality shortcut be added
to KDE apps, as is the case in Mozilla apps? I will file a bug at the
place that you suggest, Shachar. Thanks.
  
Directionality is meaningless unless the application stores it somehow. 
This means that the application needs to be able to tell what direction 
to apply to each text control.


I don't know QT nearly well enough to answer this completely, so treat 
everything I say as a basis for discussion rather than as a firm 
recommendation.


As far as I can tell, a text control should have one of three modes:
Left to right
Right to left
Content controlled (typically - first strict directional character of 
line determines direction)


Also, each control should have the option to have each line of separate 
directionality, or the entire control of one directionality.


As far as what should be done, this depends on the application. If kate 
is a pure text editor, with no allowances in the file format for meta 
data, then it should probably be in the third form (content control). A 
word processor should definitely control explicitly each line, and set 
the paragraph explicitly. A browser should set the URL line explicitly 
to left to right, and so on.


Just my 2 euro cents.

Shachar

P.s.
Herouth is her first name

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Herouth Maoz wrote:


Or am I missing something here?
How will you supply round trip preservation of directionality (running 
program -> disk -> running program) if the application is unaware of the 
directionality?


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Dotan Cohen wrote:


I
put it there to parse incorrectly-encoded replies on mailing lists,
which helps me refine the http://gibberish.co.il website.

  

Love it! It's "gibberish cookies" encoding

Not the most polite of things to do, but still brilliant.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Dotan Cohen wrote:

I'm not as technically inclined as you, so I may be missing something
obvious here, but I think that the application will know which
direction because I tell it, via the keyboard shortcut. If it's LTR
and I want RTL I hit Ctrl-Alt-X and vice versa. Try it in a Mozilla
app.

  
And what will happen when you save, close your application, and then 
reload the document? Wouldn't you expect your Ctrl-Alt-X to be 
remembered? That requires application support, there is no way[1] to do 
that using the toolkit.


Shachar

1- Obviously, there is a way. For example, we can store a hash of the 
content of the control box along with the directionality override. That 
will not transfer correctly to another machine, but we can set a p2p 
network that will distribute it to other clients so it will display 
correctly on everyone who opts-in to do so. Such a thing is, 
obviously[2], too ludicrous to be implemented by anyone.


2- Obvious, that is, until you realize this is, almost exactly, what 
greasemonkey is doing.


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Please vote for this KDE bidi bug, even if you are not a KDE user

2008-06-30 Thread Shachar Shemesh

Dotan Cohen wrote:


Politeness is not my intention in the lines below my name.
There is an old usenet tradition that is still honored by many modern 
mail clients. If you put a line containing just two dashes and a space 
(i.e. - "-- "), many mail clients will understand that to mean that 
that's where the signature begins. As a result, hitting "reply" will not 
quote it and other nice things.


Shachar

--
A temporary signature to demonstrate a point


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Iglu down?

2008-07-01 Thread Shachar Shemesh

Dotan Cohen wrote:

I'm getting these errors when cc'ing [EMAIL PROTECTED] Is anyone
else experiencing this?

"""
This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

[EMAIL PROTECTED]

Technical details of permanent failure:
PERM_FAILURE: Google tried to deliver your message, but it was
rejected by the recipient domain. We recommend contacting the other
email provider for further information about the cause of this error.
The error that the other server returned was: 550 550 5.1.1
<[EMAIL PROTECTED]>: Recipient address rejected: User unknown in
virtual alias table (state 14).
"""

  
The linux-il list is hosted on the huji (Hebrew University) servers. The 
"official" address for it (as in "the address the software knows") is 
[EMAIL PROTECTED] Up until about a year ago the list also had two 
aliases: [EMAIL PROTECTED] and [EMAIL PROTECTED] About a year 
ago, quoting spam problems (personally, I never managed to understand 
why) the list's admin disabled the two aliases, leaving only the master 
address active.


Just for the record, should the list admins choose to solve their 
problem by moving the list to hamakor server (and a shiny new mailman 
software) rather than stay with huji, all they have to do is call me or 
send an email. Until then, please contact Michael or Eli for the 
details, or just use the master address.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Linux executable startup stack structure

2008-07-02 Thread Shachar Shemesh

Hi all. Sorry for the crosspost.

I am looking for some documentation on the structure of the stack when 
an executable starts. I know the basics - argc, then argv, then envp. 
What I'm interested in is what's beyond that. I've tried googling, 
reading the sources in the kernel for fs/binfmt_elf.c and the sources 
for ld-linux.so. I'm sure what I'm looking for is in there, but I just 
couldn't nail it.


In particular, this is what I'm looking for. When one tries to load an 
executable (say, /bin/cat), the kernel figures out it is an ELF file, 
reads a field called "interpreter", which has a fairly typical value (on 
32 bit Intel - /lib/ld-linux.so.2), and loads the interpreter and 
/bin/cat into memory, and runs the interpreter code. The interpreter 
then looks at the ELF headers (which the kernel has loaded into memory) 
for /bin/cat, and based on them loads the rest of the required shared 
objects into memory, and then runs the /bin/cat code.


Then again, the interpreter can also be directly run. That happens if my 
command line is actually "/lib/ld-linux.so.2 /bin/cat". In that case, 
the kernel loads just the interpreter into memory and runs it, the 
interpreter figures out that it was run in direct mode, loads /bin/cat 
into memory, and then proceeds as before. In other words, the 
interpreter KNOWS whether it was loaded as an interpreter or whether it 
was loaded directly. That is what I'm trying to figure out.


It is NOT done by looking at the args, and it is not done by querying 
/proc/self. It is done by examining a portion of the executable header 
left by the kernel somewhere in memory, and asking "where is the 
executable startup code located? Is it the same as mine?" If ld-linux 
figures the startup code is the same is its own entry, then it assumes 
it was called directly. Otherwise, it assumes it is just the interpreter.


I found the actual logic just described. It is in the glibc sources, in 
elf/rtld.c, in a function called "dl_main". It is the first "if" in that 
function. What I have, so far, failed to find is where the variables 
referenced by that if are being initialized. I have reason to believe 
this is just a struct left on the stack by the kernel, but what the 
struct is, and more importantly, where on the stack, I have not, yet, 
been able to figure out.


I have not yet given up. I'm just hoping someone will come up and say 
"oh, just look at this URL for an explanation". The code is so choke 
full of things that look like preprocessor directives but seem to be, in 
fact, internal gcc attributes that I find the program flow somewhat 
unreadable. My method, right now, is to compile it with debug symbols, 
and then use objdump to overlay the source over the actual assembly 
code. It has, in fact, come to the point where it is easier to try and 
understand what I need that way.


Any help would be greatly appreciated.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux executable startup stack structure

2008-07-03 Thread Shachar Shemesh

Valery Reznic wrote:

P.S. And what do you need it for (except curiosity) ?

  
It's going to be a somewhat long p.s. If you understood the problem I'm 
trying to solve, skip ahead to area marked "proposed solution" for how 
I'll be trying to solve it.


Here's a piece of trivia for you. /lib/ld-linux.so and glibc go 
together. This is true in the sense that they are compiled from the same 
sources, but even more so, it is true in the sense that you cannot 
intermix versions of it. Take an old linux version's chroot you have, 
replace ld-linux there with a new version, and try chrooting into it. 
You will likely get something along the lines of the following error:

# /usr/sbin/chroot /srv/chroot/etch/
/bin/bash: relocation error: /lib/tls/libc.so.6: symbol 
_dl_out_of_memory, version GLIBC_PRIVATE not defined in file 
ld-linux.so.2 with link time reference


I'm not sure whether it's glibc relying on ld-linux or the other way 
around (the first would, at least, make some kind of sense), but any way 
you turn it, things don't work.


As far as I know, there are three approaches to emulating a chroot. 
There is "fakechroot", which uses LD_PRELOAD. This means it cannot 
override anything that ld-linux (a statically compiled library, for 
obvious reasons) do, which means that when you run "chroot 
/srv/chroot/etch/", both ld-linux and glibc (as well as any other 
library mentioned in the ELF header) gets loaded from the real root of 
the system, so no problem there (except the obvious one - that the 
chroot isn't much of one). The second approach is the one employed by 
user mode linux. It basically catches everything and everywhere, and 
replaces the entire tasks otherwise performed by the real kernel, and so 
no problem but a HUGE overhead.


Fakeroot-ng goes the middle path. In concept it does what fakechroot 
does - intercept syscalls and either perform them differently, give 
bogus answers or emulate something. The main difference (well, the main 
core difference) is that fakeroot-ng uses ptrace rather than LD_PRELOAD, 
which means that statically compiled programs (as well as programs 
merely not linked with glibc, or linked with a different version etc..) 
are handled. There is just one problem: Since that is the case, when you 
run "chroot /srv/chroots/etch", you get a chrooted process (i.e. - a 
process that fakeroot-ng emulates all path calls for) that tries to load 
/lib/glibc (which fakeroot-ng redirects to /srv/chroots/etch/lib/glibc). 
The entity loading the interpreter, however, is the kernel, and that is 
not controlled by fakeroot-ng. The result is that the Etch glibc is run 
with Lenny's ld-linux, and you get the same error message as above.


The proposed solution

I can't say I have it firmly, or that I know it will work. This is just 
something I'm investigating. The idea is that we modify the execve 
syscall so that instead of running /bin/cat or 
/srv/chroots/etch/bin/cat, we run /srv/chroots/etch/lib/ld-linux.so. 
This will cause the kernel to set up the memory and process state in a 
way that is almost what we want to eventually happen. After a successful 
execve on a traced program, the debugger gets a signal with the program 
traced before it had a chance to execute a single instruction. We then 
manually load /srv/chroots/etch/bin/cat into the process state, and 
modify the runtime structures so that ld-linux will think it was started 
in interpreter mode rather than in direct mode. This will cause the 
right interpreter to be loaded, and everything should work.


There are many steps to climb in this plan, of course, but the only one 
for which I was missing data was this - where ld-linux found out which 
interpreter is active, and what other data is in there that maybe needs 
to be processed. For example, I found out that auxv also stores the uid 
and euid, and I may wish to modify these (as I'm trying to fool the 
program into thinking it's running as root). Then again, things worked 
fine so far without it, and I only need to delve there if I'm doing a 
chroot, so I may not bother. We'll see.


Hope that answered the curiosity part :-)

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux executable startup stack structure

2008-07-03 Thread Shachar Shemesh

Valery Reznic wrote:


I think your proposed solution will work (no reason why not)
  
Actually, I can think of four or five reasons why it may fail, but I'll 
cross those bridges when I get to them.

And if you change AT_ENTRY in the auxv you'll trick ld-linux to think
it was loaded as interpreter and not directly.
But why you need it and what good it will do ?
  
It will allow me to control both which executable is loaded AND which 
interpreter, thus allowing me to emulate the chroot syscall, adding 
another small functionality to what fakeroot-ng can do. I'm not sure 
this program passes the investment/return tradeoff, but it's fun to do 
stuff no one was insane enough to do before, so I go ahead anyways.
Interpreter use this information (interpreter/directly) to adjust argc/argv 
that will be passed to main()
  
Except the argv array passed is the one for interpreter mode, not direct 
mode.


You app does:
chroot("/srv/chroots/etch")
chdir("/");
execve("/bin/bash", array("-bash", NULL))

You would expect to get a login shell, whose "ps" show up as being 
called "-bash" (what makes it a login shell), chrooted.


If you just run your program, chroot will return EPERM because you are 
not root.


If you run it using fakechroot, you will get the chroot version of bash, 
but using the real root's glibc, ld-linux, curses and whatever else bash 
uses.


When you run it with fakeroot-ng, this is what happens today:
chroot - the call is intercepted, and turned into a "geteuid" (or, in 
other words, a NOP). Fakeroot resolves /srv/chroots/etch, and marks that 
as the new root for your process.
chdir - fakeroot-ng intercepts that, and resolves "/" to mean 
"/srv/chroots/etch/", it lets the original chroot continue using the 
altered argument.
excve - fakeroot-ng intercepts that, and turns "/bin/bash" into 
"/srv/chroots/etch/bin/bash". execve continues, load /lib/ld-linux.so.2 
to handle the dynamic linking, which call open on "/lib/libc.so.6". 
Fakeroot-ng intercepts that and turns it into an open on 
"/srv/chroots/etch/lib/libc.so.6". Since /lib/ld-linux.so.2 and 
/srv/chroots/etch/lib/libc.so.6 are of different versions, things break 
down.


What will happen:
execve - intercepted. Fakeroot-ng converts /bin/bash into 
/srv/chroots/etch/bin/bash, reads the file, sees it is ELF, checks the 
interpreter, sees that it is /lib/ld-linux.so.2, converts that to 
/srv/chroots/etch/lib/ld-linux.so.2, make some sanity checks, and alter 
the arguments. Now the syscall that actually goes into the kernel is:

execve("/srv/chroots/etch/lib/ld-linux.so.2", array("-bash", NULL))
As soon as the kernel finishes the setup, fakeroot-ng again takes 
control. It parses /srv/chroots/etch/bin/bash, and make the calls 
(somehow) in the process context to open that file, and map it into 
memory in the correct areas. It also patches auxv's entry points to be 
the correct ones for bash. It then allows the process to go on executing.
ld-linux figures out it was loaded in interpreter mode, parses the bash 
ELF headers (which fakeroot-ng, rather than the kernel, placed in 
memory), and figures it needs to load /lib/libc.so.6. It calls 
open("/lib/libc.so.6")
fakeroot-ng intercepts that call, and converts it to 
open("/srv/chroots/etch/lib/libc.so.6")
Both interpreter and libc are loaded from the chroot environment, so 
everything works


profit


Valery

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Grub weirdness

2008-07-03 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

We encountered a grub weirdness and I can't find any reference to this issue 
on the Internet.


Recipe:
1) Install debian via debian-installer (testing version)
2) Get a "standard desktop" running
3) Download a tar.gz of another debian-installer based system
4) Boot into a network-based rescue disk
5) untar the tar.gz into the system
6) Reboot

From this point the grub boots and shows the prompt, Internet sites suggest 
that the /boot/grub/ directory is malformed, or missing, or doesn't have the 
configuration files - this is not true, everything is there :)


If I "move" the /boot/ directory to /boot.backup/ prior to untaring, then move 
it back to /boot/ (replacing the one found inside the tar.gz) the system 
boots - but with a wrong kernel, obviously.


Ideas?

  
Is /boot on the same partition as the root of the system? If not, are 
they after the tar extraction? Are they the same file system?


Is the version of grub in the tar the same as the version installed?

I'm not sure I understand what the problem is. Is it that the menu 
doesn't come up? If so, does /boot/grub/ exist, and is it populated with 
the stage* files? /boot/grub/device.map? Does the content of 
/boot/grub/device.map make sense?


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Grub weirdness

2008-07-03 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

The "blue" menu doesn't appear, only the prompt.
  
Can you boot anyways? Take the commands written in the menu.lst file 
under the kernel version you want and type them at the prompt one at a 
time, adding "boot" as the last command. It should start the right kernel.


Was the tar taken from an installed or an uninstalled image?

As part of the install process, grub adjusts info so it can find the 
parameter file. It seems to be the only part not loaded in your setup, 
so I'm assuming that's the problem. Try reinstalling grub.



Maybe a better approach would be to "format" the /dev/sda partition first?
  
The only thing you really need is to chroot into the system and run 
grub-install from there.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Grub weirdness

2008-07-03 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

I mounted the problematic disk with a rescue disk.

Under /mnt/custom

Now when I try to run grub-install:
grub-install --root-directory=/mnt/custom /dev/sda

I get 
The file /mnt/custom/grub/boot/stage1 not read correctly


  
Don't use "--root-directory". Chroot into it. Either that, or break your 
teeth on the "setup" and "install" commands available by running grub 
itself.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: New network device causes 'jump' from eth0 to eth1

2008-07-03 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

I moved an HD from one computer to another (not related to the grub issue :D), 
and because there is a different network card, eth0 is not longer present and 
now eth1 is the deacto network card.


I don't want to reconfigure a few products I have bounded to eth0 (mainly 
firewall rules).


How can I "force" it to use the new network card driver on eth0 instead of 
eth1?


Or basically, where is it written that eth0 is 'thismodule' while eth1 
is 'thisothermodule'?


I tried modprobe.conf/modules.conf:
alias eth0 e1000e

Without success - it still - after modprobe e1000e - gives me access to it 
only through eth1



  
On Debian systems, check out /etc/udev/rules.d/z25-persistent-network. 
Just delete the lines for the old and the new network card, and let it 
choose automatically eth0.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux executable startup stack structure

2008-07-03 Thread Shachar Shemesh

Valery Reznic wrote:



Actually, I can think of four or five reasons why it may
fail, but I'll 
cross those bridges when I get to them.


Could you list them ?

  
Let's see. Off the top of my head, these are not necessarily "won't 
work" problems, but obstacles to overcome:
- I need to execute several syscalls in the process context. Usually 
that is a solved problem, as I turn the syscall it was doing anyways 
into a mmap, put the command for syscall in the memory I allocate, and 
then set the program counter there for any additional syscall I need. 
This won't work here because the process is not entering a syscall.
- So we need to initiate a syscall. If the stack is executable, we can 
write a "syscall" command there. If not, we need to look for one inside 
the code. Long and slow process.
- When the kernel loads the interpreter, it uses a different load 
address than when it loads it as an executable. This may cause problems 
for us.
- The memory WE allocate is allocated earlier than we would before. It 
may interfere with other things.


It will allow me to control both which executable is loaded
AND which 
interpreter, thus allowing me to emulate the chroot
syscall, adding 


I don't think so. You intercept execve syscall, and instead of
 
you give it 
  


  
There are three parameters that we need to control, and only two that 
are passed to execve. The three are "which executable to use", "which 
interpreter to load it with" and "what to call argv[0]". My way allows 
controlling all three, your way allows no control over how argv[0] is 
called. I thought of it, and decided it's enough of a problem to justify 
the horrendous thing I'm suggesting here.


I don't remember all of the reasons why I abandoned this route (one of 
them is what appears on "ps", btw), so I don't remember the details, but 
I believe you may also have problems if you try to run a shell script 
that runs a binary that needs an interpreter (i.e. - any shell script).

I.e you already have full control of both program and interpreter that are 
going to be loaded.

But after you execve as
ld-linux program args
 
tricking interpreter to think that it was loaded directly should be a problem. 
  
Which is why I touch execve's first argument (the command to run), but 
not the second (the command line to pass it). I am running ld-linux with 
a command line that is nonsense to it, but then patch the runtime 
environment so that the command line retroactively makes sense again. 
This way, ps still displays the right thing.

Unless you are going to change argc/argv before interpreter get control.
But why bother ?
execve interpreter looks like good solution.
  
Maybe if the above problems prove too much. I don't want to lose argv[0] 
control just yet.

Valery.

  

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: X cursor problem

2008-07-03 Thread Shachar Shemesh

Shlomo Solomon wrote:

Sounds logical, but:
1 - how did this happen in the middle of a session (uptime of a few weeks)?
2 - why didn't restarting X or the runlevel solve this?
3 - how could I have solved this without the re-boot?
  
I'd actually wager on a hardware problem. Modern VGA adapters display 
the cursor as a sprite (i.e. - it does not get rendered into the main 
screen memory). If something is wrong with your card, then maybe it 
stopped displaying sprites until a reboot re-initialized all the registers.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: OpenMoko freerunner warning

2008-07-06 Thread Shachar Shemesh

Arie Skliarouk wrote:

Hi,

On Friday OpenMoko freerunner went on sale, and by now the 900MHz band 
version is sold out with only 850MHz version available.


Someone told me that Orange and Cellcom mainly use 900MHz band, with 
few areas where Cellcom provides 850MHz coverage.


Thus, 850MHz version of OpenMoko turns to be mostly useless for 
Israel, especially for Orange users (as I am).


Can someone confirm that please?

Sounds unlikely.

From memory, so please verify, but as far as I remember, the Neo is 
tri-band, working with 900 and 1800MHz, with some models carrying the 
1900MHz as a third band and others the 850MHz. Orange uses 900MHz and 
Cellcom uses 1800MHz, so both models are totally usable throughout 
Israel. The 850MHz and 1900MHz make a difference mostly inside the USA, 
with the 1900MHz model being somewhat preferable if you want to use the 
phone in Europe and the 850 model being preferable for the USA.


Either way, all models are 100% usable with all Israeli carriers.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: OpenMoko freerunner warning

2008-07-06 Thread Shachar Shemesh

Shachar Shemesh wrote:

Arie Skliarouk wrote:

Hi,

On Friday OpenMoko freerunner went on sale, and by now the 900MHz 
band version is sold out with only 850MHz version available.


Someone told me that Orange and Cellcom mainly use 900MHz band, with 
few areas where Cellcom provides 850MHz coverage.


Thus, 850MHz version of OpenMoko turns to be mostly useless for 
Israel, especially for Orange users (as I am).


Can someone confirm that please?

Sounds unlikely.

From memory, so please verify
Ok, I did verify, and your original statement was right. You really want 
the 900 version in Israel, and that one is sold out.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux executable startup stack structure

2008-07-06 Thread Shachar Shemesh

Valery Reznic wrote:


Now I see it. You ager going to make string in "ps" to looks good.
  
That's part of it, but not all of it. If the only problem was the "ps" 
output, I would have lived with it. The real problem is that argv[0] is 
an actual argument that some programs use.


Think of the following case (which is why fakeroot-ng was originally 
conceived). You want to set up a chroot for some embedded development. 
You compile busybox and copy it in, creating all of the symlinks (i.e. - 
$root/bin/ls is a symlink to /bin/busybox etc.) Now you chroot into $root.


When you run "ls", you do so using the following command:
execve( /bin/ls, array( "/bin/ls", options, NULL ) )

since we're inside a chroot, fakeroot-ng needs to resolve all links 
itself to make sure they do not go outside the chroot. So the function 
now looks like this:

execve( $root/bin/busybox, array( "/bin/ls", options, NULL ))

so far, not a problem. However, you suggest we turn it into:
execve( $root/lib/ld-linux.so.2, array( "$root/lib/ld-linux.so.2", 
"$root/bin/busybox", options, NULL ) )


That will simply not work. Busybox needs argv[0] to know it is running 
as "ls".


This is not aesthetics. This is functionality.

Thank you for the explanation.

Valery.
  

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: stability of exitcodes

2008-07-07 Thread Shachar Shemesh

Gabor Szabo wrote:

So am I doing something incorrectly or can I just assume that the exit
codes can change
even between Linuxes?
  

The later.

Some commands define that certain exit codes have certain meanings (see 
the rsync manual, the section headed "EXIT VALUES"). For every other 
command the only thing you can assume is that zero means success and 
non-zero means failure.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux and SSD (solid-state drives) drives

2008-07-23 Thread Shachar Shemesh

David Shwatrz wrote:

My question is this:
I know that the ONLP project uses FLASH drives. This probably
gave some push for developing FLASH filesystems for Linux.
what is the state of Linux regarding SSD ?
  

From some talk to someone working at SanDisk, I gathered the following:
They don't like jffs. The guy claims that jffs is suited for explicit 
flash devices (where the flash device appears as a character device), 
but not for an SSD, where the machine-device interface is that of a 
standard disk (block level access). I'm not sure I understood this part 
of his statement correctly, and in any case, it may be due to the 
technical reasons that follow, rather than any actual interface 
differences between standard flash memory and SSDs.


The push for lowering of the manufacturing costs means that the actual 
flash memory inside is able to sustain less and less erase-write cycles. 
To compensate for that, the SSD controller uses dynamic mapping between 
block number and actual storage region. This means, if my understanding 
is correct, that a block deemed rarely updated (say, the master boot 
record of the disk) may get copied over to a flash area that is near its 
erase limit, so that the area it used to occupy (which has a low erase 
count precisely due to the reason stated above) can be used for more 
frequently updated data, extending the overall lifetime of the device.


What the SSD manufacturers would really like is, perhaps, not so much a 
flash aware filesystem, but an implementation of bus extensions that 
allow the OS to report to the SSD that a certain block is no longer in 
use (which would allow the flash device to stop copying it around all 
the time), or, according to a more advance proposal, even list typical 
uses, which would, again, allow the SSD to better place the blocks (i.e. 
- less copies, resulting in longer lifetime).


If I understand this correctly, adding such support requires changes 
throughout all of the layers, from bus communication all the way up to 
user space reporting. As far as I know, Linux has no such support at the 
moment (with the possible exception of the bus level as third party 
patches). Windows neither.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



NTP not updating the local clock

2008-07-23 Thread Shachar Shemesh

Hi all,

I have a strange problem, and it is happening on several servers.

I set up NTP to synchronize, sometimes with a local NTP source (say, a 
Windows Server domain controller) and sometime external (the usual ntp 
servers). The NTP process is working, and displays the time offset 
properly. However, it does not keep the machine synchronized with the 
server.


You can see images from munin monitoring that machine, showing how the 
time keeps drifting away. At some point I ran ntpdate, and that 
synchronized the clocks ok until the times started drifting apart again.


Any idea where to look for the source of the problem?

Shachar
http://www.lingnu.com/files/ntp-day.png
http://www.lingnu.com/files/ntp-week.png

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: NTP not updating the local clock

2008-07-23 Thread Shachar Shemesh

Noam Meltzer wrote:

Hi,

Can you show us an example of /etc/ntp.conf ?
Attached as is. The Debian pool servers are unreachable due to the 
firewall. I can try removing them, but I doubt it will make any 
difference. They hardly show up when you do ntpq, so I doubt they matter.


Shachar
# /etc/ntp.conf, configuration for ntpd

driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable


# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to more than 300 low-stratum NTP servers.
# Your server will pick a different set every time it starts up.
#  *** Please consider joining the pool! ***
#  ***  ***
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
server 172.16.1.1
server 172.16.1.2

# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict 192.168.123.0  mask  255.255.255.0 notrust

# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth
#broadcastclient


Re: NTP not updating the local clock

2008-07-23 Thread Shachar Shemesh

Oren Held wrote:

On Wednesday 23 July 2008 16:26, Shachar Shemesh wrote:
  

I have a strange problem, and it is happening on several servers.

I set up NTP to synchronize, sometimes with a local NTP source (say, a
Windows Server domain controller) and sometime external (the usual ntp
servers). The NTP process is working, and displays the time offset
properly. However, it does not keep the machine synchronized with the
server.



Maybe you already checked that, but just in case you didn't:
*BEFORE* running ntpd, the clock should be more-or-less sync'd (I think - up 
to 2min drift). If drift is too high, ntpd won't even try to fix the clock.
  
They were synced when I ran ntpdate. Even now the difference is about 11 
seconds - not enough to cause ntp to not synchronize.

That's why most distros run ntpdate on boot before starting ntpd.

Also paste the ntpq -p output as was already suggested here.
  

I removed the debian pool servers, and this is now the output:

machine:~# ntpq -p
 remote   refid  st t when poll reach   delay   offset  jitter
==
 dc01.domain.com .LOCL.   1 u-   64  3770.209  11100.4   2.143
 dc02.domain.com 172.16.1.1   2 u   10   64  3770.211  11093.9   7.942


As you can see, the stratum is low (dc01 reports itself to be stratum 1, 
which I find highly unlikely, but it is irrelevant to this discussion). 
We know that the machine CAN set its time, because ntpdate does work. We 
can see that the difference is all of 11 seconds - should not be enough 
to cause ntp to give up.


Here's another interesting piece of trivia, which may be the clue:

machine:~# cat /var/lib/ntp/ntp.drift
19.157

So NTP is trying to set the drift.

Another piece of trivia is that the servers are awfully out of sync with 
the real clock. While my local clock (3ms apart from one of the Debian 
pool servers) shows 8:58:51 IDT, the server's clock (11 seconds apart 
from the domain controller) shows 09:02:10 IDT, which is more than two 
minutes apart. Maybe I'm looking for the problem at the wrong place


Thank you all for trying to help. I'll take it up with the local 
sysadmin there.


Shachar


Re: Iglu site down?

2008-08-04 Thread Shachar Shemesh

Dotan Cohen wrote:

I cannot reach http://www.iglu.org.il/ for several days. Even
http://downforeveryoneorjustme.com is timing out. Can others
confirm/deny these findings from where you are? I am in Nesher,
connecting via HOT and BezeqBeinleumi (Actcom z"l).

  
iglu.org.il has been down for about a year now, as part of an attempt to 
merge the material there into the main Hamakor site. Ideally, we would 
have with that, but the only person with both knowledge of the old data 
there and a self proclaimed time to work on it is refusing to do 
anything unless he:

1. Gets root on the machine
AND
2. Restores iglu to its old state, precisely.

If you tell me what you were looking for in iglu, I can perhaps direct 
you to the new location (or make sure the new info is up), and thus we 
can make everyone's life better :-). If you also have specific links, I 
can even make sure we have a redirect.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Iglu site down?

2008-08-04 Thread Shachar Shemesh

Shlomi Fish wrote:
Actually, in a further email, I eventually said that I agreed to do anything 
you allowed me to do, and nothing more, as long as I can work on it.
That's great to hear! Then lets move the content into the CMS so that 
people other than you can work on it, and set up redirects from the old 
URLs. You already have all the permissions you need to do that.


Personally, I would start with the URL you gave Dotan.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Iglu site down?

2008-08-05 Thread Shachar Shemesh

Shlomi Fish wrote:

On Tuesday 05 August 2008, Shachar Shemesh wrote:
  

Shlomi Fish wrote:


Actually, in a further email, I eventually said that I agreed to do
anything you allowed me to do, and nothing more, as long as I can work on
it.
  

That's great to hear! Then lets move the content into the CMS so that
people other than you can work on it,



They already can using Subversion, etc.

Except nobody but you manages to, unlike the Joomla setting.
 I have my own custom HTML generators 
for stuff like that which are superior to such CMSes that only give you a 
gigantic textarea to edit your HTML in.
Your definition of "whatever Shachar says" is definitely new and 
refreshing. I think we can stop this rehash right here. Obviously, you 
are still set on not changing anything, not matter what.
 So I'd rather not switch from my own 
generators,
Yes, I know that. The problem is that everyone else would rather you 
switch, or you are locking out other contributers. Fact is, no one else 
touched the old sites, but we have had more than four people putting 
content on the new one. I would trade four for one any day, thank you.

Not to mention that the Joomla URLs are still very obscure and ugly:

* http://www.hamakor.org.il/content/view/32/43/
  
For someone who self testifies that he can learn from feedback, you have 
a lousy memory. I already pointed you to several modules that fix it, 
and you said you will. Needless to say, I'm still waiting.



Personally, I would start with the URL you gave Dotan.



Which URL? And see my other email.
  

http://www.hamakor.org.il/mailing-lists/

Even when you put things on the right domain, you refuse to use the 
technology used there.


See? That's why I (and most other people I've been talking with) find you 
impossible to work with.
Are those the same people who deny it when you drag them, against their 
will, into the discussion? The same that, on different occasions, call 
to bitch to me about your strong headedness regarding these very issues? 
I think this is one criticism I can take.


Please put www.iglu.org.il somewhere meaningful on tux.hamakor.org.il and let 
me edit it.
Which is exactly why I don't do it. Because what you'll do is restore 
the old site, with all of its problems intact.


In other words, I'm not giving you control because I DON'T TRUST YOU.

As far as I'm concerned, this thread is over. The matter has been 
discussed to death. The only reason I replied now was because it seemed, 
for a second, that you may actually be willing to help out in a way 
productive for the rest of us. Sorry, false alarm. Nothing more to see here.

Regards,

Shlomi Fish
  

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Iglu site down?

2008-08-05 Thread Shachar Shemesh

Shlomi Fish wrote:

On Tuesday 05 August 2008, Dotan Cohen wrote:
  

2008/8/5 Shlomi Fish <[EMAIL PROTECTED]>:


Is there not a backup of the old site, from which this can be done?
Not for the sake of our root-wanting friend, but for the sake of TFA?


There is a backup of all the site's data on the tux server. I can use it
to restore iglu.org.il from there given the relevant ability.
  

Just to clear things up before Shahar steps in: you can do that with a
regular account that has ssh write access to /var/www/public-html, no?



I need to forward the www.iglu.org.il / iglu.org.il domains to somewhere 
meaningful on the disk, where I can put PHP apps, Perl apps, Apache 
redirects, etc. At the moment it tries to connect and is unsuccessful, so I 
don't know where it goes to.


  
Let's just start with putting the new stuff in. I'll take care of the 
redirects.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: iptables rule to allow NAT but not local access

2008-08-07 Thread Shachar Shemesh

Geoffrey S. Mendelson wrote:

I want to install a wireless router that is unprotected (it's for a special
occasion).

During the time it is up, I want to allow users on it to access my Internet
connection, but not the computer running the connection (it's the usual 
pptp tunnel).


If I need to I can add an ethernet interface just for the that router.

I'm using a 2.4 kernel so I need an iptables rule.

Any ideas?

Thanks, Geoff.
  
I don't get what the problem is. The "INPUT" table is for access to the 
machine itself, the "FORWARD" chain is for packets merely forwarded 
through the machine. Block everything on "INPUT" and block all of the 
machine's IP addresses on "FORWARD", and you're more or less done.


Unless I missed something here.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: postil.com not working in FF or Konqueror

2008-08-14 Thread Shachar Shemesh

Amos Shapira wrote:

2008/8/14 Yuval Hager <[EMAIL PROTECTED]>:
  

to *make them think* something is wrong with their site.



Interesting idea - you assume they have the required apparatus to do that...
  
While I'm sure Amos meant that as a joke, the reality behind the joke is 
that he may have a point. It is entirely possible, even likely, that 
they (i.e. - the postal company as a whole) have no system in place to 
correlate calls to support with problems in the site.



Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: postil.com not working in FF or Konqueror

2008-08-14 Thread Shachar Shemesh

Ori Idan wrote:
When you call them for support regarding something you could have done 
with the web site IF it would have been built with standards in mind, 
please state it to the service person that you wanted to do it with 
the website but could not and thus calling him/her.
Shachar is right they might not have any system to correlate so we 
must state it clearly that we could have done it with the website but 
it does not function.
What I'm saying is that even if we do it explicitly, they may STILL not 
have any way of correlating. The flow of information inside the company 
is greatly dependent on the systems in place.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux related spam?! [Fwd: בואו ל היות מומחי לינוקס]

2008-08-17 Thread Shachar Shemesh

Omer Zak wrote:

Does anyone know anything about the following spammer?
According to whois, the penguin-it.co.il domain is owned by:
descr:yaron berenholtz adv
descr:12 menahem begin st'
descr:ramat gan
descr:52521
descr:Israel
phone:+972 3 6122111
fax-no:   +972 3 6122119
e-mail:   yaron.be AT gmail.com
And the domain has been registered at 2008 Jan 15.

--- Omer
  
penguin-it used to be Doron Ofek's company. After a chain of events I 
have to admit I have not gotten to the bottom of, this seems to no 
longer be the case.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Linux related spam?! [Fwd: בואו ל היות מומחי לינוקס]

2008-08-17 Thread Shachar Shemesh

Gilad Ben-Yossef wrote:


his two brothers are married to two sisters of my wife's brother wife. 
No, I'm not making this up

Forget making it up. What does it mean? :-)

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: global interactive search-and-replace in bash?

2008-08-18 Thread Shachar Shemesh

Amos Shapira wrote:

Hello,

I have this long command line which I keep changing multiple instances
of host names in it:
  

I know this isn't answering your question, but still:
If you keep using the same command line, why don't you script it?

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Memory manipulator

2008-08-31 Thread Shachar Shemesh

Gilad Ben-Yossef wrote:
At least in theory this should work. I say in theory, because I've 
been getting an error on my Ubuntu trying to open /proc/$PID/mem by YMMV:


$ cat /proc/$PID/mem | hexdump -c > before
$ cat /proc/$PID/mem | hexdump -c> after
You can only use /proc/PID/mem if you are already attached to that 
process as a debugger. This makes /proc/PID/mem somewhat redundant to 
using PTRACE_PEEKDATA. For some reason, even as a debugger, you cannot 
mmap it and use it as a forced shared mem mechanism. Furthermore, I have 
actually had cases where PTRACE_PEEKDATA returned data and /proc/PID/mem 
didn't for the same memory area, even when attached as a debugger. As 
such, I rate /proc/PID/mem as somewhere beneath useless.


What Noam is looking for, as far as I can tell, is something where pause 
the program and tell the debugger "now the value I'm looking for is 5", 
resume the program, play some more, and then pause it and say "now the 
value is 4". Eventually, hopefully, you narrow down the value to the 
point where you know where it is stored in memory, despite not having 
any prior knowledge about the program. This is not difficult to write 
(for some definition of "difficult").


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Memory manipulator

2008-08-31 Thread Shachar Shemesh

Gilad Ben-Yossef wrote:


Shachar Shemesh wrote:

You can only use /proc/PID/mem if you are already attached to that 
process as a debugger. 

How interesting. Where is that documented?
Google. I spent almost half an hour trying to figure that one out. It 
is, indeed, not documented anywhere I could find.
neither the proc man page or the relevant kernel documentation file 
does not mention this.


Don't use no double negatives! Sorry, couldn't resist.



I'm going to send a patch...

Go for it.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: MSO in Wine: Hebrew backwards.

2008-09-03 Thread Shachar Shemesh

Dotan Cohen wrote:

Does anyone know how to fix this?
I do. You need to reinstate the entire BiDi support to Wine. It got 
awfully rusty over years of neglect.


I'll go on record with this another time. I did some work on BiDi on 
Wine, a while back. Unfortunately, I totally ran out of time to work on 
this on my free time, and no one seems interested enough to sponsor my 
work. This means that one of two things need to happen for Wine to have 
BiDi support:

1. Some one offer to sponsor my time (need not be one person).
2. Some one else steps up to the plate and start working on it.

Personally, either one is ok with me. I enjoy working on Wine, and would 
love option 1, of course, but if someone else works on this and needs 
some FOCUSED help, I will gladly provide it. "What do I need to do now" 
is not focused help. "I tried to solve bug #xxx by integrating library 
X, but the encoding is wrong" is a much better.


If you want to go for option 1, but feel you have only a little sum you 
can dedicate to it, feel free to contact me. If enough people 
contribute, each a little, we may still be able to do something.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: MSO in Wine: Hebrew backwards.

2008-09-03 Thread Shachar Shemesh

Geoffrey S. Mendelson wrote:


IMHO this is the kind of thing that the Chief Scientist's Office would
fund.

Hmm.

The Chief Scientist has two limitations that will be hard to overcome in 
that respect:
1. An over-stretched budget. It is, by far, not enough to live up to 
their criteria in order to get funding

2. A request that technologies developed stay in Israel.

2 is a problem for FOSS. While I have heard of companies that managed to 
convince the CS to fund a project where some of the work went into FOSS 
(and, in fact, Wine), it was as part of a larger project that was 
proprietary. I have not heard of the CS funding a purely FOSS project.


In fact, I'm not even sure how the application should be made. The CS 
requires (or, at least, used to require) that they give at most half the 
funding, with the other half coming from external sources. This means 
that to get 10K from the CS, you will need to raise 10K from other 
sources as well. We all know that 10K is hardly enough to achieve much 
on Wine, and we all also know that getting the community to put in 10K 
is extremely hard. At the moment, for example, the sum total raised, 
despite numerous complaints about the matter, totals in a round zero.


So, no, I don't think the CS is a very likely venue.

Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: MSO in Wine: Hebrew backwards.

2008-09-04 Thread Shachar Shemesh

Geoffrey S. Mendelson wrote:


BTW, isn't WINE LGPL? Can you really download the source code for CEDGA
and Crossover? I've never tried, and ask that sincerely.
For version 3 of CrossOver Office, I compiled a DLL from it again with 
BiDi support. I was the first, and as far as I know, the last, to ask 
for the sources. They did not have them ready (they put up the wrong 
versions on the site by mistake), but they did everything they could to 
help me out. They were also extremely surprised when I managed to do it :-)


As for Cedega - they used to rely on a pre-fork Wine, which was of a 
non-copyleft license. I don't know what they do these days.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Financing for Wine BiDi

2008-09-04 Thread Shachar Shemesh

Omer Zak wrote:

How about publicizing in Linux-IL the budget needed to fix Wine BiDi in
terms of money, equipment and human resources?
  

These are rough estimates.

Wine needs the following fields worked on:
1. Move the BiDI code into Uniscribe, where it is on Windows
2. Handle keyboard input language detection (essentially - rewrite 
Wine's input processing - some of it already done)

3. Start fixing the small bugs
4. Implement a BiDi edit control
5. Implement a BiDi rich edit control

Lingnu is willing to chip in on such work, so the base for calculating 
costs is 15Knis/month. Anyone contacting me for work on unrelated 
projects should not expect those prices! 15K + employment overhead 
translates to 110NIS/hour + VAT. Lets make it a round 125 sheqels/hour 
with VAT.


1. Move the infrastructure to where it belongs, split the BiDi algorithm 
down to the components it has with Uniscribe, make sure it works as is, 
implement a glue library (called LPK.DLL on Windows) to resolve circular 
dependencies, and hook the functions back into where they are scattered 
(GDI32.DLL, Advapi32.dll etc.): about a month of work.


2. This is essential to get MSO working. A lot of the basic work is 
done. You can find it attached to bug #735. Still quite a bit of work 
getting it back into a state where it is commit ready. Lets mark it down 
as a week's worth of work, though it might take more


3. These are small bugs. None of them is too big in and on its own, but 
they do require getting 1 above resolved before they can be approached.


4. Unable to tell at this stage

5. Same as 4, only worse :-)

As for getting it done with GSoC, I tried it this year, and people said 
it was too big a task. Oh well


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Financing for Wine BiDi

2008-09-04 Thread Shachar Shemesh

Omer Zak wrote:

Are there Israeli companies, which deploy Linux solutions, and for which
it is worthwhile to avoid dual-booting or virtual machines yet support
clients, who still have legacy MS-Windows applications?
  

Yes and no.

No, no such company will pick up the price tag on its own. Yes, if the 
infrastructure work is done, the remaining part would be economical for 
companies. It's a case of putting money to, potentially, get some back.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Financing for Wine BiDi

2008-09-04 Thread Shachar Shemesh

Omer Zak wrote:


Shachar (Lingnu CEO): can you open a PayPal account (or equivalent) to
collect money from private people?  Or do you have another mechanism to
deal with, say, 300 small payments?

  
PayPal is fine. The main problem is what happens if too few people say 
"I will"? How do you deal with returning everyone's money? There is also 
the bitch of issuing invoices to everyone involved - not a trivial task!

Shachar (Hamakor chairman): are there any tax advantages in getting
Hamakor to handle this, and work out any conflict of interest issues?

  
Not that I can see. Since the money will eventually have to reach a 
business entity, VAT will need to be collected whatever the route. If 
Hamakor was an approved donation organization, then private people could 
offset this against income. Businesses can do that with the current 
situation. The only problem is that Hamakor has not managed to secure an 
approved donation status, so at the moment participation adds nothing.

Shachar (again, Lingnu CEO): seems that we might pull this off - so we
need more realistic estimates of the project cost.  What budget do you
need to cover the cost of reviewing bugs, edit control development and
RTF edit control development?
  
I think we should leave RTF out of it right now. It does not add much to 
the end user experience, and is probably a pain to implement. As for 
edit - I'm supposed to be working on a project for ISOC that will 
implement a BiDi edit control (not in Wine), and hopfully, once that 
project is done, there will be enough reusable code to reduce the cost 
of this element. At the moment, it is hard to estimate.


Please note that even without edit control, even just with #2 support, 
MSO will work.

With this figure, we can plan on 2-stage project, each stage to be
budgetted separately:
stage 1 - plan the project and make estimates.
stage 2 - actually execute.
If the output of stage 1 is made publicly available, then maybe parts of
stage 2 can be performed by outside volunteers with their own sources of
funding.
  
No problem with that. At the moment, the tasks are not really divisable. 
Once #1 and #2 are done, hopefully, that will improve.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Job offer: Lingnu Open Source Consulting

2008-09-11 Thread Shachar Shemesh

Hi all,

Lingnu Open Source Consulting, which is my company (I'm assuming most 
list members know who I am) is looking for a full time software 
developer. Our web site is as http://www.lingnu.com. We are located in 
Kfar Sava, but sometimes the work entails working at client's locations, 
wherever they may be.


About the company: Lingnu is a consulting company. Most of our work is 
by doing smaller or larger scale projects for clients. This means that 
we often get to do just the most interesting parts of what our clients 
need doing :-). This is a non-stagnant work with plenty of opportunities 
to learn and do new things on a monthly basis.


Lingnu offers a no-nonsense work environment. We believe that our 
employees work best when they are not bothered by performance reviews, 
constant requirement changes, status reports and meetings. We also 
believe that personal time is as important to keeping an employee 
productive as anything else, and do not believe in over-time unless a 
client's server catches fire on a Saturday. Our work week is 42.5 net 
hours long, and we will actively kick you out to see your family.


Lingnu is a strong believer in Free Software. The business reality is 
that not all of our work can be open source, but we do try. We also 
encourage our employees to work on open source, even, *within reason*, 
sponsoring said work by allowing them to work during payed work hours or 
hosting the results on our servers.


Job requirements:

   * Self managing autonomous personality. Employee must be able to
 help diagnose what needs to be done, set up reasonable estimates
 for how long it should take, and do it.
   * Desire to learn new technologies
   * Willingness to hunt problems down in other people's code and
 submit patches
   * People's person. Much of the work is customer facing, so good
 human relations is a must
   * Must understand and at least mildly support free and open source
 software.
   * Hamakor membership - an advantage
   * Familiarity with as many of the following technologies:
 o C and C++ - a must
 o Linux programming
 o Linux kernel programming
 o Windows (win32) programming
 o Linux system - what goes where and why. Major advantage to
   people who can show they have installed Linux From Scratch,
   or at least know how it's done
 o wxWidgets or other cross-platform GUI technologies.

Please send CVs to [EMAIL PROTECTED] Please be sure to include which 
Linux distribution you use in the approach letter. Only suitable 
candidates will be contacted. Confidentiality assured.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: GNU Make Problems in Trying to Create a Directory Times and Again

2008-09-17 Thread Shachar Shemesh

Shlomi Fish wrote:
It also happens with a vanilla GNU make. My question is why is the directory 
created times and again in the osvn target?
  
I'm not sure whether that is related, but a directory's time stamp is 
updated whenever something inside it is updated. As a result, any rule 
that DEPENDS on the directory rule is likely to get executed without 
cause. Try replacing the backup dir rule with:


$(BACKUP_DIR)/stamp:
  mkdir -p $(BACKUP_DIR)
  touch $@

Switch anyone who depends on the rule to depend on the stamp file.

Also possible cause of the problem is the fact that you are using an 
intermediate rule. I would do without it. If you insist on keeping it, 
at least mark it PHONY (as well as the all and osvn rules).


Use "make -d" to try and figure that one out.

In other areas:
With your current setup,  you will find that the "date" command gets 
executed over and over again and again. Replace the "=" in all lines 
that employ the $(shell) meta-variable with ":=" to solve that one.


All environment variables are automatically imported to be make 
variables, so the invocation of the shell to get the HOME variable is 
unnecessary - just use $(HOME).


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Shell Variable Injection

2008-09-18 Thread Shachar Shemesh

Shlomi Fish wrote:

Hi all!

I wrote in my blog about shell variable injection:

  
and there I was, thinking that the way to announce blog posts was 
through RSS to those who decided to subscribe 


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Telling libtool/automake to be less anal

2008-09-21 Thread Shachar Shemesh

Hi all,

Libtool is a great tool, and it fits nicely with automake and autoconf, 
making it extremely simple to just take a new project, write a few (less 
than 10) lines to instructions, and get a project that already builds 
static and shared libraries, including support for cross build, out of 
tree builds, make install/uninstall, strip and even packaging the 
sources into a distribution tar ball. Just great.


Except...

I have a problem. The libtool/automake duo, in an attempt to educate the 
developer crowed, forces you to create a library of the form 
"libsomething.so.v.v.v" (where the v's are version numbers). It has no 
other form. As far as standard libraries go, this is not such a huge 
problem. It does become a problem in some border cases.


Case in point: You want to develop a mozilla plugin. It is harmless but 
makes no sense to have the plug-in's name begin with "lib". Also, if the 
plugin's name does not end in ".so", Mozilla will refuse to load it. 
Worse, Mozilla explicitly resolves symbolic links, so merely putting the 
file name as libtool created it (libplugin.so.0.1.2) and placing a 
symbolic link to it will not work. The file has to actually be called 
"libplugin.so".


Here's the question - is it possible to tell the duo to not be so anal 
about the whole thing? I want to create a project that will allow me to 
use automake and libtool to create shared objects, but not force me to 
name them with "lib" at the beginning and the API version number at the 
end. Is it possible?


Alternatively, I would like to use only automake, let go of using 
libtool, and do the same. Problem is, automake has several types of 
programs it builds. These are PROGRAMS for executables, LIBRARIES for 
static libraries, DATA for just data, LTLIBRARIES for libraries built 
through libtool, and a few other non-built files. It does not have ANY 
support for custom build types. The closest I got was:


plugindir = $(libdir)/mozilla/plugins
plugin_LIBRARIES = plugin.so

plugin_so_SOURCES = plugin.c
plusing_so_CFLAGS = -fpic

plugin.so: $(plugin_so_OBJECTS) $(plugin_so_DEPENDENCIES)
   -rm -f plugin.so
   $(CC) -shared $(plugin_so_OBJECTS) -o $@


While not horrible, that last rule is a clean copy of the same rule as 
automake would have created, replacing the static library build rule 
with a shared library build rule. It works, but each time anything is 
updated I get the error:

Makefile.am:3: `plugin.so' is not a standard library name
Makefile.am:3: did you mean `libplugin.a'?


Again, the question is whether there is a way to make automake less anal 
about the whole thing?


Thanks,
Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-22 Thread Shachar Shemesh

Ehud Karni wrote:


will adding a simple rule to make a real link, something like
ln -f libplugin.so.0.1.2 plugin.so
work for you ?
  
Right now I'm not working on a Mozilla plugin (I'm writing a plugin for 
net-snmp agent, which is less anal about such things), so a link is 
neither necessary nor particularly important. When writing Mozilla 
plugins, the problem is not creating the links (running "make install" 
create those links with no extra work). The problem is that mozilla 
does, roughly, the following:

- Scan all files in the plugin directory
- For each file: As long as the type is "symlink", resolve where it 
points to.

- Check whether the file name ends with ".so"

So the above plan (link from .so to the real name) will simply not work. 
Please don't ask me why that is what Mozilla does.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-23 Thread Shachar Shemesh

Ghiora Drori wrote:

Hi,
Use cmake. It is much better then the gnu tool builder stuff. And it 
is free.

kde converted to it.
I did a conversion to if from a large colection of make and ant at 
Israeli company.

recommended.
Ghiora

1. Why did you send this in private?
2. How does cmake handle this problem differently?

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-23 Thread Shachar Shemesh

Oron Peled wrote:


It's basically the same case as any dlopen'ed module, where the
application may elect any name it likes, but with a (platform
dependent) suffix (.so in the Linux case)

Libtool has a standard '-module' option for this which is used during
linking (--mode=link) and weirdly enough is passed as an argument *after*
the gcc argument (but parsed and handled by libtool... hmmm).

For the details you'd want to look at:
 info libtool dlopen building

  
At first I marked this email for "future look at", because I couldn't 
find the man page in question (and, yes, I did try going through the 
info area). I then googled. The following automake makefile does, 
indeed, solve ALL of my problems:


pluginsdir_LTLIBRARIES = plugin.la

plugin_la_SOURCES = whatever
plugin_la_LDFLAGS = -module -avoid-version

This prevents any warnings, and compiles a file that does not have a 
name beginning with "lib", and does not have an SONAME (or, rather, has 
an SONAME that does not contain a version). Thanks!


Now I'm wondering what other options libtool has that do not appear in 
either libtool --help nor at the manual.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-23 Thread Shachar Shemesh

Ghiora Drori wrote:


Having Used cmake (I have no association with them) I found it much 
easier to handle build systems with the cmake.
 then with the autotool chain which I did get to meddle with quite a 
bit in the past.

Have a nice day.

You know, after so much marketing speech one would expect to have some 
sort of actual content. You have said NOTHING about why cmake is better.


From past experience with cmake, I can give you one major con for cmake 
- it requires anyone who wants to build the project to install cmake. 
With the auto tools, I (the developer) need to have autoconf, automake 
and aclocal* but the end user only needs "make", the actual compiler and 
a bourne shell processor. Furthermore, if all the end user has is a 
bourne shell script processor, and I have done my job well (which takes 
no more than running "autoscan" every once in a while), then the user 
will get a complete list of the fact she is missing a 
compiler/make/library when she runs ./configure.


* If I am going to be using libtool then the end user does need libtool 
as well. However, what I said about missing compiler applies to libtool 
as well.


With cmake, the user gets a source package that does not have a simple 
makefile on one hand, yet does not have the standard ./configure on the 
other. I need to trust the user to install cmake in order to build my 
project. Now, if I'm compiling a huge project such as KDE, that may not 
be that big of an issue. Huge projects have the right to demand stuff 
installed on the system before they can do their stuff. If, however, all 
I need is a bunch of files with a simple build environment, then cmake 
is too onerous a demand to make from my users.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-23 Thread Shachar Shemesh

Oron Peled wrote:


You was probably missled by the man page packaged by Debian (upstream
autotools have only info pages).

As I said, run:
  info libtool dlopen building
And it will bring you right to the page.

  
I did. It gave me the man page inside the "info" browser (which I can't 
stand).


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Telling libtool/automake to be less anal

2008-09-24 Thread Shachar Shemesh

Ghiora Drori wrote:


I happen to disagree and I can say so even if any of you do not like it.
This does not mean I have to fix Shachar's problem or even look at at it,
If you are looking for a fight I am not interested.
The thing to take to heart is that if you are looking to convert anyone 
(and it certainly seemed that way), then you picked the wrong way to do so.


In other words, you have the right to disagree, and to say so, but it is 
not likely to be effective unless you back it up with something more 
substantial than "KDE switched". I believe that what Tzafrir was looking 
for, and I know that what I was looking for, is a reason to find out 
about a new technology that we were not aware of that would make our 
lives better. You may, of course, wish to view that as "picking up a 
fight", but I don't think that would be a fair characteristic. 
Unfortunately, I did not feel you supplied such a reason.


Thanks,
Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [YBA] Logical VS Visual Text Selection

2008-10-06 Thread Shachar Shemesh

Jonathan Ben Avraham wrote:

Hi Omer,
The ability to turn off bidi ordering in effect allows visual selection,

No. It just allows logical selection in a visually consistent way.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [YBA] Logical VS Visual Text Selection

2008-10-07 Thread Shachar Shemesh

Jonathan Ben Avraham wrote:

Right, that's what the qualifier "in effect" means.

Visual selection, to me, means "selecting text from a continuous block 
of visually ordered text". If the text is not visually ordered then the 
selection cannot be considered "visual". I conceded that definitions may 
vary.


I agree with Omer that visual selection does not seem all that useful to 
me. I am at a loss to think of what use to the end user a selection 
containing the end of the Hebrew part of a sentence followed by the end 
of the English part of the sentence is going to be. Same goes for the 
beginnings of the sentences combined.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [YBA] Logical VS Visual Text Selection

2008-10-07 Thread Shachar Shemesh

Nadav Har'El wrote:


When you put it this way, it might not sound very useful, but what if
we're talking about part of an hebrew sentence and a piece of punctuation
or whitespace that actually belongs to the English part, but you don't know
that?
Hard for me to answer. Care to give an example? Sentence + which part 
you would like to select, please.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [YBA] Logical VS Visual Text Selection

2008-10-07 Thread Shachar Shemesh

Nadav Har'El wrote:


Another presentation was given there on a similar topic by Eli Zaretskii
who focused, believe it or not, on the MS-DOS EinsteinWriter (yes, this
editor was an antique even at that time ;-)), and how well it treated
(in his opinion) cursor movement. I'm not sure Eli's opinions were the same
as Doug's:

http://www.m17n.org/conference/m17n2000_all_but_registration/proceedings/zaretskii/m17n2000.ps.gz

  
Haven't read any of the presentations yet - all this is from memory and 
personal experience.


Einstein stored stuff, internally, using a visual memory layout. As a 
result, all reordering decisions were taken during input (rather than 
the way more traditional today - input gets stored in the same order it 
is done, and reordering takes place during output. In fact, input order 
pretty much defines what "logical order" means). As a result, Einstein 
had some pretty unsolvable scenarios which it coped with by having a 
"typewriter mode" - direct visual input of code.


On the major plus side - this mode was clear to everyone. No one had to 
ask themselves "what should I do in order to get the right result?". On 
the negative side, the world has gone past the age of fixed width 
non-editable text input.


Einstein is a fond memory as far as simplicity goes, but there it ends. 
I do NOT want to go back to that. I worked with it too long ago to 
remember the details, but I vaguely remember the sigh of relief I had 
when I moved to logical order editors as far as line splitting and 
English text in Hebrew paragraphs. If anyone has a copy of Einstein 
around, I'll be glad to play with it and refresh my memory.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [YBA] Logical VS Visual Text Selection

2008-10-07 Thread Shachar Shemesh

Shachar Shemesh wrote:


Einstein is a fond memory as far as simplicity goes, but there it 
ends. I do NOT want to go back to that. I worked with it too long ago 
to remember the details, but I vaguely remember the sigh of relief I 
had when I moved to logical order editors as far as line splitting and 
English text in Hebrew paragraphs. If anyone has a copy of Einstein 
around, I'll be glad to play with it and refresh my memory.

Hmm

So I downloaded Einstein, and after a couple of minutes I failed to find 
any of my old frustrations. Picture at 
http://www.lingnu.com/files/einstein.png


Things to notice in the above picture:

   * When in the middle of typing English text, and typing a neutral
 (apostrophe for the "don't"), it appears at the "wrong" end until
 we type the letter immediately after it, same as with new editors.
 If Einstein didn't solve it, I doubt this "problem" has a solution.
   * The selection is logical
   * The cursor can be outside of the typed area, making much of the
 "position at end - position at beginning" debate moot. Of course,
 this is only possible because the editor is a monospace creature.

Does anyone remember how you tell it to switch to an English paragraph? 
All I could manage were Hebrew paragraphs aligned left.


The main thing I noticed is that the cursor is a block rather than a 
line, covering a letter. This has UI implications as far as "how do I 
get the next letter to appear -->here<--". All in all, I found it more 
confusing than the current method (as, after all, the editor is still in 
insert mode). This is, of course, a side effect of the editor being a 
text mode creature - no facilities for line cursors.


Returning to English text in order to edit it was fine unless you tried 
to do it at the extremes. Then things got as confusing as they always 
are. All in all, I prefer the modern solutions.


Suggestions for things to try out are welcome.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



GCC precompiled headers not working

2008-10-10 Thread Shachar Shemesh

Hi all,

I'm having trouble getting gcc to do pre-compiled headers. The 
instructions for doing it are at 
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html.


Here's what I got:
precomp.h:

#ifndef PRECOMP_H
#define PRECOMP_H

//#error Include twice

#include 

#endif


hello.c:

#include "precomp.h"

int main()
{
printf("Hello, world.\n");

return 0;
}

Here's what I do:
$ gcc -x c -o precomp.h.gch -c precomp.h -g -Wall -O2
Uncomment the "error" line
$ gcc -x c -o hello.o -c hello.c -g -Wall -O2
In file included from hello.c:1:
precomp.h:4:2: error: #error Include twice

Now, here's the strange part, when I run the compile command through 
strace, strace shows:
20522 open("hello.gcda", O_RDWR)= -1 ENOENT (No such file or 
directory)
20522 stat64("precomp.h.gch", {st_mode=S_IFREG|0644, st_size=3056, 
...}) = 0

20522 open("precomp.h.gch", O_RDONLY|O_NOCTTY) = 4
20522 fstat64(4, {st_mode=S_IFREG|0644, st_size=3056, ...}) = 0
20522 read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1\0\3\0\1\0\0\0"..., 
24) = 24

20522 close(4)  = 0
20522 open("precomp.h", O_RDONLY|O_NOCTTY) = 4
20522 fstat64(4, {st_mode=S_IFREG|0644, st_size=86, ...}) = 0
20522 read(4, "#ifndef PRECOMP_H\n#define PRECOMP"..., 86) = 86
20522 close(4)  = 0

So, to recap:

   * My version of gcc DOES support precompiled headers.
   * I am placing the precompiled headers file at the right location
   * gcc DOES manage to find my precompiled header file when it
 searches for it
   * But it ignores it!

Now the gcc page does give a list of reasons why a precompiled header 
might be ignored, by my test case does not appear to cover any of those 
reasons. The header file is a simple one, no defines before the 
precompiled header, exact same command line to both header and body 
code, only one per file.


Anyone either understanding the man page or having an idea what I'm 
doing wrong is welcome to let me know.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: GCC precompiled headers not working - solved

2008-10-10 Thread Shachar Shemesh

Shachar Shemesh wrote:

Here's what I do:
$ gcc -x c -o precomp.h.gch -c precomp.h -g -Wall -O2
It appears that, in strict contradiction to what the HTML manual says, 
-x should NOT be used. When it is used, the file is compiled as if it is 
a source file. When it is not used, the file is compiled as precompiled 
header.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Email Hosting (POP+SMTP) Recommendation

2008-10-10 Thread Shachar Shemesh

Shlomi Fish wrote:

So all the email sent to [EMAIL PROTECTED] is bouncing.
No, that's not it. It's not that email sent is bouncing. It is that it 
is bouncing with an explanation that accuses the sending SMTP (hamakor 
server, in this case) of being a host for spam, yet provides no proof of 
actual spamming ever taking place. Further more, if you follow the 
resources linked from the very page you are directed to, you get to a 
bunch of sites maintaining lists. Hamakor server's only appearance on 
the list is as a positive feedback (i.e. - was checked and found good).


The actual page linked to does offer to take the server off the list, 
but using a scare tactic - you give your email address and name and 
promise the problem has been taken care of, while there is no listed 
problem to take care of.


Worse, in "how to stay clean", they offer two suggestions. Clean your 
computer from viruses (need I mention that Hamakor server is running 
Linux?) and change the reverse lookup of the server to something 
containing "mail" or "smtp". The audacity of an administrator to think 
they can dictate to other server operators what to call their servers 
seems, to me, beyond words. How dare they try and tell me what to call 
my server, on pain of not receiving emails sent? It breaks every level 
of trust out there.


What is worse, they are actually shifting the blame to make it sound as 
if it is our server that did something wrong. Shlomi, who I think no one 
can accuse of being SMTP illiterate, still approached me first asking me 
to fix the problem (which I have no way of doing).


Just venting off steam here.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Re, more readable?: Email Hosting (POP+SMTP) Recommendation

2008-10-11 Thread Shachar Shemesh

Shaul Karl wrote:

Take 2. More readable?


Perhaps the real problem is that the rdns does not point to the sending domain?

$ host tux.hamakor.org.il
tux.hamakor.org.il has address 82.80.248.176
$ host 82.80.248.176
176.248.80.82.in-addr.arpa domain name pointer 
bzq-82-80-248-176.dcenter.bezeqint.net.

  

And how is that cause for black listing?

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Re, more readable?: Email Hosting (POP+SMTP) Recommendation

2008-10-11 Thread Shachar Shemesh

Shaul Karl wrote:

Take a look at [3-5] of 
http://whatsup.org.il/index.php?name=PNphpBB2&file=viewtopic&t=45462
  
Yes, I'll try to solve it. However, experience shows that this is not, 
by far, a simple thing to ask. I'll handle it next week sometime and see 
whether anything changes.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Penetration testing tools?

2008-10-16 Thread Shachar Shemesh

Josh Amishav-Zlatin wrote:


Hey Aviram,
  
Aviram is cooling off. We all lose our temper every once in a while. 
I'll do my best, but the text below is based on my (probably flawed) 
understanding of Beyond's product.

though I have yet to see an automated scanner, including yours, that finds
all
I have not found anyone willing to attest to "all" at all, no matter the 
cost and no matter the tool.

 (or even most) blind SQL injection vulns.
You might be right. I am yet to find anyone even seriously looking for 
them :-)


What (some of) the products by Beyond do, however, is to manually set 
the path, and then automate this for other URLs/later site updates. So 
it may not (I don't know) check for all blind SQL injections 
automatically, but it certainly shortens the time and effort needed to 
carry out those tests.

 The truth is automated
scanning is good at catching the low hanging fruit. It can be a useful
tool when used in conjunction with proper manual testing.
As far as I know, that is precisely what Beyond is doing (not for $30, 
though).

 However, it
would be naive to believe that an application is free from high risk
vulns just because it passed some automated scan.
Well, it would be naive to think that merely because an application was 
audited by four highly known pen-testers scanning each line that it is 
free from high risk vulns. So, yes, obviously the second option will 
provide better promises of safety, but that's just it - it is all about 
trade offs. The more automated a test is, the less it is going to find, 
but the less it is going to cost. I did think, upon hearing the 
(technical) sales pitch that (some of) beyond's products break the line 
between "high assurance" and "cheap", which means they may be cost 
effective (again - sometimes, and depending on how much their cost) for 
your need.

 I think you know as
well as I do the limits in writing generic plugins that are successful in
identifying a specific vuln in a custom app 100 percent of the time. For
example, how many automated scanners can identify insufficient access
control vulns where by rotating a number in the request, you can
access arbitrary client information? An automated scanner has no way
of knowing the meaning of the 'clientID' parameter, or whatever
arbitrary name the developers gave it. 
  
Actually, fuzzing parameters is something I think many automatic 
scanners should do. I have to admit total rust in that area, so I cannot 
tell whether they actually do, but Like Halvar Flake once said - the 
best fuzzing tool he knows is called "perl".


I should point out that I once spent a week of peeking my eyes out at 
the code for FW-1 version 4 (aka CheckPoint 2000), looking for format 
string vulnerabilities. Come the following week, "all" that I had to do 
was repeat the process with version NG of the same program. I spent a 
couple of days writing a program that will do the "grep" for me, 
eliminating the major class of false positives. The remaining three days 
were enough to scan the (larger) mass of code for the new version.


A couple of months later, a hacker found a format string vuln in 
CheckPoint 2000. When we went to fix it, I went to check whether the 
same problem didn't affect NG as well. It didn't - I found it there and 
fixed it. The manual scan made me miss some secondary format string 
functions, which I successfully found using the help of a tool.


Conclusion: Automatic, and semi automatic tools, can be a great help. 
There is no reason to knock ALL of them off, merely because they don't 
reach an Utopian 100% mark that is impossible anyways.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Penetration testing tools?

2008-10-17 Thread Shachar Shemesh

Josh Amishav-Zlatin wrote:


It sounds like you agree with my original statement that if the web
app is high risk, then manual testing should be used in conjunction
with automated testing. 
  
The only thing I disagree with is the relevance to this thread. Amos 
specifically asked about automatic tools, presumably after understanding 
the trade offs.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Kernel bug? Reading from master PTY when no slaves are open

2008-10-17 Thread Shachar Shemesh

Hi all,

If I try to read from a master PTY when no slaves are open I get an IO 
error. This would be okay with me, except:
- Select keeps flaging the fd as having read data, resulting in 100% CPU 
utilization

and
- The slave end is the controlling TTY for a process, so it is possible 
to pick up the slave part again by opening /dev/tty, at which point 
reading from the master end, again, behaves as it should.


My main problem is that I have not found a way to wait for the master 
end to behave sanely. At the moment, I'm stuck with leaving a dangling 
file descriptor on the slave end to the TTY, despite there being nothing 
useful done with that file descriptor.


Is this a kernel bug (I have found no documentation for this behavior)? 
Is this intentional (then how do I wait without polling for reads from 
the master to make sense again)? Am I missing something here?


Thanks,
Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Kernel bug? Reading from master PTY when no slaves are open

2008-10-19 Thread Shachar Shemesh

Nadav Har'El wrote:

On Fri, Oct 17, 2008, Shachar Shemesh wrote about "Kernel bug? Reading from master 
PTY when no slaves are open":
  
If I try to read from a master PTY when no slaves are open I get an IO 
error. This would be okay with me, except:
- Select keeps flaging the fd as having read data, resulting in 100% CPU 
utilization

and



Hi Shachar,
I'm afraid I don't understand why you consider this to be a bug. select(),
according to its manual, is supposed to return "ready" when "it is possible to
perform the corresponding I/O operation (e.g., read(2)) without blocking".
In your case, you can indeed read() and it won't block - it will return an
error, but NOT block.

That's the bug. Not in select.

 It is up to your application (as a sane application)
to notice that one the fds on its select() list has an error, and drop this
fd from the list.
Except I can't, because a master PTY, unlike other FDs, might be invalid 
now but valid later on. That's the bug.

 Only a broken application would keep this broken fd on the
list and cause an infinite loop.
  
It really does pay to read the whole mail before answering parts of it, 
doesn't it? :-)


You bring up an interesting point. I am not aware of a solution for this
issue. But I wonder if there's a satisfactory solution. If there was, and if
closing the last open copy of a certain pty (slave) is not final, how can
you ever recycle the masters?
  
I think it is fair to say that so long as the PTY is the controlling TTY 
for an application then it still has open references. Just like a file 
that has all of its directory references erased, but is still open by an 
application, is not considered erased and does not have its storage 
reclaimed by the file system. THAT is where, I think, the kernel bug lies.


In other words, to really close the last copy, you should also detach 
the application from the TTY.


Good question :-) I'm also hearing a better answer from someone.

  
In the mean while, I did some more tests. Select consistently reports 
the master end non-blocking for read and writes, and does not report any 
errors on it, whether there is any open slaves or not.


I'm attaching a small test program. The parent holds the master end of 
the PTY, waits using select, and prints what it gets. It prints the 
error if it receives one. The child prints something to the slave end, 
waits one second, closes the slave end, waits one second, opens 
"/dev/tty", and prints something else there, waits one second and exit.


When running the program, you get the initial message, a second of 
silence, a whole lot of "IO error"s for one second, and then the second 
message, a second of silence, and the program exit. Any suggestions how 
to make this program work without the bunch of errors in the middle will 
be welcome.


Shachar
#define _XOPEN_SOURCE

#include 
#include 
#include 
#include 
#include 

#include 
#include 

int main()
{
int masterpt=posix_openpt(O_RDWR);

if( masterpt==-1 ) {
	perror("Failed to get a pseudo terminal");

	return 2;
}

if( grantpt( masterpt )!=0 ) {
	perror("Failed to change pseudo terminal's permission");

	return 2;
}

if( unlockpt( masterpt )!=0 ) {
	perror("Failed to unlock pseudo terminal");

	return 2;
}

int childpid=fork();
if( childpid==0 ) {
	// Child

	// Detach us from the current TTY
	setsid();
	
	const char *name=ptsname(masterpt);
	int slavept=open(name, O_RDWR ); // This line makes the ptty our controlling tty. We do not otherwise need it open
	fprintf(stderr, "Opened %s with fd %d\n", name, slavept);
	close( masterpt );
//close( slavept );

sleep(1);

close( slavept );

sleep(1);

slavept=open("/dev/tty", O_RDWR);

	fprintf(stderr, "Opened /dev/tty with fd %d\n", slavept);

sleep(1);

int num=write( slavept, "Point1", 6 );
if( num<0 ) {
perror("write failed");
} else {
printf("Wrote 6 bytes, actually wrote %d\n", num );
}

return 0;
}

// We are the parent
int status=0;
int terminate=0;
pid_t wait_id;
do {
	if( !terminate ) {
	fd_set readfd, writefd, errfd;

	FD_ZERO(&readfd);
	FD_SET(masterpt, &readfd);

//writefd=readfd;
errfd=readfd;

	int selret=select( masterpt+1, &readfd, NULL, &errfd, NULL );

	if( selret>0 ) {
#if 0
if( FD_ISSET( masterpt, &writefd ) ) {
fprintf(stderr, "masterpt write ready\n");
}
#endif

if( FD_ISSET( masterpt, &errfd ) ) {
fprintf(stderr, "masterpt error flagged\n");
}

		if( FD_ISSET( masterpt, &readfd 

Job offer: Lingnu Open Source Consulting Ltd. is looking for a full time system administrator

2008-10-27 Thread Shachar Shemesh

Hi all,

Lingnu is looking for a full time system administrator for both in house 
tasks and for handling client requests. Details about the job are 
available at:

http://www.lingnu.com/en/jobs/56-system-administrator.html

Thanks,
Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: ISPs

2008-10-29 Thread Shachar Shemesh

sara fink wrote:



I will be more blunt. It's money issue. They want max profit.

You make it sound like it's a bad thing. Companies wanting to maximize 
their profit is what drives our economy.


The problem here is that they want to maximize their profits by 
hindering competition, which is both short sighted of them and (in some 
cases) illegal.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: cellular modems

2008-11-03 Thread Shachar Shemesh

Gilad Ben-Yossef wrote:



SSH works jut fine of course (and so openvpn).

You tunnel openvpn over ssh? I'm not familiar with that method.

Personally, I run openvpn on TCP port 443. This is indistinguishable as 
far as a listener is concerned, even with a sniffer, from regular https 
traffic, and is allowed out of everywhere. Openvpn even has a mode of 
using a HTTP proxy for the connection, should your ISP insist on one.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [OT] Vacation apology

2008-11-03 Thread Shachar Shemesh

Gadi Cohen wrote:


Hi All

and for this I humbly apologize (well, to the list, not to the spammers).
You probably should extend some apology to the innocent people who's 
email the spammer forged. Still, if we could tell spam from legitimate 
mail for the sake of vacation notices we could do it for non-delivery as 
well, so I guess no huge harm done there.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Links and some info about "IPv6 in Linux" lecture in Herzelinux yesterday (6.11.08)

2008-11-07 Thread Shachar Shemesh

Oron Peled wrote:


 * Shachar, Gilad, can something as minimal as this be coordinated?
   What do you say?
  

No objection here.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: distro with ntfs built in the kernel

2008-11-08 Thread Shachar Shemesh

sara fink wrote:

Hello everyone

I am looking for a livecd of any distro which has built in or as 
module ntfs in the kernel. If someone knows of such a distro, I will 
be glad to hear.

Technically - none of them.

NTFS support is only reliably done with "ntfs-3g". That is a user-space 
file system support (through FUSE).


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Free software trophies competition - 2009

2008-11-24 Thread Shachar Shemesh

Hi all,

I know some of you here are maintainers for free software. Cetril is 
holding another round of its "Trophées du Logiciel Libre" (Free Software 
Trophies). I participated in this competition last year, and I can 
whole-heartedly recommend the experience.


More details at my blog (Hebrew) - http://blog.shemesh.biz/ and at the 
competition's web site http://www.trophees-du-libre.org/index.php?lang=en.


Shachar

To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: grab focus

2008-12-01 Thread Shachar Shemesh

Omer Zak wrote:


OK, I'll bite even though I know of no such utility.
I assume that you are using X-Window server, but without any window
manager.
1. Find or develop an utility for simulating mouse events and delivering
them to X-Window.  Then use mouse events to change focus.
2. Find or write a very simple window manager, which knows to switch
focus by commands via a FIFO, to which your command line utility writes.
3. Is it possible to write a simple application which calls XSendEvent()
with suitable events?

  
1 and 3 will simply not work. Without a window manager there are just 
two options. The X default is that the focus follows the mouse. Changing 
this default will lead to the focus hanging on a certain window until 
changed via the API. There is no mouse or keyboard sequence to tell X to 
switch focus to another window. This is 100% the window manager's task.


As for 2, it will work, but it is probably a gross overkill.

How do you intend to identify the window that is to receive focus? Do 
you have its Window ID? Do you want to do it by screen coordinates?


If the former, RTFM the XSetInputFocus command. Aside from the overheads 
(opening the X session), this is a one function command, and should be 
fairly straight forward. Be warned, however, that it may very well not 
work if a window manager happens to be running, as a window manager has 
total veto power over any command affecting, well, windows (size, 
display/hide, move etc.), so if you are trying to test it with KDE or 
Gnome running, and it does nothing, don't despair. Try it again with no 
window manager.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: grab focus

2008-12-01 Thread Shachar Shemesh

Erez D wrote:

hi


i'm looking for a command line util which lets me change x-focus.
i am running two apps with no window manager, and i want to be able to 
switch focus between the two by command line




any idea ?


thanks,
erez.


I quickly wrote something.

http://www.lingnu.com/files/xfocus-0.01.tar.gz

Let me know if this works for you.

Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: grab focus

2008-12-02 Thread Shachar Shemesh

Omer Zak wrote:


At impulse, I downloaded and compiled it.  The 'Usage:' path works for
me.

>From usability point of view, the documentation (and maybe the
application itself)
Patches welcome. It was a focused effort, oh, maybe half an hour long. 
Most of that time was spent searching for the name of the AC_PATH_XTRA 
configure macro.

 is missing a way to find out what window handles are
there now.  Remember - do not ask the window manager for this
information!
  

Run xwininfo and click on the window.

How about having xfocus display a list of the handles of all open
windows (along with some identifying information such as window title or
controlling process ID - for the user to match up with more information
using ps's output) when provided with no window handle argument?
  

Like Didi already said, xwininfo can do that too.

When done, xfocus will be cool little application!
  
I'm not sure it's worth the trouble of packaging it, but if the need is 
there I have no objection.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: grab focus

2008-12-02 Thread Shachar Shemesh

Tzafrir Cohen wrote:

On Tue, Dec 02, 2008 at 12:18:24AM +0200, Erez D wrote:
  

hi


i'm looking for a command line util which lets me change x-focus.
i am running two apps with *no window manager*, and i want to be able to
switch focus between the two by command line



aptitude install xdotool

http://www.semicomplete.com/blog/projects/xdotool/

http://www.semicomplete.com/blog/projects/xdotool/#id2255989

It uses the XTEST extension. I figure that there are other similar tools.

  
XTEST simulates keyboard/mouse input. The fault with this logic is that, 
with no window manager, THERE IS NOT KEYBOARD OR MOUSE INPUT THAT WILL 
TRIGGER A FOCUS CHANGE. There is nothing to simulate.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [Haifux] Successful Windows Vista refund!!

2008-12-04 Thread Shachar Shemesh

Eyal Rozenberg wrote:

Bravo Zvi!

What was the reason not to go to court, though? I mean, I don't suppose 
you needed the 550 so badly... :-)
  
What is the reason to go to court? They agreed to giving him everything 
he asked for, plus not require him to keep silent about it. It's not as 
if small claims can set a binding precedence anyways.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [Haifux] Successful Windows Vista refund!!

2008-12-05 Thread Shachar Shemesh

Dan Shimshoni wrote:

Zvi,

  - You are our Open Source hero of the week (or maybe of the year,
or maybe decade!).
  
Personally, I think the importance of windows refund reach far beyond 
the scope of "using Linux without paying the Microsoft tax". I wrote 
about it in my blog (http://blog.shemesh.biz/?p=568), but the gist of it 
is this:
The entire validity of a EULA hangs on the article in it Zvi used - 
without it, there is no informed consent to the EULA and the entire 
agreement is null and void. This means that them resisting the refund is 
actually a good thing. What you need to sue them for is for not letting 
you move your copy of vista to a new computer, and use their refusal to 
give refunds as the proof that you did not accept the agreement, and are 
therefor not bound by it.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Capslook Reversed

2008-12-07 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

I have this Kubuntu 8.10 computer that has decided to act different, the 
capslook on this computer works in reverse, turned on means lower caps, 
turned off means upper caps.


I already reset the keyboard layout, x11 layout and regional (hebrew) support, 
with limited success (or no success).


Anyone has an idea? btw in non X11 it works normally.

  
I don't know the context of the problem, but this behavior will happen 
if the computer mistakenly thinks one of the shift keys is pressed. Try 
pressing the two shifts buttons and retesting.


I often see this behavior when working with a virtual machine, where the 
"action" key is shift (or any modifier) related. It sometimes happens 
that the shift down is recorded in the guest OS, but the accompanying 
key is not, and the key release events also not. Most Virtual machines I 
know have fixed this bug by now (that, or I'm configured to work with 
single key action key).


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Many bidi- and Hebrew-related Wine bugs being closed (but not fixed)

2008-12-09 Thread Shachar Shemesh

Dotan Cohen wrote:

 Does
this spell the end of Hebrew support (which has always been terrible)
in Wine?

  
No. The fact no one was working on it spelled the end of Hebrew support 
in Wine. This probably just means that someone got fed up and closed the 
bugs.


Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Many bidi- and Hebrew-related Wine bugs being closed (but not fixed)

2008-12-09 Thread Shachar Shemesh

Oron Peled wrote:


Another (somewhat weird) idea. Maybe we can set a "hebrew-bugzappers"
mailing list and forward all the various *Hebrew Related* bugs (OOo,
Firefox, distros, etc.) This (or an equivalent RSS feed) would serve
as a focus zone for anyone who want to help push these subjects forward.


  

http://hamakor.org.il/cgi-bin/mailman/listinfo/heb-bugzap

You have just been appointed list operator. Enjoy.

Shachar


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Many bidi- and Hebrew-related Wine bugs being closed (but not fixed)

2008-12-09 Thread Shachar Shemesh

Amos Shapira wrote:


Also have you checked crossover office support? I think it's a bit
ahead of the plain WINE project and doesn't cost to much (actually was
given for free in a sale about a month ago).
  
Crossover has no better (and at times, had worse) support for BiDi than 
vanilla Wine. If BiDi is the problem, Crossover is not the solution.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: [off] job offer - Softwa re Engineer in R&D – Python Specialist

2008-12-10 Thread Shachar Shemesh

guy keren wrote:


(note: the work is in a linux environment - which is why i'm also 
sending this message on this list).
I speak for myself here, but I don't think, especially in this rocky 
era, that we should be too picky. I wouldn't like to see openings for 
Windows system programmers, but as far as I'm concerned, anything FOSS 
related flies.


Shachar

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Samba: convert shadow to smbpasswd.

2008-12-17 Thread Shachar Shemesh

Dotan Shavit wrote:



Please note that passwords are not transferred automatically from /etc/passwd 
to the new /etc/samba/smbpasswd file. After running mksmbpasswd all accounts 
are disabled so the system administrator must run smbpasswd for each account 
that needs to be enable.


  
I'll expand on that. The passwords on both Linux/Unix and on Windows are 
stored "encrypted". The reason I am using the quotes is that the 
technical term is not really encryption (a reversible operation given 
the right key), but rather cryptographic hashing, or one way function. 
Given a password, it is easy to calculate its hash (and thus, find out 
whether it is the same password as was given the last time), but given 
just the hash it is not possible to figure out the actual password.


Now here's the catch - /etc/shadow and smb use a different hash function 
for storing passwords. In other words, the same password entered as both 
a Unix password and a Samba password will end up generating different 
hashed values.


What Josh was asking for is, therefor, impossible. Writing such a tool 
would entail reversing the Unix password hash, which is something we 
would like to think is not possible.


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: israelt TV online (again)

2009-01-05 Thread Shachar Shemesh

Oleg Goldshmidt wrote:


Can't they fix the stupid backslashes a couple of years earlier? :-(

  


Isn't this something greasemonkey can do? (never worked with it, don't 
know it beyond a vague concept)


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: israelt TV online (again)

2009-01-05 Thread Shachar Shemesh

Ori Idan wrote:

I tried the link given by Shachar.
The one demonstrating a flash that doesn't work? Or is it the one that 
links to Gal's blog, where he explains that the transition has just 
started, and that most videos are still not-flash?


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: israelt TV online (again)

2009-01-05 Thread Shachar Shemesh

Dotan Cohen wrote:



Ynet still doesn't function properly in regards to videos.



Where do you see video on ynet?

  

Some of the articles have video[1].

According to Gal Mor's blog[2], however, this is being worked on, and 
they are slowly transitioning to flash based video, partly in order to 
increase non-Windows/IE support. I don't think there is anything to gain 
from bugging them at this point in time.


Shachar

[1] - Example at http://www.ynet.co.il/articles/0,7340,L-3650472,00.html
[2] - http://www.holesinthenet.co.il/?p=1532

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: israelt TV online (again)

2009-01-06 Thread Shachar Shemesh

Dotan Cohen wrote:


I really thought that our safety record was alright.
Please note that this is about aviation and maintenance safety, not 
security related threats safety.


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: [OFFTOPIC] IAA Performance

2009-01-06 Thread Shachar Shemesh

Omer Zak wrote:


More recently, it was found that the landing strip in the Uvda airport
(near Eilat) is crumbling and now Israel has no backup airport for big
airplanes.

  
Surprising, especially since Uvda is constantly used for charter flights 
going to Eilat.


Still, saying that Israel has not backup airport is a bit of an 
exaggeration. Most air force bases are suited to handle civic aviation 
in case of a real need, and most can take big planes (at least as far as 
runways are concerned. I'm not sure about parking places and instrument 
landing facilities).


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: lockfs functionality in Linux

2009-01-19 Thread Shachar Shemesh

Michael Sternberg wrote:

Hello
Does Linux have something like lockfs(1M) functionality in Solaris ? I 
want to lock filesystem on some particular volume for writes and to 
flush all caches of that filesystem. After that I want to release the 
lock.

mount / -o remount,ro
?

Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: lockfs functionality in Linux

2009-01-19 Thread Shachar Shemesh

Michael Sternberg wrote:

Shachar Shemesh wrote:

Michael Sternberg wrote:
> Hello
> Does Linux have something like lockfs(1M) functionality in Solaris ? I
> want to lock filesystem on some particular volume for writes and to
> flush all caches of that filesystem. After that I want to release the
> lock.
mount / -o remount,ro
?


1. Is it performs flush of filesystem cache buffers as well ?

Maybe not. Add a "sync" after you have managed the mount.
2. Doesn't it invalidates all handles to that volume that were opened 
with write access ?
As far as I know, it's the other way around - if read-write handles are 
open, it will fail the remount. I'm not sure about this point.
3. Why in Solaris do they have a special command ? "mount / -o 
remount,ro" will work there also..


Will it? I'm not sure. Either way, as I don't know the Solaris command, 
I really don't know the answer.


What does solaris do when you lockfs a filesystem for which I have an 
open write fd? Kill my program? Unilaterally close the fd?


Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: Cross Platform method of importing files

2009-01-19 Thread Shachar Shemesh

Noam Rathaus wrote:

Hi,

I would like to import into an existing project external XML files which will 
be used as internal data by the program I am compiling.


The files need to be included each time I compile the program, and they tend 
to change quite frequently.


Has anyone had experience building such a requirement and making it Cross 
Compile on both Windows and Linux?


  

Are you talking about run-time import or build time import?

For the former, there is expat and derivatives.

Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: Cross Platform method of importing files

2009-01-20 Thread Shachar Shemesh

Noam Rathaus wrote:

Amos,

Thank you for the idea, I will look into that, how would you however import 
the files' content into the Makefile 'automatically' without to actually add 
it to it?


Do you use a perl script to also modify the Makefile?
  
What build system are you using? If you are using bare make, the 
following should do it. Have a header file called "xmldata.h" that looks 
like this:


extern std::string xmldata;

Add "xmldata.cpp" to your make in the usual way.

Add a line to your make file that says:

xmldata.cpp: xmldata.xml
  convert.pl < $< > $@

That should do it.

If you are using automake, some minor twists need to be added.

Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: Cross Platform method of importing files

2009-01-20 Thread Shachar Shemesh

Shlomi Fish wrote:


Just a note - from my experience it's not such a good idea to use redirection 
to the target file inside make.

That is correct.

A better idea would be to call:

./convert.pl -o $@ $<

  

A simpler method is:
  ./convert.pl < $< > $...@.tmp
  mv $...@.tmp $@

Shachar

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: [Linux-il] testing

2009-01-25 Thread Shachar Shemesh

Ely Levy wrote:

Moved to mailman, please report problems :-)

And update your filters..

Problem: the list prepends [Linux-il] to the subject line.

Shachar


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


  1   2   3   4   5   6   7   8   9   10   >