RE: [Samba] Guide to porting to non-unix like systems?

2007-04-29 Thread Carlos Rivera-Jones

I wonder, however, why port a networking system so completely tied-in to POSIX, 
like SMB, to a non-POSIX OS? What is the need?

"The experience (particularly with Samba3) has been that it is easier to
add a POSIX layer to the OS than to keep 'fixing' samba."

Yes. That also has the added advantage of immediate compatability with other 
systems that depend on POSIX.

Carlos

-Original Message-
From: [EMAIL PROTECTED] on behalf of Andrew Bartlett
Sent: Sat 4/28/2007 12:13 PM
To: Andreas Fredriksson
Cc: samba@lists.samba.org
Subject: Re: [Samba] Guide to porting to non-unix like systems?
 
On Sat, 2007-04-28 at 00:43 +0200, Andreas Fredriksson wrote:
> Hi,
> I'd like to get a rough idea on how much work it would be to port
> Samba to a non-unix platform. My plan was to use a slimmed-down samba
> to read and write files on a particularly unfriendly piece of
> proprietary hardware we use at work. I'm fine with a minimalistic
> samba as this port would be for internal, single-developer use and not
> intended for file serving in general.
> 
> Here are some things I'm wondering about, given the background:
> 
> 1) Is fork() required, or could it be emulated via threads?

Threads are not an option (we expect that variables will not be shared
after the fork), but in Samba4 we can execute as a single process (as a
state machine)

> 2) Could nmdb and smbd share a single process w.r.t 1) or is even
> possible to drop nmdb and just serve stuff slowly with a single smbd
> process?

nmbd is required for browsing and name registration.  In Samba4, it is
just part of the smbd state machine. 

> 3) Is Samba very tightly tied to the POSIX file/directory APIs? My
> intended target system has a rich I/O API (including async
> capabilities and various bells and whistles) but the APIs are fairly
> exotic and don't map well to e.g. DIR and file descriptors.

Samba4 is less tied to this than Samba3, but doing without anything like
POSIX will be hard.  

> 4) Is there a checklist somewhere of stuff a target system for
> smbd/nmbd would have to support to make a port feasible?

The experience (particularly with Samba3) has been that it is easier to
add a POSIX layer to the OS than to keep 'fixing' samba.  

Andrew Bartlett
-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.  http://redhat.com




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Guide to porting to non-unix like systems?

2007-04-29 Thread Andreas Fredriksson

On 4/28/07, Andrew Bartlett <[EMAIL PROTECTED]> wrote:


Samba4 is less tied to this than Samba3, but doing without anything like
POSIX will be hard.


I think my best shot then is to make an experimental hack on top of
Samba4 and go from there with perhaps adding a small POSIX emulation
layer on top of the native APIs.

Thanks for the info!

// Andreas
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Guide to porting to non-unix like systems?

2007-04-28 Thread Andrew Bartlett
On Sat, 2007-04-28 at 00:43 +0200, Andreas Fredriksson wrote:
> Hi,
> I'd like to get a rough idea on how much work it would be to port
> Samba to a non-unix platform. My plan was to use a slimmed-down samba
> to read and write files on a particularly unfriendly piece of
> proprietary hardware we use at work. I'm fine with a minimalistic
> samba as this port would be for internal, single-developer use and not
> intended for file serving in general.
> 
> Here are some things I'm wondering about, given the background:
> 
> 1) Is fork() required, or could it be emulated via threads?

Threads are not an option (we expect that variables will not be shared
after the fork), but in Samba4 we can execute as a single process (as a
state machine)

> 2) Could nmdb and smbd share a single process w.r.t 1) or is even
> possible to drop nmdb and just serve stuff slowly with a single smbd
> process?

nmbd is required for browsing and name registration.  In Samba4, it is
just part of the smbd state machine. 

> 3) Is Samba very tightly tied to the POSIX file/directory APIs? My
> intended target system has a rich I/O API (including async
> capabilities and various bells and whistles) but the APIs are fairly
> exotic and don't map well to e.g. DIR and file descriptors.

Samba4 is less tied to this than Samba3, but doing without anything like
POSIX will be hard.  

> 4) Is there a checklist somewhere of stuff a target system for
> smbd/nmbd would have to support to make a port feasible?

The experience (particularly with Samba3) has been that it is easier to
add a POSIX layer to the OS than to keep 'fixing' samba.  

Andrew Bartlett
-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.  http://redhat.com



signature.asc
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

RE: [Samba] Guide to porting to non-unix like systems?

2007-04-27 Thread Thomas McNeely
Andreas,

This book might be completely useless to you, or it might be just what you need:

Implementing CIFS: The Common Internet File System

by Christopher R. Hertel (a member of the Samba team)

Prentice Hall

ISBN: 0-13-047116-X

