samba.git
24 years agoThis commit was manufactured by cvs2svn to create tag samba-misc-tags/SAMBA_TNG_2_5_GOOD
cvs2svn Import User [Mon, 24 Apr 2000 14:13:24 +0000 (14:13 +0000)]
This commit was manufactured by cvs2svn to create tag
'SAMBA_TNG_2_5_GOOD'.

24 years agopreparing for release of alpha.2.5
Samba Release Account [Mon, 24 Apr 2000 14:13:23 +0000 (14:13 +0000)]
preparing for release of alpha.2.5

24 years agomerge.
Luke Leighton [Mon, 24 Apr 2000 14:09:52 +0000 (14:09 +0000)]
merge.

24 years agosizeof(fstring) needed, not sizeof(arg).
Luke Leighton [Mon, 24 Apr 2000 08:18:26 +0000 (08:18 +0000)]
sizeof(fstring) needed, not sizeof(arg).

24 years agomemory over-read. insure strikes again.
Luke Leighton [Sun, 23 Apr 2000 13:25:12 +0000 (13:25 +0000)]
memory over-read.  insure strikes again.

24 years agomore insure stuff.
Luke Leighton [Sun, 23 Apr 2000 10:56:03 +0000 (10:56 +0000)]
more insure stuff.

24 years agoinsure is cool.
Luke Leighton [Sun, 23 Apr 2000 10:32:38 +0000 (10:32 +0000)]
insure is cool.

24 years agoreplaced Memcpy with memcpy_zero.
Luke Leighton [Sun, 23 Apr 2000 08:56:01 +0000 (08:56 +0000)]
replaced Memcpy with memcpy_zero.

24 years agoback to square 1 (again) - rpcclient now works.
Luke Leighton [Sun, 23 Apr 2000 08:47:59 +0000 (08:47 +0000)]
back to square 1 (again) - rpcclient now works.

24 years agocount wrong in RNetShareEnum
Luke Leighton [Sun, 23 Apr 2000 08:34:25 +0000 (08:34 +0000)]
count wrong in RNetShareEnum

24 years agomore merge
Luke Leighton [Sun, 23 Apr 2000 08:13:16 +0000 (08:13 +0000)]
more merge

24 years agomerge
Luke Leighton [Sun, 23 Apr 2000 07:54:36 +0000 (07:54 +0000)]
merge

24 years agoThis commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
cvs2svn Import User [Sun, 23 Apr 2000 07:51:16 +0000 (07:51 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.

24 years agosplit fsp specific routines out of printing.c to fix linking problem
Andrew Tridgell [Sun, 23 Apr 2000 07:51:15 +0000 (07:51 +0000)]
split fsp specific routines out of printing.c to fix linking problem
in TNG

24 years agofixed two uninitialised memory references
Andrew Tridgell [Sun, 23 Apr 2000 07:44:01 +0000 (07:44 +0000)]
fixed two uninitialised memory references

24 years agotrick to get full stack trace when using the free version of insure
Andrew Tridgell [Sun, 23 Apr 2000 07:43:32 +0000 (07:43 +0000)]
trick to get full stack trace when using the free version of insure

24 years agoinsure caught an uninitialised memory reference - ensure it starts as
Andrew Tridgell [Sun, 23 Apr 2000 07:42:13 +0000 (07:42 +0000)]
insure caught an uninitialised memory reference - ensure it starts as
zero

24 years agoavoided a memory leak in the ubi code by deleting a mangled cache
Andrew Tridgell [Sun, 23 Apr 2000 07:40:13 +0000 (07:40 +0000)]
avoided a memory leak in the ubi code by deleting a mangled cache
entry before adding to ensure that we don't ever add a duplicate entry

this code can be removed when ubi gets fixed

24 years agofixed a prs memory leak (weren't freeing input buffer)
Andrew Tridgell [Sun, 23 Apr 2000 07:38:18 +0000 (07:38 +0000)]
fixed a prs memory leak (weren't freeing input buffer)

24 years agoif using insure then don't close fd 2
Andrew Tridgell [Sun, 23 Apr 2000 07:37:43 +0000 (07:37 +0000)]
if using insure then don't close fd 2

24 years agoMajor work on architecture of nss client, winbindd and NT server
Tim Potter [Sun, 23 Apr 2000 00:26:34 +0000 (00:26 +0000)]
Major work on architecture of nss client, winbindd and NT server
communications.  Client state now indexed by file descriptor rather
than pid number closing a possible security hole.

The lsa and samr pipe handles now cached on a per-domain basis which
speeds things up dramatically.  However it has exposed some problems in
the rpc client code.  Use and group enumeration code and types simplified
quite a bit.

Still some work to do in moving yet more state back towards the nss
client.  The eventual goal is to have nss clients unaffected by the stopping
and restarting of the winbind daemon.  Some scalability issues still to be
addressed.

24 years agoRemoved LIBSURS_OBJ from winbind objects.
Tim Potter [Sun, 23 Apr 2000 00:23:10 +0000 (00:23 +0000)]
Removed LIBSURS_OBJ from winbind objects.

24 years agoMajor work on architecture of nss client, winbindd and NT server
Tim Potter [Sun, 23 Apr 2000 00:21:19 +0000 (00:21 +0000)]
Major work on architecture of nss client, winbindd and NT server
communications.  Client state now indexed by file descriptor rather
than pid number closing a possible security hole.

The lsa and samr pipe handles now cached on a per-domain basis which
speeds things up dramatically.  However it has exposed some problems in
the rpc client code.  Use and group enumeration code and types simplified
quite a bit.

Still some work to do in moving yet more state back towards the nss
client.  The eventual goal is to have nss clients unaffected by the stopping
and restarting of the winbind daemon.  Some scalability issues still to be
addressed.

24 years agoFrom HEAD:
Elrond [Sat, 22 Apr 2000 14:18:07 +0000 (14:18 +0000)]
From HEAD:
reply.c:
> fixed overlapping strcpy() found by insure
service.c:
> don't copy a null groups list
In TNG this was already fixed by returning NULL from
memdup(NULL)

24 years agoDirectly from HEAD:
Elrond [Sat, 22 Apr 2000 13:42:49 +0000 (13:42 +0000)]
Directly from HEAD:
installscripts.sh installswat.sh makeyodldocs.sh
smbtar

24 years agomoved parse_misc.o and parse_rpc.o from RPC_PARSE_OBJ2 to
Elrond [Sat, 22 Apr 2000 13:15:30 +0000 (13:15 +0000)]
moved parse_misc.o and parse_rpc.o from RPC_PARSE_OBJ2 to
LIBSMB_OBJ, cause libsmb anyway depended on them.
Now could remove $(RPC_PARSE_OBJ2) from nmbd and smbclient,
and both got 30k smaller.

Split PRINTING_OBJ into PRINTING_OBJ and PRINTBACKEND_OBJ,
like HEAD. Now swat links, but spoolssd still doesn't link.
(Of course, smbd also doesn't compile)

24 years agoFrom HEAD:
Elrond [Sat, 22 Apr 2000 12:24:25 +0000 (12:24 +0000)]
From HEAD:

> printing/printing.c: Convert print_fsp_open to return an allocated fsp.

Now at leat smbd/open.c compiles, but spoolssd and swat
don't link any more, cause printing.c now depends on
smbd/files.c, which in turn depends on whatever.

I guess, swat will not link in HEAD either...

24 years agoFrom HEAD:
Elrond [Sat, 22 Apr 2000 11:18:38 +0000 (11:18 +0000)]
From HEAD:

> nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
I didn't see this in the diff.
>                           Also fix for sidsize DOS bug.
Saw that.

Luke: Can you take a _short_ look at the diff of
nmbd_processlogon.c in TNG and HEAD, this looks like
unicode-stuff.

24 years agomerge from last 2 days (not compiled).
Luke Leighton [Sat, 22 Apr 2000 09:15:53 +0000 (09:15 +0000)]
merge from last 2 days (not compiled).

24 years agoreturn NULL for a zero size memdup
Andrew Tridgell [Sat, 22 Apr 2000 08:29:41 +0000 (08:29 +0000)]
return NULL for a zero size memdup

24 years agodon't copy a null groups list
Andrew Tridgell [Sat, 22 Apr 2000 08:28:49 +0000 (08:28 +0000)]
don't copy a null groups list

24 years agofixed overlapping strcpy() found by insure
Andrew Tridgell [Sat, 22 Apr 2000 08:28:22 +0000 (08:28 +0000)]
fixed overlapping strcpy() found by insure

24 years agofixed uninitialised snum
Andrew Tridgell [Sat, 22 Apr 2000 08:27:48 +0000 (08:27 +0000)]
fixed uninitialised snum

24 years agoThis is a *big* checkin that may break some things, but implements the
Jeremy Allison [Sat, 22 Apr 2000 00:33:16 +0000 (00:33 +0000)]
This is a *big* checkin that may break some things, but implements the
new open mechanism Andrew & I discussed.

config.sub:
configure: Included the QNX patch.

include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).

Note that we will also need locking calls in the vfs (to be added).

lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
                          Also fix for sidsize DOS bug.

locking/locking.c: Check value of ret before using it for memdup.

printing/printing.c: Convert print_fsp_open to return an allocated fsp.

rpc_server/srv_lsa.c: Fix for NT domain logons.

I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.

smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.

smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
               open_file_stat to return an fsp from the call.

smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
             open_file_stat to return an fsp from the call.

In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.

The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.

This code will need extensive testing but seems to initially work.

Jeremy.

24 years agoMade some things static, some of those turned out to be
Elrond [Thu, 20 Apr 2000 19:35:03 +0000 (19:35 +0000)]
Made some things static, some of those turned out to be
unused currently, if you need them, make them public again:
lib/msrpc-client.c, rpc_client/cli_connect.c,
rpc_parse/parse_lsa.c, rpcclient/display_dfs.c

merged a little of util_sid.c from HEAD (more cosmetic and
ordering)

dropped in profile.c from HEAD

24 years agoSplit WINBINDD_OBJ into WINBINDD_OBJ1, which containts the
Elrond [Thu, 20 Apr 2000 17:51:04 +0000 (17:51 +0000)]
Split WINBINDD_OBJ into WINBINDD_OBJ1, which containts the
winbindd-specific objects and from which the prototypes are
generated, and WINBINDD_OBJ, which contains WINBINDD_OBJ1
and library-objects.

Did this, cause proto.h just again included all the
prototypes for rpc_client and rpc_parse.
proto.h went down from 6466 lines / 288k
    to 4578 lines / 197k

... hope, Tim isn't too angry, that I touched his area.

24 years agoMore games with string handling.
Tim Potter [Thu, 20 Apr 2000 12:02:55 +0000 (12:02 +0000)]
More games with string handling.

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:38:48 +0000 (07:38 +0000)]
Code review by tridge.

Modified daemon architecture to manage partial reads and writes of client
data properly.

Also keep client socket file descriptors open for as long as possible.

Moved client state back a level from inside winbindd_{user,group}.c into
winbindd.c

All winbindd_* functions now take a winbindd_state pointer as argument
rather than selected bits of the request structure.

Lots of code moved to winbind_utils.c

String handling cleaned up.

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:34:35 +0000 (07:34 +0000)]
Code review by tridge.

Cleaned up string handling.

Cut out huge swathes of code into winbindd_util.c

Renamed a bunch of types.

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:33:42 +0000 (07:33 +0000)]
Code review by tridge.

Cleaned up string handling.

Moved across group and user state for {set,get,end}{pw,gr}ent() functions.

Added externals for domain name, uid and gid lists.

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:21:16 +0000 (07:21 +0000)]
Code review by tridge.

Moved across common functions from winbindd.c, winbindd_{user,group}.c and
winbindd_surs.c

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:20:20 +0000 (07:20 +0000)]
Code review by tridge.

Moved functions into ntdom.c as they are now only used by the client.

24 years agoCode review by tridge.
Tim Potter [Thu, 20 Apr 2000 07:19:13 +0000 (07:19 +0000)]
Code review by tridge.

Checked result of all system calls == -1 instead of < 0.

Cleaned up string handling.

Copied across next_token() function from lib/util_string.c and removed call
to strtok() function.

Keep connection to winbindd UNIX domain socket open rather than closing it
after each transaction.

Process pid now not required to be passed to winbindd.

24 years agoRemoved dependency of libnss_ntdom.so to any other Samba objects.
Tim Potter [Thu, 20 Apr 2000 07:13:52 +0000 (07:13 +0000)]
Removed dependency of libnss_ntdom.so to any other Samba objects.

24 years agoadded client-side net_enum_trust_dom_list because am trying to track down
Luke Leighton [Thu, 20 Apr 2000 05:17:55 +0000 (05:17 +0000)]
added client-side net_enum_trust_dom_list because am trying to track down
a reliability-bug.

24 years agopreparing for release of alpha.2.4.2
Samba Release Account [Thu, 20 Apr 2000 04:54:28 +0000 (04:54 +0000)]
preparing for release of alpha.2.4.2

