framework for samba3 hosts
Gerald (Jerry) Carter
jerry at samba.org
Tue Jul 26 04:09:57 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Amit Regmi wrote:
| Hi all,
| I have to design Samba Framework in Python .
| Previously I was facing problems on the design
| issues and still am confused. What I have at
| hand is a script to make changes in the smb.conf file.
| What I also have at present are the classes
| FileService class
| PrintService class
Here some comments. I know you are still getting
your feet wet, but ...
* Store you classes in file and import them so you
~ get code reuse.
* Don't hardcode path and values in your classes.
* class FileService should be a single share.
~ Therefore an AddShare() method doesn't make much
~ sense. You should be able to create a new
~ file share by simply creating a new FileService
~ object. This object would then be connected to
~ a SambaConf object to tie it to a configuration
* Don't redefine the Server class, reuse code.
* Don't worry about checking the effective UID.
~ Let the OS do the security checks for you when
* Don't worry about wrapping existing tools just
~ for the sake of having a python wrapper.
| What I also want to do is come up with few
| functions like
You already have this in the SambaConf object
I gave you. You read in the file and then set
a service option. Then just flush the file to disk.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the samba-technical