Re: [9fans] fossil permission checking

2008-08-06 Thread erik quanstrom
>>i believe new directories in / are frowned upon
> 
> Understood, though 'bootes' or whoever has superuser-like permissions should 
> still have unlimited abilities, right?

the concept in plan 9 is called the "host owner" or eve.  eve
has special abilities on the local machine.  there are 31 places where
eve is granted special excemption to normal permission checking
in /sys/src/9/^(port ip).  the reason for so many checks is that eve
is given very targeted special abilities.  it's very unlike the unix
superuser.  the fileserver, being distinct from the cpu server kernel,
knows nothing of eve.  as far as the fs is concerned, eve is just another
user.  so eve would not be special on /, which is served by the fs.  on
the other hand, /proc is typicall served by the local kernel and eve
does have special permissions here.  eve can change permissions on
most processes.  this allows eve to debug most processes running
on a cpu server.

> Or is this purely a function of the flags to mount the root?  

yes.

> On a side-note though, what is the preferred UNIX equivalent of /usr/local or 
> /usr2?

there is none.

>> Also, there's not exactly a command like UNIX's sudo, is there?

no.  there's nothing like it.  you may wish to read /sys/doc/auth.ps

- erik




Re: [9fans] sources is back up

2008-08-06 Thread erik quanstrom
> Sources is back up, reincarnated in a different machine that is easier
> to expand in several respects.  The main fossil was reinitialised from
> the fossil dump score of early morning August 3rd; so any changes to
> sources since then are gone.  The old sources had about 12GB of local
> venti arenas; the new one is a venti client of our outside file
> server, which has somewhat more space (this is not a challenge to fill
> it ☺).

many thanks.

- erik




Re: [9fans] SATA VT8251 support?

2008-08-06 Thread erik quanstrom
> Hi Erik,
> 
> I try it this morning, but the server don't boot. I cannot say nothing
> about the problem, because the server is "far far away" and we don't have
> console.
> 
> Probably we need change the 9load to include this SATA support.
> 
> Any help?
> 
> Thanks Eric,
> 
> slds.

pardon the slow response.

could you send me the console output, such as you have?

- erik




Re: [9fans] fossil permission checking

2008-08-06 Thread andrey mirtchovski
> However, permissions are still wrong somewhere, as I can't:
>   cp /adm/timezone/US_Pacific /adm/timezone/local

/adm/timezone files are owned by the user/group 'adm', so if you want
to modify them you should add the user you're doing this as to that
group.

i believe the issue comes from the instructions assuming that one is
either serving fossil with the "don't check permissions" flag, or has
done a "disk/kfs allow" (remember that command, anybody? :)

having no user who can circumvent the file permissions is a very good
thing, i believe.



Re: [9fans] fossil permission checking

2008-08-06 Thread Uriel
There is no 'super-user' in Plan 9, bootes is (for the most part) a
user like any other, that just happens to be the owner of most kernel
file servers. It has no special privileges, in Plan 9 there is nothing
like root that lets you ignore file permissions and so on, the kernel
applies the same rules to everyone.

This is one of the things that were badly broken in the Unix security
model and was fixed in Plan 9. I specially recommend reading the
'Security in Plan 9' paper.

Peace

uriel