>From the introduction, "This book is aimed at developers who want to add CIFS 
>compatibility to their products This is a technical book, and knowledge of 
>programming and TCP/IP networking is assumed. The protocol descriptions, 
>however, start with the basics and build up, so very little previous knowledge 
>of CIFS is expected. For the programmer, there are several code examples. They 
>have all been tested under Debian GNU/Linux, but you may need to do a little 
>work to get them to run elsewhere. The code is intended to be illustrative 
>rather than functional. It works, but it is not production-quality. That's 
>okay, since part of the purpose of this book is to help you write your own 
>code -- if that's where your interests lie."

The book is available in print and it also has a web site where you can read it 
online at: http://www.ubiqx.org/cifs/

It can also be downloaded as PDF from: 
http://www.phptr.com/content/images/013047116X/downloads/013047116X_pdf.zip

I think it's linked to from the Samba.org web site too.

 




From: [EMAIL PROTECTED] on behalf of Andreas Fredriksson
Sent: Fri 4/27/2007 3:43 PM
To: samba@lists.samba.org
Subject: [Samba] Guide to porting to non-unix like systems?



Hi,
I'd like to get a rough idea on how much work it would be to port
Samba to a non-unix platform. My plan was to use a slimmed-down samba
to read and write files on a particularly unfriendly piece of
proprietary hardware we use at work. I'm fine with a minimalistic
samba as this port would be for internal, single-developer use and not
intended for file serving in general.

Here are some things I'm wondering about, given the background:

1) Is fork() required, or could it be emulated via threads?

2) Could nmdb and smbd share a single process w.r.t 1) or is even
possible to drop nmdb and just serve stuff slowly with a single smbd
process?

3) Is Samba very tightly tied to the POSIX file/directory APIs? My
intended target system has a rich I/O API (including async
capabilities and various bells and whistles) but the APIs are fairly
exotic and don't map well to e.g. DIR and file descriptors.

4) Is there a checklist somewhere of stuff a target system for
smbd/nmbd would have to support to make a port feasible?

Thanks,
Andreas
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Guide to porting to non-unix like systems?

2007-04-27 Thread simo
On Sat, 2007-04-28 at 00:43 +0200, Andreas Fredriksson wrote:
> Hi,
> I'd like to get a rough idea on how much work it would be to port
> Samba to a non-unix platform. My plan was to use a slimmed-down samba
> to read and write files on a particularly unfriendly piece of
> proprietary hardware we use at work. I'm fine with a minimalistic
> samba as this port would be for internal, single-developer use and not
> intended for file serving in general.

Andreas,
this kind of question would be served better if posted on
[EMAIL PROTECTED] as it is about technical matters.

> Here are some things I'm wondering about, given the background:
> 
> 1) Is fork() required, or could it be emulated via threads?
> 
> 2) Could nmdb and smbd share a single process w.r.t 1) or is even
> possible to drop nmdb and just serve stuff slowly with a single smbd
> process?
> 
> 3) Is Samba very tightly tied to the POSIX file/directory APIs? My
> intended target system has a rich I/O API (including async
> capabilities and various bells and whistles) but the APIs are fairly
> exotic and don't map well to e.g. DIR and file descriptors.
> 
> 4) Is there a checklist somewhere of stuff a target system for
> smbd/nmbd would have to support to make a port feasible?

If you don't have fork, and have a btter I/O API I'd direct you at
looking at samba4.

Samba4 can run in a single process.

Samba4 integrates the NBT functionality without requiring a second
daemon.

In Samba4 you can write NTVFS modules without necessarily using posix
semantics (like samba3 vfs layer require instead).

While samba4 is still not released it should be ok for the kind of use
you have in mind.

Samba4 can have a better memory footprint as well.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Guide to porting to non-unix like systems?

2007-04-27 Thread Andreas Fredriksson

Hi,
I'd like to get a rough idea on how much work it would be to port
Samba to a non-unix platform. My plan was to use a slimmed-down samba
to read and write files on a particularly unfriendly piece of
proprietary hardware we use at work. I'm fine with a minimalistic
samba as this port would be for internal, single-developer use and not
intended for file serving in general.

Here are some things I'm wondering about, given the background:

1) Is fork() required, or could it be emulated via threads?

2) Could nmdb and smbd share a single process w.r.t 1) or is even
possible to drop nmdb and just serve stuff slowly with a single smbd
process?

3) Is Samba very tightly tied to the POSIX file/directory APIs? My
intended target system has a rich I/O API (including async
capabilities and various bells and whistles) but the APIs are fairly
exotic and don't map well to e.g. DIR and file descriptors.

4) Is there a checklist somewhere of stuff a target system for
smbd/nmbd would have to support to make a port feasible?

Thanks,
Andreas
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba