Re: VFS modules?

2002-10-09 Thread Alexander Bokovoy

On Wed, Oct 09, 2002 at 01:38:21PM -0400, Kris Van Hees wrote:
 Has anyone implemented a VFS module already?  It does not seem that there are
 any as part of the CVS HEAD version, and I could not find a reference to any
 on the web site.
HEAD:/samba/examples/VFS/
-- 
/ Alexander Bokovoy
---
He who despises himself nevertheless esteems himself as a self-despiser.
-- Friedrich Nietzsche



Re: Undocumented smb.conf

2002-08-20 Thread Alexander Bokovoy

On Mon, Aug 19, 2002 at 09:55:31AM +0200, Jelmer Vernooij wrote:
 display charset
 unix charset
 dos charset
These are charsets for client code displaying responses on the terminal
(smbclient), unix file names, and remote side file names if it doesn't
support unicode. All options accept name of charset supported by iconv(3).
On glibc-based systems full list of charsets is available by running
iconv --list

 vfs path
Path to VFS dynamically loadable modules. If specified, will be prepended
to each module name in 'vfs object' list so that final path to module will
be 'vfs path'/vfs_module.

Can be used in both global and per-share contexts.

-- 
/ Alexander Bokovoy
---
I just forgot my whole philosophy of life!!!



Re: Fine points of ACL conversion

2002-08-01 Thread Alexander Bokovoy

Hi, Matt!

On Wed, Jul 31, 2002 at 12:03:26PM -0700, ZINKEVICIUS,MATT (HP-Loveland,ex1) wrote:
  access. So order is very important. However, does it accumulate perms.
 
 It accumulates and continues as long as none of the request bits have
 been denied. If there are no more ACEs and the full set of request bits
 have not been allowed then permission is denied. If a previously allowed
 bit is denied in a later ACE it is still allowed. That is why ACE
 ordering is important.
 
 See my patch that I posted a couple months back where I implemented full
 NT security semantics for samba 2.2.3a. This implements NT ACL
 inheritance as well, which is where it can get really scary.
Is there any chance we'll see this patch updated to HEAD?

-- 
/ Alexander Bokovoy
---
Do more than anyone expects, and pretty soon everyone will expect more.




Re: recent vfs patches

2002-07-31 Thread Alexander Bokovoy

On Wed, Jul 31, 2002 at 11:15:50AM +0200, Rafal Szczesniak wrote:
 On Tue, Jul 30, 2002 at 09:29:44PM +0200, Simo Sorce wrote:
  can you tell me which lines of proto do give you that error?
  just cutpaste the line with error thanks.
 
 Never mind about that one. After one big make clean, configure
 and make went fine. Sorry for false alarm.
 
 Makefiles creation still returns errors in those 2 points.
This is not a false alarm!!! Simo, you forgot to add Makefile.in files in
examples/VFS/{,block/}.

-- 
/ Alexander Bokovoy
---
Quigley's Law:
Whoever has any authority over you, no matter how small, will
atttempt to use it.




Re: Build requirements

2002-07-22 Thread Alexander Bokovoy

On Mon, Jul 22, 2002 at 06:38:43AM +0930, Richard Sharpe wrote:
 The BuildRequires field seems to be to only be relevant to a source RPM. 
 Why even bother to put it into the SPEC file for the binary RPMs we 
 supply, because it represents a lot of work that must be checked each time 
 we release a package for a different Linux distro. Some of those distros 
 were packaging the same thing in different places and had slightly 
 different names as well.
Richard, you're slightly wrong here. We have spec files for particular
distributions in Samba CVS and for RH as well. In these spec files (for
various RedHat versions) specific requirements for building package should
be specified. They don't change much from RH's release to release and same
is true for any other Linux rpm-based vendor. Without BuildRequires:
chances to build package by an user is much lower -- as every user has to
investigate build dependencies every time he is building Samba packages
from our spec files. 

 To provide that sort of information for all the platforms that Samba runs 
 on would be a large undertaking, and to a certain extent, a waste of time 
 as well, because things change. 
No, it isn't a waste of time. I don't think (and my opinion is based on
4-5 years of working on maintaining samba and other software in several
distributions) that dependancies are so fluid. Things change indeed but
such changes occur less than twice per year usually and can be easily
detected by users _if_ they already have an example in spec file with
BuildRequires: for previous supported version of the distribution (RH in
this case).

The task to fill in BuildRequires: is actually important with recent
release of apt-rpm 0.5.4 which has ability to fetch and build source rpm
from apt repository and which is heavily relies on BuildRequires: tag to
gather list of binary packages which must be installed on target system to
properly build a package (automatically, by the way).

 Also, none of us have a huge amount of time on our hands, so we focus 
 on the things that seem relevant.
Let people who have such time and/or previous experience to report us
dependencies and put them into CVS' spec files.

-- 
/ Alexander Bokovoy
---
The ripest fruit falls first.
-- William Shakespeare, Richard II




Re: Build requirements

2002-07-22 Thread Alexander Bokovoy

On Mon, Jul 22, 2002 at 02:06:43PM -0400, Max TenEyck Woodbury wrote:
  Also, RH has a package named rpm-redhatdb or something like this. It
  contains additional RPM database with all RH packages installed (only
  database records are there of course). You can use it for resolving
  dependencies against whole distribution.
 
 I knew about that. Its main problem is that it can't contain information on
 updates that have not been installed, and probably does not contain information
 on the installed updates. It's useful information, but not quite as useful as
 it might be.
Well, you always can update it using --justdb option during installation
of an update and pointing to a different RPM database.

  Unfortunately, you can't use it as is for RH because package naming scheme
  is slightly different as well as RPM macros but it surely will reduce your
  amount of work because you'll end up repeating much of its functionality
  by hands (or self-written scripts).
 
 I certainly intend to build upon others work where possible. RH's name scheme
 is complex and a bit more flexible than some people realize. For my own work,
 I use a variant that contains a bit more information than their unmodified
 scheme. I'd be interested in looking at what you've done, and I may have some
 suggestions if you're interested.
We are using common libification rules for packages so that it makes
easier to split functionality:

foo -- some utilities
libfoo -- shared library which those utils use
libfoo-devel -- development parts of libraries except static libs
libfoo-devel-static -- static libs for libfoo-devel

Using this throughout distribution simplifies development.

  query string is 'rpm-utils*alt'.
  One URI will be
  http://rpm.pbone.net/index.php3?stat=4idpl=284400idpa=284400 (take a
  source package).
 
 Thanks. I can't get this done immediately, but probably some time soon.
No problem :)

-- 
/ Alexander Bokovoy
---
polygon:
Dead parrot.




Re: Using Samba for HTTP-NTLM-authentication?

2002-07-12 Thread Alexander Bokovoy

On Fri, Jul 12, 2002 at 07:44:24PM +0200, Johann Hanne wrote:
 Short version:
 --
 Can anybody tell me if there are hooks in Samba that make it possible 
 to use it in conjunction with an apache module for HTTP-based 
 NTLM-authentication?
Yes, there are such hooks. You can look at Squid-ntlm project and ask
Kinkie (Francesco Chemolli) who is working on similar task for Squid. 
Better, come to #samba-technical IRC channel at irc.openprojects.net
and discuss details there. I know that Andrew Bartlett was working with
Francesco on making winbindd more suitable for such task.

In brief, you need to make code that talks with winbindd.

-- 
/ Alexander Bokovoy
---
No wonder you're tired!  You understood so much today.




Re: [patch] Cascaded VFS v.4

2002-07-09 Thread Alexander Bokovoy

On Tue, Jul 09, 2002 at 12:59:28PM +0300, TUDOR Coserea wrote:
 Hi, 
Hi, Tudor!

 Apropos VFS patch shouldn't be 
 -D_LARGEFILE64_SOURCE instead of -D_LARGEFILE63_SOURCE ?
There is no such define in new patch. It was, indeed, in old
examples/VFS/block/Makefile but now it is replaced by correct code 
which is autogenerated with all needed CFLAGS from main configure (source/configure)

 
 And another question:
 I used VFS to build a antivirus scanner and on close method I
 need (const struct files_struct*)-fsp_name which position
 depends by this _LARGEFILE64_SOURCE. If one of smbd and my
 scanner is build with this flag and other is not, on close
 method smbd with my scanner will crash. Could be rearranged
 files in this struct such as fields dependent by compilation
 flags be the last?
Could you please show how would this struct look correctly? There are
files_struct entries (next,prev), various SMB_XXX (dev, inode, pos, size) 
which all are variable-sized...
-- 
/ Alexander Bokovoy
---
Communications satellite used by the military for star wars.