On Thu, Aug 7, 2008 at 3:01 AM, Benjamin Huntsman
<[EMAIL PROTECTED]> wrote:
>>i believe new directories in / are frowned upon
>
> Understood, though 'bootes' or whoever has superuser-like permissions should 
> still have unlimited abilities, right?
> Or is this purely a function of the flags to mount the root?  On a side-note 
> though, what is the preferred UNIX equivalent of /usr/local or /usr2?
>
> However, permissions are still wrong somewhere, as I can't:
>   cp /adm/timezone/US_Pacific /adm/timezone/local
> per the last part of the installation instructions, which also yields a 
> permission denied message, even while logged in under the 'out-of-the-box' 
> user glenda.
>
> Thanks again!
>
>
> -Original Message-
> From: [EMAIL PROTECTED] on behalf of andrey mirtchovski
> Sent: Wed 8/6/2008 5:24 PM
> To: Fans of the OS Plan 9 from Bell Labs
> Subject: Re: [9fans] fossil permission checking
>
> / is indeed mounted without -c. if you want to create a directory in /
> use /root. see 'nm' for how the namespace is constructed.
>
> i believe new directories in / are frowned upon (even if created in
> /root). i can't find the relevant message in the archives.
>
> On Wed, Aug 6, 2008 at 6:10 PM, Benjamin Huntsman
> <[EMAIL PROTECTED]> wrote:
>> I'm having some trouble setting up a terminal (which will become a cpu/auth 
>> server).
>> I've gotten the 9pccpuf kernel booted, and is running as the user bootes, 
>> but even from the server's console, if I type something as simple as "echo 
>> hi > /foo" I receive the message:
>>
>> mounted directory forbids creation
>>
>> I've basically followed the wiki pages on setting up a standalone auth/cpu 
>> server, though it's not getting me very far on the fossil side of things...  
>> I chose all of the defaults during the install process,
>>
>> Can someone give me a quick tip as to how to set up a new cpu/fossil user 
>> that can actually write to something other than their home directory?
>>
>> Also, there's not exactly a command like UNIX's sudo, is there?
>>
>> Thanks in advance!
>>
>>
>
>
>



Re: [9fans] fossil permission checking

2008-08-06 Thread Benjamin Huntsman
>i believe new directories in / are frowned upon

Understood, though 'bootes' or whoever has superuser-like permissions should 
still have unlimited abilities, right?
Or is this purely a function of the flags to mount the root?  On a side-note 
though, what is the preferred UNIX equivalent of /usr/local or /usr2?

However, permissions are still wrong somewhere, as I can't:
   cp /adm/timezone/US_Pacific /adm/timezone/local
per the last part of the installation instructions, which also yields a 
permission denied message, even while logged in under the 'out-of-the-box' user 
glenda.

Thanks again!


-Original Message-
From: [EMAIL PROTECTED] on behalf of andrey mirtchovski
Sent: Wed 8/6/2008 5:24 PM
To: Fans of the OS Plan 9 from Bell Labs
Subject: Re: [9fans] fossil permission checking
 
/ is indeed mounted without -c. if you want to create a directory in /
use /root. see 'nm' for how the namespace is constructed.

i believe new directories in / are frowned upon (even if created in
/root). i can't find the relevant message in the archives.

On Wed, Aug 6, 2008 at 6:10 PM, Benjamin Huntsman
<[EMAIL PROTECTED]> wrote:
> I'm having some trouble setting up a terminal (which will become a cpu/auth 
> server).
> I've gotten the 9pccpuf kernel booted, and is running as the user bootes, but 
> even from the server's console, if I type something as simple as "echo hi > 
> /foo" I receive the message:
>
> mounted directory forbids creation
>
> I've basically followed the wiki pages on setting up a standalone auth/cpu 
> server, though it's not getting me very far on the fossil side of things...  
> I chose all of the defaults during the install process,
>
> Can someone give me a quick tip as to how to set up a new cpu/fossil user 
> that can actually write to something other than their home directory?
>
> Also, there's not exactly a command like UNIX's sudo, is there?
>
> Thanks in advance!
>
>


<>

Re: [9fans] fossil permission checking

2008-08-06 Thread andrey mirtchovski
/ is indeed mounted without -c. if you want to create a directory in /
use /root. see 'nm' for how the namespace is constructed.

i believe new directories in / are frowned upon (even if created in
/root). i can't find the relevant message in the archives.

On Wed, Aug 6, 2008 at 6:10 PM, Benjamin Huntsman
<[EMAIL PROTECTED]> wrote:
> I'm having some trouble setting up a terminal (which will become a cpu/auth 
> server).
> I've gotten the 9pccpuf kernel booted, and is running as the user bootes, but 
> even from the server's console, if I type something as simple as "echo hi > 
> /foo" I receive the message:
>
> mounted directory forbids creation
>
> I've basically followed the wiki pages on setting up a standalone auth/cpu 
> server, though it's not getting me very far on the fossil side of things...  
> I chose all of the defaults during the install process,
>
> Can someone give me a quick tip as to how to set up a new cpu/fossil user 
> that can actually write to something other than their home directory?
>
> Also, there's not exactly a command like UNIX's sudo, is there?
>
> Thanks in advance!
>
>



[9fans] fossil permission checking

2008-08-06 Thread Benjamin Huntsman
I'm having some trouble setting up a terminal (which will become a cpu/auth 
server).
I've gotten the 9pccpuf kernel booted, and is running as the user bootes, but 
even from the server's console, if I type something as simple as "echo hi > 
/foo" I receive the message:

mounted directory forbids creation

I've basically followed the wiki pages on setting up a standalone auth/cpu 
server, though it's not getting me very far on the fossil side of things...  I 
chose all of the defaults during the install process, 

Can someone give me a quick tip as to how to set up a new cpu/fossil user that 
can actually write to something other than their home directory?

Also, there's not exactly a command like UNIX's sudo, is there?

Thanks in advance!



Re: [9fans] SATA VT8251 support?

2008-08-06 Thread Rodolfo kix García
Hi Erik,

I try it this morning, but the server don't boot. I cannot say nothing
about the problem, because the server is "far far away" and we don't have
console.

Probably we need change the 9load to include this SATA support.

Any help?

Thanks Eric,

slds.


>> i cant see anywhere in sdata.c and sdiahci.c. . . i guess it isnt
>> supported at all, so there is no option to fill some "silly" pci-id
>> somewhere to get it going.
>
> try http://www.quanstro.net/sdiahci.c.
>
> i hadn't enabled this in the release version because i didn't
> have any hardware on which to test.  let me know how this
> works for you.
>
> - erik
>
>


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)




[9fans] sources is back up

2008-08-06 Thread geoff
Sources is back up, reincarnated in a different machine that is easier
to expand in several respects.  The main fossil was reinitialised from
the fossil dump score of early morning August 3rd; so any changes to
sources since then are gone.  The old sources had about 12GB of local
venti arenas; the new one is a venti client of our outside file
server, which has somewhat more space (this is not a challenge to fill
it ☺).



Re: [9fans] float.h

2008-08-06 Thread Greg Comeau
In article <[EMAIL PROTECTED]>,
Pietro Gagliardi <[EMAIL PROTECTED]> wrote:
>On Aug 5, 2008, at 11:14 PM, ron minnich wrote:
>
>> I'm so confused. Why don't you just show the code.
>>
>> ron
>>
>
>#include 
>...
>#include 
>...
>
>static struct{
>   char *name;
>   double value;
>}constants[] = {
>   ...
>   "MIN",  DBL_MIN,
>   "MAX",  DBL_MAX,
>   "EPSILON",  DBL_EPSILON,
>   ...
>};
>
>I'm actually writing a calculator that will take advantage of several  
>features of Plan 9 (Runes, libgeometry, etc.) and I'd like to make  
>these available.

Does it help any to initialize constants[] in a source file
by itself?
-- 
Greg Comeau / 4.3.10.1 with C++0xisms now in beta!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?



Re: [9fans] 9pfuse on mac os x

2008-08-06 Thread sqweek
On Wed, Aug 6, 2008 at 10:57 PM, Jeff Sickel <[EMAIL PROTECTED]> wrote:
>
> On Aug 6, 2008, at 9:31 AM, Skip Tavakkolian wrote:
>
> More depressing that sqweek's change works for OS X 10.4.x but not with the
> MacFUSE build for 10.5.x.  All I get is:
>
> % ls
...
> FUSE <- unique 0x3 (Getattr) attr_valid 1 ino 0x8000 size 0
> blocks 0 atime 1218033034 mtime 1218033034 ctime 1218033034 mode 040500
> nlink 1 uid 501 gid 501 rdev 0
> ls: .: Input/output error

 Is this a 32-bit machine? That's a big frigging inode. I don't have a