24 years agodebugging data-transfer interface (again).
Luke Leighton [Thu, 20 Apr 2000 04:46:46 +0000 (04:46 +0000)]
debugging data-transfer interface (again).

24 years agoMade some things static, will look later, why protos from
Elrond [Wed, 19 Apr 2000 15:58:38 +0000 (15:58 +0000)]
Made some things static, will look later, why protos from
ncacn_np_use.c end up in both proto.h and
rpc_client_proto.h.

24 years agonew unicode map files (ranges)
Luke Leighton [Wed, 19 Apr 2000 15:13:53 +0000 (15:13 +0000)]
new unicode map files (ranges)

24 years agooops.
Luke Leighton [Wed, 19 Apr 2000 15:12:57 +0000 (15:12 +0000)]
oops.

24 years agoOSF1 compiler can't take #defines with whitespace in front of them
Luke Leighton [Wed, 19 Apr 2000 12:37:00 +0000 (12:37 +0000)]
OSF1 compiler can't take #defines with whitespace in front of them
(thanks helmut)

24 years agomore merge.
Luke Leighton [Wed, 19 Apr 2000 08:46:49 +0000 (08:46 +0000)]
more merge.

24 years agouse sys_fsusage() not disk_free() in printing.c
Andrew Tridgell [Wed, 19 Apr 2000 08:44:56 +0000 (08:44 +0000)]
use sys_fsusage() not disk_free() in printing.c

24 years agomore merge
Luke Leighton [Wed, 19 Apr 2000 08:23:23 +0000 (08:23 +0000)]
more merge

24 years agoThis commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
cvs2svn Import User [Wed, 19 Apr 2000 08:23:14 +0000 (08:23 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.

24 years agosplit fsusage() into a separate module (to fix linking problems with
Andrew Tridgell [Wed, 19 Apr 2000 08:23:13 +0000 (08:23 +0000)]
split fsusage() into a separate module (to fix linking problems with
spoolssd in tng)

24 years agomore merge.
Luke Leighton [Wed, 19 Apr 2000 08:18:53 +0000 (08:18 +0000)]
more merge.

24 years agomiddle of a merge.
Luke Leighton [Wed, 19 Apr 2000 07:45:22 +0000 (07:45 +0000)]
middle of a merge.

24 years agopatch from luke to split out lanman code from ipc.c into lanman.c
Andrew Tridgell [Wed, 19 Apr 2000 07:00:22 +0000 (07:00 +0000)]
patch from luke to split out lanman code from ipc.c into lanman.c

24 years ago- got rid of the "passive" option
Andrew Tridgell [Wed, 19 Apr 2000 04:01:16 +0000 (04:01 +0000)]
- got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot

24 years agoImplemented routine to expand group members that are also groups so the
Tim Potter [Wed, 19 Apr 2000 03:32:41 +0000 (03:32 +0000)]
Implemented routine to expand group members that are also groups so the
group list concerned contains only users.

24 years agoSync up with 2.0.7 w.r.t. guest users.
Jeremy Allison [Tue, 18 Apr 2000 21:23:26 +0000 (21:23 +0000)]
Sync up with 2.0.7 w.r.t. guest users.
Jeremy.

24 years agolocking/locking.c: Fixed placeholder code for POSIX locking.
Jeremy Allison [Tue, 18 Apr 2000 20:41:04 +0000 (20:41 +0000)]
locking/locking.c: Fixed placeholder code for POSIX locking.
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning.
                     tmpfile gives mirror warning.
smbd/groupname.c: Remember to file_lines_free() on exit.
tdb/tdb.h: Add tdb_traverse_func typedef.
Jeremy

24 years agomoved cli_connect_auth() made it static. more work needed.
Luke Leighton [Tue, 18 Apr 2000 09:46:14 +0000 (09:46 +0000)]
moved cli_connect_auth() made it static.  more work needed.

24 years agomade cli_close_socket() static.
Luke Leighton [Tue, 18 Apr 2000 09:37:16 +0000 (09:37 +0000)]
made cli_close_socket() static.

24 years agoBOOL storing an int result. oops.
Luke Leighton [Tue, 18 Apr 2000 08:31:02 +0000 (08:31 +0000)]
BOOL storing an int result.  oops.

24 years agomore merge/shuffling.
Luke Leighton [Tue, 18 Apr 2000 06:14:22 +0000 (06:14 +0000)]
more merge/shuffling.

24 years agostart splitting domain-related functions out of clientgen.c
Luke Leighton [Tue, 18 Apr 2000 05:13:39 +0000 (05:13 +0000)]
start splitting domain-related functions out of clientgen.c
removed agent redirect code.

24 years agotng changes:
Andrew Tridgell [Tue, 18 Apr 2000 04:40:30 +0000 (04:40 +0000)]
tng changes:

- got rid of passive
- go back to head branch select call
- cleanup and simplify pdu send code

24 years agoupdates from the TNG branch
Andrew Tridgell [Tue, 18 Apr 2000 03:34:27 +0000 (03:34 +0000)]
updates from the TNG branch

24 years agodon't parse blank lines
Andrew Tridgell [Tue, 18 Apr 2000 02:35:14 +0000 (02:35 +0000)]
don't parse blank lines

24 years agofixed some crash bugs in the nt forms parsing
Andrew Tridgell [Tue, 18 Apr 2000 02:17:46 +0000 (02:17 +0000)]
fixed some crash bugs in the nt forms parsing

24 years agoReadDirName calls vfs->readdirname calls dos_readdirname.
Luke Leighton [Tue, 18 Apr 2000 02:09:50 +0000 (02:09 +0000)]
ReadDirName calls vfs->readdirname calls dos_readdirname.
replaced with readdirname.  ditto for OpenDir and CloseDir.

24 years agoCorrected minor parsing errors.
Shirish Kalele [Mon, 17 Apr 2000 22:40:02 +0000 (22:40 +0000)]
Corrected minor parsing errors.
Not adding a Dfs junction to msdfs.tdb if it doesn't have any referred paths
as parsed from the dfsmap file.

24 years agoWhen parsing a dfs map for a service, see if the mount points exist that stand
Shirish Kalele [Mon, 17 Apr 2000 21:25:32 +0000 (21:25 +0000)]
When parsing a dfs map for a service, see if the mount points exist that stand
for token junction points in the Dfs. If not, create these mount points as
subdirectories of the service directory.

24 years agocmd_sam_add_addaliasmem() function gets number of names wrong when passing
Tim Potter [Mon, 17 Apr 2000 07:05:14 +0000 (07:05 +0000)]
cmd_sam_add_addaliasmem() function gets number of names wrong when passing
argv to lsa_lookup_names()

Don't try to free command line args in cmd_sam_add_aliasmem()

24 years agoCosmetic change to help message for 'addaliasmem'.
Tim Potter [Mon, 17 Apr 2000 06:41:50 +0000 (06:41 +0000)]
Cosmetic change to help message for 'addaliasmem'.

24 years agogot rid of some more old configure tests and includes
Andrew Tridgell [Mon, 17 Apr 2000 06:11:08 +0000 (06:11 +0000)]
got rid of some more old configure tests and includes

24 years agoremoved some obsolete configure tests (sysv ipc etc)
Andrew Tridgell [Mon, 17 Apr 2000 05:56:49 +0000 (05:56 +0000)]
removed some obsolete configure tests (sysv ipc etc)

24 years agomoved standard_sub() and friends into a separate module
Andrew Tridgell [Mon, 17 Apr 2000 04:46:10 +0000 (04:46 +0000)]
moved standard_sub() and friends into a separate module

24 years agobruce tenison spotted that creategroup was being requested with
Luke Leighton [Mon, 17 Apr 2000 04:06:54 +0000 (04:06 +0000)]
bruce tenison spotted that creategroup was being requested with
insufficient access mask rights (0x00020001, whatever that is).

24 years agoFixed bug where getgrgid() would return incorrect group membership.
Tim Potter [Mon, 17 Apr 2000 02:59:30 +0000 (02:59 +0000)]
Fixed bug where getgrgid() would return incorrect group membership.

The getgrent() function returns domain aliases as well as domain groups and
builtin aliases.

Removed some debugs.

24 years agoRenamed loop variable to avoid name clash.
Tim Potter [Mon, 17 Apr 2000 01:15:25 +0000 (01:15 +0000)]
Renamed loop variable to avoid name clash.

Changed magic numbers in samr_enum_dom_{aliases,groups} function calls.

24 years agoAdded security checks for opening and creating winbind daemon UNIX domain
Tim Potter [Mon, 17 Apr 2000 01:12:19 +0000 (01:12 +0000)]
Added security checks for opening and creating winbind daemon UNIX domain
socket in /tmp.

Shuffled around socket code to avoid unecessary linking of Samba libraries
with libnss_ntdom.so

24 years agoReturn the string "unknown error" instead of a blank message for unknown
Tim Potter [Mon, 17 Apr 2000 01:06:57 +0000 (01:06 +0000)]
Return the string "unknown error" instead of a blank message for unknown
errors in get_nt_error_msg() function.

24 years agoconverted a couple more functions to use a fd instead of a FILE*
Andrew Tridgell [Sun, 16 Apr 2000 11:17:19 +0000 (11:17 +0000)]
converted a couple more functions to use a fd instead of a FILE*

added a new utility fn file_lines_slashcont() which is used to handle
files that treat a \ followed by a newline as a blank

24 years agoconverted a bunch more functions to use a fd instead of a FILE*
Andrew Tridgell [Sun, 16 Apr 2000 11:00:21 +0000 (11:00 +0000)]
converted a bunch more functions to use a fd instead of a FILE*

to support some of this I added the following functions in util_file.c

file_lines_pload : load lines from a pipe
file_pload : load a pipe into memory

24 years agogot rid of FILE* in the unix name mapping code
Andrew Tridgell [Sun, 16 Apr 2000 09:42:09 +0000 (09:42 +0000)]
got rid of FILE* in the unix name mapping code

24 years agogot rid of all the FILE* calls in the NT print system.
Andrew Tridgell [Sun, 16 Apr 2000 09:41:39 +0000 (09:41 +0000)]
got rid of all the FILE* calls in the NT print system.

this also fixes a few security holes in that code. JF - you need to be
careful about open files for writing! symlinks can trap you.

note that I always unlink() the file first, then open with
O_EXCL. That is a cheap trick to avoid the symlink problems.

24 years agoadded fdprintf()
Andrew Tridgell [Sun, 16 Apr 2000 09:40:02 +0000 (09:40 +0000)]
added fdprintf()

this is like fprintf() but operates on a file descriptor

combined with file_load_lines() this makes it really easy to get rid
of the use of fopen() in Samba.

24 years agoremoved old comments
Andrew Tridgell [Sun, 16 Apr 2000 08:04:06 +0000 (08:04 +0000)]
removed old comments

24 years agoimproved the error handling and added queue pause and resume
Andrew Tridgell [Sun, 16 Apr 2000 08:03:37 +0000 (08:03 +0000)]
improved the error handling and added queue pause and resume

24 years agouse some symbolic names for print queue status
Andrew Tridgell [Sun, 16 Apr 2000 07:38:45 +0000 (07:38 +0000)]
use some symbolic names for print queue status

24 years agoadded helper fns to change from internal status codes to nt spoolss codes
Andrew Tridgell [Sun, 16 Apr 2000 07:28:36 +0000 (07:28 +0000)]
added helper fns to change from internal status codes to nt spoolss codes

24 years ago- put the job status in english not french!
Andrew Tridgell [Sun, 16 Apr 2000 07:28:06 +0000 (07:28 +0000)]
- put the job status in english not french!

- add helper fns to change from internal status codes to nt spoolss codes

24 years agoadded tdb_get_int() and tdb_store_int()
Andrew Tridgell [Sun, 16 Apr 2000 06:23:11 +0000 (06:23 +0000)]
added tdb_get_int() and tdb_store_int()

they are very useful for database versioning

24 years agothe changes to the main smb code
Andrew Tridgell [Sun, 16 Apr 2000 06:22:31 +0000 (06:22 +0000)]
the changes to the main smb code

------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.

24 years agoJF and Jeremy - please have a look at what I did to the spoolss
Andrew Tridgell [Sun, 16 Apr 2000 06:20:43 +0000 (06:20 +0000)]
JF and Jeremy - please have a look at what I did to the spoolss
code. It now uses the new printing backend.

------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.

24 years agothe bulk of the changes. Also split the loadparm related code into printing/load.c
Andrew Tridgell [Sun, 16 Apr 2000 06:20:02 +0000 (06:20 +0000)]
the bulk of the changes. Also split the loadparm related code into printing/load.c
so swat can get it without linking to the backend code

------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.

24 years agothe new file_lines_load() and file_lines_free() routines. Very useful!
Andrew Tridgell [Sun, 16 Apr 2000 06:19:11 +0000 (06:19 +0000)]
the new file_lines_load() and file_lines_free() routines. Very useful!

------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.