Re: [patch] Cascaded VFS v.4

2002-07-09 Thread Alexander Bokovoy

On Tue, Jul 09, 2002 at 02:58:51PM +0300, TUDOR Coserea wrote:
 Hi Alexander,
 
 Alexander Bokovoy [EMAIL PROTECTED] writes:
   And another question:
   I used VFS to build a antivirus scanner and on close method I
   need (const struct files_struct*)-fsp_name which position
   depends by this _LARGEFILE64_SOURCE. If one of smbd and my
   scanner is build with this flag and other is not, on close
   method smbd with my scanner will crash. Could be rearranged
   files in this struct such as fields dependent by compilation
   flags be the last?
  Could you please show how would this struct look correctly? There are
  files_struct entries (next,prev), various SMB_XXX (dev, inode, pos, size) 
  which all are variable-sized...
 Like this:
 typedef struct files_struct
 {
 struct files_struct *next, *prev;
 int fnum;
 struct connection_struct *conn;
 int fd;
 int print_jobid;
 mode_t mode;
 uint16 vuid;
 write_bmpx_struct *wbmpx_ptr;
 write_cache *wcp;
 struct timeval open_time;
 int share_mode;
 uint32 desired_access;
 time_t pending_modtime;
 int oplock_type;
 int sent_oplock_break;
 unsigned long file_id;
 BOOL can_lock;
 BOOL can_read;
 BOOL can_write;
 BOOL print_file;
 BOOL modified;
 BOOL is_directory;
 BOOL directory_delete_on_close;
 BOOL delete_on_close;
 char *fsp_name;
 SMB_DEV_T dev;
 SMB_INO_T inode;
 SMB_OFF_T pos;
 SMB_OFF_T size;
 } files_struct;
 now all fsp-mode ... fsp-fsp_name fields will not longer depend by compilation 
 _LARGEFILE64_SOURCE/_LARGEFILE_SOURCE/_FILE_OFFSET_BITS/_GNU_SOURCE defines.
Fine for me. Now let's wait few hours when developers from other side of
the planet will wake up :)


-- 
/ Alexander Bokovoy
---
Nothing is illegal if one hundred businessmen decide to do it.
-- Andrew Young




[patch] Cascaded VFS v.4

2002-07-08 Thread Alexander Bokovoy

Greetings!

Attached is the new revision (v.4) of cascaded VFS patch for HEAD.

Changes from Simo's revision:

-- connection_struct now contains a pointer to smb_vfs_handle_struct
   instance which is an element of a linked list. Each element describes
   completely one module [private data as void*, dl handle]. Linked list
   is managed with appropriate DLIST_XXX macros. 

   Module developers receive an allocated smb_vfs_handle_struct via
   vfs_init() third argument vfs_handle . If they want to store persisent 
   information and share it between module functions during connection live, 
   such information should be stored in vfs_handle-data and freed on
   connection closing.

-- all modules are loaded w/o exporting their symbols to main smbd
   namespace (RTLD_GLOBAL is gone). That means that modules must have only
   two public functions: vfs_init() and vfs_done() which are called
   directly from smbd's code but not imported into smbd's namespace (there
   is no need for it at all -- they are used in place).

-- hence of that, initialization and finalization functions renamed back
   to vfs_init() and vfs_done() functions, fstrings/pstrings straggle
   removed from smbd/vfs.c code to follow up Samba 3.0 code policy.

-- CFLAGS/LDFLAGS propagation to examples/VFS/ added, along with new, generalised,
   examples/VFS/Makefile.in which does not need to be changed to add support for new
   modules.

Things not finished yet:

-- Move to lp_list in smbd/vfs.c:vfs_init() module list parsing.

-- Adoption of JFM's function registration proposal [needs brainstorming
   on how to preserve operation types with one-function registration API].

As usual, look at comments in include/vfs.h and code in examples/VFs/*.c
to get more infomation and examples of usage.

-- 
/ Alexander Bokovoy
---
QOTD:
I've always wanted to work in the Federal Mint.  And then go on
strike.  To make less money.


diff -urN samba-3.0/examples/VFS/audit.c samba-3.0.current/examples/VFS/audit.c
--- samba-3.0/examples/VFS/audit.c  2002-03-20 12:43:38 +0200
+++ samba-3.0.current/examples/VFS/audit.c  2002-07-08 19:49:47 +0300
@@ -3,6 +3,7 @@
  * facility.
  *
  * Copyright (C) Tim Potter, 1999-2000
+ * Copyright (C) Alexander Bokovoy, 2002
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -47,134 +48,79 @@
 
 /* Function prototypes */
 