clue how mac works, but I recently hit a bug with v9fs where a certain
qid path got mapped to an inode of zero and subsequently disappeared
in the linux vfs layer. Though there was no i/o error there.
-sqweek



Re: [9fans] 9pfuse on mac os x

2008-08-06 Thread Jeff Sickel


On Aug 6, 2008, at 9:31 AM, Skip Tavakkolian wrote:


i was able to get Rangboom snsa -- which uses code from Russ' 9pfuse
-- to work with macfuse 1.7 (on os x 10.4.x).  the latest 9pfuse has
the patch sqweek sent for xattr; i wonder if that's the problem?

it's depressing to see that Finder acts as demented as Explorer with
incessant directory traversal.


More depressing that sqweek's change works for OS X 10.4.x but not  
with the MacFUSE build for 10.5.x.  All I get is:


% 9pfuse -D $ns/plumb /mnt/plumb
...

% cd /mnt/plumb
FUSE -> len 8 unique 0x1 uid 501 gid 501 pid 225 Access nodeid 0x1  
mask 0x1

<- Twalk tag 0 fid 0 newfid 1 nwname 0
-> Rwalk tag 0 nwqid 0
<- Topen tag 0 fid 1 mode 0
-> Ropen tag 0 qid ( 0 d) iounit 0
<- Tclunk tag 0 fid 1
-> Rclunk tag 0
FUSE <- unique 0x1 (Access)
% ls
FUSE -> len 8 unique 0 uid 501 gid 501 pid 5721 Access nodeid 0x1 mask  
0x1

<- Twalk tag 0 fid 0 newfid 1 nwname 0
-> Rwalk tag 0 nwqid 0
<- Topen tag 0 fid 1 mode 0
-> Ropen tag 0 qid ( 0 d) iounit 0
<- Tclunk tag 0 fid 1
-> Rclunk tag 0
FUSE <- unique 0 (Access)
FUSE -> len 0 unique 0x3 uid 501 gid 501 pid 5721 Getattr nodeid 0x1
<- Tstat tag 0 fid 0
-> Rstat tag 0  stat '.' 'jas' 'jas' 'jas' q ( 0 d) m  
02000500 at 1218033034 mt 1218033034 l 0 t 13312 d 500296
FUSE <- unique 0x3 (Getattr) attr_valid 1 ino 0x8000 size  
0 blocks 0 atime 1218033034 mtime 1218033034 ctime 1218033034 mode  
040500 nlink 1 uid 501 gid 501 rdev 0

ls: .: Input/output error



.. back to the drawing board.

-jas




Re: [9fans] 9pfuse on mac os x

2008-08-06 Thread Skip Tavakkolian
i was able to get Rangboom snsa -- which uses code from Russ' 9pfuse
-- to work with macfuse 1.7 (on os x 10.4.x).  the latest 9pfuse has
the patch sqweek sent for xattr; i wonder if that's the problem?

it's depressing to see that Finder acts as demented as Explorer with
incessant directory traversal.

