9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:48 rob pike, esq.
  2002-04-11 19:01 ` Dharani Vilwanathan
  2002-04-11 19:17 ` Dan Cross
  0 siblings, 2 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:48 UTC (permalink / raw)
  To: 9fans

You can fix the silly acme bug by adding the second condition
in this if from number() in /sys/src/cmd/acme/addr.c

	Forward:
		while(line>0 && q1<t->file->nc)
			if(textreadc(t, q1++) == '\n' || q1==t->file->nc)
				if(--line > 0)
					q0 = q1;

When the new distribution happens, very soon I hope, this and many other
bugs will be fixed, along with the addition of lots of new ones.

-rob



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:43 rob pike, esq.
  0 siblings, 0 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:43 UTC (permalink / raw)
  To: 9fans

OK, I think it all works if the file has a newline on the end.
Without the newline, 3-#0 is mishandled by acme.  I'll keep
digging.

-rob


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:40 rob pike, esq.
  0 siblings, 0 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:40 UTC (permalink / raw)
  To: 9fans

>    % echo '2-#0+#5,3-#0+#4' > /mnt/acme/9/addr
>    echo: write error: bad address syntax

The syntax error is because you need to say echo -n.
Then you get
	echo: write error: address out of range
because of some stupid bug that stops 3-#0 working
right even though 2-#0 works fine.  I'm digging.

-rob



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [9fans] Highlighting in Acme
@ 2001-06-20 10:46 rog
  2002-04-11 18:35 ` Dharani Vilwanathan
  0 siblings, 1 reply; 8+ messages in thread
From: rog @ 2001-06-20 10:46 UTC (permalink / raw)
  To: 9fans

bell-labs.com!dharani wrote:
> If I have to highlight a portion of text, say character 4 to 8 in line 5, in
> a window in Acme, how can I do it through Acme interface?

when you say "Acme interface" i don't know whether you mean the Acme
user interface or the Acme program (filesystem) interface.

you've chosen a task that's possible, but not elegant from the user
interface:  right button click on the text:
	:5-#0+#4,5-#0+#8
or alternatively:
	:5-#0+#4;+#4

you can give an arbitrary sam-style address there.
given that the Limbo compiler holds file positions in line.charpos
format, i was considering adding a hack to my local acme
that would understand:

	:5.4,5.8

and then the compiler could spit out more detailed positions
that acme could understand (having the compiler spit
out:

	file.b:100-#0+#20,101-#0+#30: some error

seems a bit uncomfortable).
if you want to do this through the filesystem interface,
write the address to the addr file, and write "dot=addr" to
the ctl file.

read the manual.

  cheers,
    rog.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [9fans] Inferno plug-in security
@ 2001-06-19 18:30 erik quanstrom
  2001-06-19 20:58 ` [9fans] Highlighting in Acme Dharani Vilwanathan
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2001-06-19 18:30 UTC (permalink / raw)
  To: anothy; +Cc: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2329 bytes --]

if i understand, you are addressing a situation like
a web page which may have all kinds of unknown modules,
etc.

if that is the case, then i don't believe that signing is
security. just because the module came from microsoft and
was signed with the super-private microsoft key, doesn't
mean that the module doesn't do things that you don't allow.
hey, the key could have been stolen (what would be the chances ;-)
or it might just be buggy (what would be the chances).

i think that you are going to have to run dis modules loaded
in a situation like a web browser into a sandbox that has
very restricted premissions in order to avoid security issues.
in that case, there's not much point to all the complication
of signing.

erik

----------------

//the basic idea in all Plan 9 and Inferno is, that even network connections
//are services offered by directories which are called "file systems"

you're correct, of cource. but think about it in terms of a normal file system,
like local disk or such. different users have different permissions to different
things, right? we can tell these users are different people because they have a
certain key/passwd/response. without signing on a dis module, we face two
problems, both of which exist in any system with no authentication. first,
when someone does something we don't like, we don't know who to blame.
if someone's doing things i don't like on my system, i want to know about it.
similarly, if i load a dis module that does things i don't like, i want to know
who wrote it and/or who gave it to me. second, without any reasonable
method of telling who's who, if i want to restrict _someone_ from doing
something, i have to restrict _everyone_. if, for example, i trust myself, VN,
and the Labs to write modules that make network connections, but not
anyone else, i need to tell who wrote a given module, right? otherwise it's
all-or-none. i'm either too restrictive or too permissive.

security consists of (at least?) two parts: authentication (who am i) and
authorization (what can i do). the file system model is an excelent way of
taking care of authorization, but something still needs to be done for
authentication, so i can trust people are who they say they are. dis signing
is one suggestion of how to do it.
-α.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-11 19:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 18:48 [9fans] Highlighting in Acme rob pike, esq.
2002-04-11 19:01 ` Dharani Vilwanathan
2002-04-11 19:17 ` Dan Cross
  -- strict thread matches above, loose matches on Subject: below --
2002-04-11 18:43 rob pike, esq.
2002-04-11 18:40 rob pike, esq.
2001-06-20 10:46 rog
2002-04-11 18:35 ` Dharani Vilwanathan
2001-06-19 18:30 [9fans] Inferno plug-in security erik quanstrom
2001-06-19 20:58 ` [9fans] Highlighting in Acme Dharani Vilwanathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).