-int audit_connect(struct connection_struct *conn, const char *svc, const char *user);
-void audit_disconnect(struct connection_struct *conn);
-DIR *audit_opendir(struct connection_struct *conn, const char *fname);
-int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode);
-int audit_rmdir(struct connection_struct *conn, const char *path);
-int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t 
mode);
-int audit_close(struct files_struct *fsp, int fd);
-int audit_rename(struct connection_struct *conn, const char *old, const char *new);
-int audit_unlink(struct connection_struct *conn, const char *path);
-int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode);
-int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode);
-int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode);
-int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode);
+static int audit_connect(struct connection_struct *conn, const char *svc, const char 
+*user);
+static void audit_disconnect(struct connection_struct *conn);
+static DIR *audit_opendir(struct connection_struct *conn, const char *fname);
+static int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode);
+static int audit_rmdir(struct connection_struct *conn, const char *path);
+static int audit_open(struct connection_struct *conn, const char *fname, int flags, 
+mode_t mode);
+static int audit_close(struct files_struct *fsp, int fd);
+static int audit_rename(struct connection_struct *conn, const char *old, const char 
+*new);
+static int audit_unlink(struct connection_struct *conn, const char *path);
+static int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode);
+static int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t 
+mode);
+static int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode);
+static int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode);
 
 /* VFS operations */
 
-extern struct vfs_ops default_vfs_ops;   /* For passthrough operation */
+static struct vfs_ops default_vfs_ops;   /* For passthrough operation */
+static struct smb_vfs_handle_struct *audit_handle;
 