> On May 16, 2008, at 12:42 PM, Skip Tavakkolian wrote:
> 
>> it's a little deeper; i'm wading in the mire that is libfuse to see if
>> i can spot the difference from what 9pfuse has. i'm hoping some
>> combination of '-o's to mount_fusefs will fix it.
> 
> Sadly it's not the mount_fusefs that's failing.  I've finally gotten  
> around to looking at this again now that there's a nice new utility  
> from Russ that uses 9pfuse.
> 
> 9pfuse does mount (on Leopard at least) with the latest MacFUSE 1.7  
> from the goog, and you can watch all the debug details.  Unfortunately  
> 9pfuse ends up having similar problems to sshfs, I/O failures when  
> traversing the mount point.  For sshfs it appears as if the latest  
> MacFUSE keeps everything mounted as root -- so even if you try to  
> force your uid it ignores it and you end up with a file hierarchy you  
> can't traverse.
> 
> I'll keep looking through to see if the API changed a bit more.  There  
> are MacFUSE filesystems that do work, 
> http://www.friday.com/bbum/2008/01/10/silly-hack-of-the-day-mount-the-obj-c-runtime-as-a-filesystem/
>  
> .  That example goes through a different path to initialize the fuse  
> mount...
> 
> -jas




Re: [9fans] SATA VT8251 support?

2008-08-06 Thread erik quanstrom
> did anyone know if this controller is supported by the sata driver?
> 
> i cant see anywhere in sdata.c and sdiahci.c. . . i guess it isnt supported 
> at all, so there is no option to fill some "silly" pci-id somewhere to get it 
> going. 
> 
> The new 9grid.es server has this controller, it would be a pitty not being 
> able to run plan9 on it and be stuck to the 256M-RAM server :(
> 
> (output of lspci -v under the linux the server comes with)
> 
> 00:0f.0 IDE interface: VIA Technologies, Inc. VT8251 AHCI/SATA 4-Port 
> Controller (prog-if 8f [Master SecP SecO PriP PriO])
> Subsystem: VIA Technologies, Inc. VT8251 AHCI/SATA 4-Port Controller
> Flags: bus master, medium devsel, latency 64, IRQ 509
> I/O ports at ec00 [size=8]

i didn't add support because i didn't have any test hardware.
please try the untested version at http://www.quanstro.net/sdiahci.c.
it should report the via as an unk 4-port hba.  "unk" means that there
is no special magic required.

do you need a matching driver for 9load?

- erik




Re: [9fans] 9pfuse on mac os x

2008-08-06 Thread Jeff Sickel


On May 16, 2008, at 12:42 PM, Skip Tavakkolian wrote:


it's a little deeper; i'm wading in the mire that is libfuse to see if
i can spot the difference from what 9pfuse has. i'm hoping some
combination of '-o's to mount_fusefs will fix it.


Sadly it's not the mount_fusefs that's failing.  I've finally gotten  
around to looking at this again now that there's a nice new utility  
from Russ that uses 9pfuse.


9pfuse does mount (on Leopard at least) with the latest MacFUSE 1.7  
from the goog, and you can watch all the debug details.  Unfortunately  
9pfuse ends up having similar problems to sshfs, I/O failures when  
traversing the mount point.  For sshfs it appears as if the latest  
MacFUSE keeps everything mounted as root -- so even if you try to  
force your uid it ignores it and you end up with a file hierarchy you  
can't traverse.


I'll keep looking through to see if the API changed a bit more.  There  
are MacFUSE filesystems that do work, http://www.friday.com/bbum/2008/01/10/silly-hack-of-the-day-mount-the-obj-c-runtime-as-a-filesystem/ 
.  That example goes through a different path to initialize the fuse  
mount...


-jas




Re: [9fans] Bizarre freeze

2008-08-06 Thread erik quanstrom
>> I wonder why there is a command to turn on DMA on disks.  Could
>> it be that some disks don't work with DMA on?
> 
> sure. it's PC hardware, so it's crap :-)
> ron

the ata spec does not require dma for pata devices.
sata, first specified in ata 7, requires udma mode 5,
though sata:pata bridges routinely do not.

it's impossible to know without a bit more information,
but the dma command may be a red herring.

>  sdC0 is a cdrom. I can turn dma on for my sata disks (sdE0/sdF0) no problem.

can you access the cdrom at all?  i'm wondering if
you're accessing a ahci-capable chipset in ahci *and*
ata modes at the same time.  

- erik




Re: [9fans] float.h

2008-08-06 Thread erik quanstrom
> If your unpleasant way is to copy float.h, it won't work; you'll need  
> one for each $objtype. I found an algorithm to get epsilon, but not  
> min or max.
> 

as far as i know, all plan 9 compilers use IEEE 754-compatable semantics
(at least insomuch as allowed by hardware).  thus the minima and maxima,
ε, and underflow properties depend on IEEE 754, not the processor.

/sys/doc/port.ps has the most complete information, but i would imagine
that the powerpc and arm information is slightly out-of-date.

- erik



Re: [9fans] float.h

2008-08-06 Thread Pietro Gagliardi

On Aug 6, 2008, at 4:06 AM, Charles Forsyth wrote:


My  program uses some of them (DBL_MIN, DBL_MAX, DBL_EPSILON), and
including  yields name clashes. Thanks.



#include 
...
#include 


it's surprisingly important not to leave out important information,  
such as
what important things were in the "..." (other include files) and,  
most importantly, the particular "name clashes".


i'd noticed you were using  not  which i'd  
thought curious
(were you mixing APE and Plan 9 include files?) but like most others  
i'd initially

assumed the "name clashes" had to do with the DBL_ names. odd.



Yes. Plan 9 has no float.h of its own.

guessing that the "..." contained "#include " and trying a  
little test,

I find that probably the "name clashes" were (was?) probably singular:

/386/include/ape/float.h:43 yy.c:3 redeclare tag: FPdbleword



The other is in .


so now we know the problem, what to do about it?
i know an unpleasant way but perhaps someone else can think of a  
good way to get those
values outside the APE include files.  libc.h doesn't define  
equivalents.
perhaps the values aren't actually all that useful (i'm not sure how  
i'd use

them myself in a calculator, for instance).




If your unpleasant way is to copy float.h, it won't work; you'll need  
one for each $objtype. I found an algorithm to get epsilon, but not  
min or max.





Re: [9fans] keyboard layout

2008-08-06 Thread erik quanstrom
> Is there any support for other keyboards than the QWERTY type. I am
> interested in a german QWERTZ layout.
> 
> I wonder as there is no history function with the cl input? I just get
> chaotic characters with the arrow keys.

see kbmap(1) and kbmap(3).  also the recent discussion on building a
kernel with a builtin map so passwords containing letters located
in different locations on the qwertz layout can be typed without
confusion.  http://9fans.net/archive/2008/07

- erik




[9fans] keyboard layout

2008-08-06 Thread [EMAIL PROTECTED]
Is there any support for other keyboards than the QWERTY type. I am
interested in a german QWERTZ layout.

I wonder as there is no history function with the cl input? I just get
chaotic characters with the arrow keys.

Kind regards




Re: [9fans] Plan9 install CDROM seems only want to install from fd0

2008-08-06 Thread RyanMcCoskrie
sdC0!cdboot!9pccd.gz

right. Thanks, I'll try that once my brother is done with supertux.



Re: [9fans] float.h

2008-08-06 Thread Charles Forsyth
>My  program uses some of them (DBL_MIN, DBL_MAX, DBL_EPSILON), and  
>including  yields name clashes. Thanks.

> #include 
> ...
> #include 

it's surprisingly important not to leave out important information, such as
what important things were in the "..." (other include files) and, most 
importantly, the particular "name clashes".

i'd noticed you were using  not  which i'd thought curious
(were you mixing APE and Plan 9 include files?) but like most others i'd 
initially
assumed the "name clashes" had to do with the DBL_ names. odd.

guessing that the "..." contained "#include " and trying a little test,
I find that probably the "name clashes" were (was?) probably singular:

/386/include/ape/float.h:43 yy.c:3 redeclare tag: FPdbleword

so now we know the problem, what to do about it?
i know an unpleasant way but perhaps someone else can think of a good way to 
get those
values outside the APE include files.  libc.h doesn't define equivalents. 
perhaps the values aren't actually all that useful (i'm not sure how i'd use
them myself in a calculator, for instance).