-struct vfs_ops audit_ops = {
+static vfs_op_tuple audit_ops[] = {
 
/* Disk operations */
 
-   audit_connect,
-   audit_disconnect,
-   NULL, /* disk free */
+   {audit_connect, SMB_VFS_OP_CONNECT

Re: Draft of branch maintainence and release plans....

2002-07-04 Thread Alexander Bokovoy

On Tue, Jul 02, 2002 at 11:54:18AM -0500, Gerald (Jerry) Carter wrote:
 Everyone,
 
 Here are the plans for getting 3.0 ready for release and the 
 maintainence plans for SAMBA_2_2.  Comments welcome.
 
 I would love to see this out sometime during the Fall of this 
 year.  Of course, none of this will get done without everyone's 
 help :-)
 
 
 
 Roadmap to 3.0
 --
 
 The following features are planned for inclusion in 3.0.
 This list was compiled based on previous promises during 2.2
 development and believed future directions of Samba
 
 * Internationalization - The UNICODE support is done.  Jeremy
   thinks we will probably need some auditing and testing
   before release.
 
 * Full Windows NT 4.0 PDC support
   - Trust relationships 
   - SAM replication 
   These features will allow for full replacement and migration 
   from Windows NT 4.0 domain controllers.  Both of these features
   are partially completed.
 
 * Windows 2000 domain client support - Done.
 
 * NTLMv2  Sign/Seal of RPC packets - NTLMv2 should be ok, the 
   sign/seal is yet to be done.
 
 * Winbind idmap storage  central idmap repository (for
   clusters, nfs, etc...)
 
 * Winbind working with Samba DC
 
 * Group Mapping support (pluggable?)
 
 * Printer attribute publishing using 'net'
 
 * pluggable passwd support - Done.
 
Stackable VFS?

-- 
/ Alexander Bokovoy
---
Clones are people two.




Re: Cascaded VFS ...

2002-07-04 Thread Alexander Bokovoy

On Wed, Jul 03, 2002 at 12:32:50PM +0200, C.Lee Taylor wrote:
 Greetings ...
 
   Quick question, is the Cascaded VFS system applied to cvs?
Not yet. I'm working on improving it w.r.t. all comments received during
past few weeks on this ML.

-- 
/ Alexander Bokovoy
---
If time heals all wounds, how come the belly button stays the same?




Re: VFS problem

2002-06-02 Thread Alexander Bokovoy

On Sat, Jun 01, 2002 at 09:25:10AM -0700, Jim Myers wrote:
 I'm trying to write a VFS module that uses the conn-vfs_private problem.
 It appears this field is never referenced in existing Samba code and is NOT
 initialized in vfs.c:vfs_init_custom.
 
 It appears to me that this function needs the following line added:
   conn-vfs_private = NULL;
 
 However there is a further design problem. There is no way for a custom VFS
 to properly initialize and cleanup as there is no first-time call that
 allows access to the conn structure, nor is there a cleanup call to free
 any memory pointed to by vfs_private.
 
 I would think it would be could to add the conn structure as a parameter to
 the custom VFS init function: vfs_init and and a new cleanup call as well
 so the associated memory could be freed.
I did that in stackable VFS where each module could have their own
vfs_private information. This is against Samba 3.0 (HEAD of a couple weeks
ago).

Look in examples/VFS/*.c to see details of how to use this with stackable
VFS (attached).

-- 
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
The little pieces of my life I give to you, with love, to make a quilt
to keep away the cold.



samba-3.0-cascaded-vfs.1.1.patch.bz2
Description: BZip2 compressed data


Re: Pages in a printjob

2002-05-24 Thread Alexander Bokovoy

On Fri, May 24, 2002 at 02:55:58PM +0200, Wichert Akkerman wrote:
 I'm working on a system where customers have to pay for pages they
 print, and as such it is essential that I have the pagecount of
 a printjob before I send it to the printer.
 
 Looking at the samba sources the number of pages in a printjob is
 sent as part of the job_info_2 structure and extracted by
 smb_io_job_info_2(). What I don't see is what is done with that
 information. Ideally I would like to have all the information
 in that struct available in the print command.
 
 Does anyone have any ideas on how to proceed? I'ld prefer not to have
 to dive into the samba code myself, but if necessary and someone
 can give me some pointer where I'll need to look I can do that.
Look at the talk given by Kurt Pfeifle at SambaXP:
CUPS and Samba: a network Postscript RIP for non-PS printers
http://www.sambaxp.org/samba_XP_2002/pfeifle.tgz
There were some thoughts how to do it outside Samba using CUPS.
-- 
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
The truth is rarely pure, and never simple.
-- Oscar Wilde




Re: Does VFS work in latest cvs ?

2002-05-22 Thread Alexander Bokovoy

On Wed, May 22, 2002 at 11:16:57AM +, Claudia Moroder wrote:
 Hello,
 
 does VFS not work in the latest samba 3 cvs ? It worked
 fine two weeks ago. Now I get a panic using the standard
 skel.so.
I've updated stackable VFS patch based on Saturday's CVS update and both
non-stackable and stackable versions are working fine. 


-- 
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
standards, n.:
The principles we use to reject other people's code.




Re: VFS error - turns out to be vps_ops.rename failure .. help

2002-05-15 Thread Alexander Bokovoy

On Tue, May 14, 2002 at 09:32:44AM -0500, Gerald Carter wrote:
 AB,
 
 This is already fixed in SAMBA_2_2, correct?  Can you verify?
 This code has already been changed.
I've talked about HEAD. I'll look into SAMBA_2_2 later this week but it
seems to be OK. 
-- 
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
Mix a little foolishness with your serious plans; it's lovely to be silly
at the right moment.
-- Horace




Re: PATCH: Extended recycle bin for head

2002-05-03 Thread Alexander Bokovoy

On Fri, May 03, 2002 at 04:15:14PM +0200, Juergen Hasch wrote:
 Hi,
 
 this is an extension to the recycle bin VFS module for head. It adds serveral 
 options to the recycle bin, like the ability to preserve the original file 
 tree and touching the access date for automatic removal of old files.
 
 The patch needs the cascaded-vfs and vfs-options patch from Alexander Bokovoy 
 to work. It works well for me, however one thing hasn't been resolved:
 
 The new vfs-options parameters don't work with [homes]. I have a patch for 
 this (patch.loadparm), however this adds a new entry to the service struct.
 Is there another way to find out if a service has been created from [homes] ?
We talked with tridge on Wednesday and agreed that better change is to fix
copy_service() to handle parametrical options. I hope to do it during this weekend.


-- 
/ Alexander Bokovoy
Software architect and analyst // SaM-Solutions Ltd.
---
Beauty seldom recommends one woman to another.




<    1   2   3