Age | Commit message (Collapse) | Author | Files | Lines |
|
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
|
|
In particular this commit focuses on:
Changing the Get_Pwnam code so that it can work in a const-enforced
environment.
While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.
----
These changes allow for 'const' in the Samba tree.
There are a number of good reasons to do this:
- I want to allow the SAM_ACCOUNT structure to move from wasteful
pstrings and fstrings to allocated strings. We can't do that if
people are modifying these outputs, as they may well make
assumptions about getting pstrings and fstrings
- I want --with-pam_smbpass to compile with a slightly sane
volume of warnings, currently its pretty bad, even in 2.2
where is compiles at all.
- Tridge assures me that he no longer opposes 'const religion'
based on the ability to #define const the problem away.
- Changed Get_Pwnam(x,y) into two variants (so that the const
parameter can work correctly): - Get_Pwnam(const x) and
Get_Pwnam_Modify(x).
- Reworked smbd/chgpasswd.c to work with these mods, passing
around a 'struct passwd' rather than the modified username
(This used to be commit e7634f81c5116ff4addfb7e495f54b6bb78e8f77)
|
|
(This used to be commit d42c28fbadf577a23fb8c1da9e1c64a2f34fe133)
|
|
(This used to be commit 6a734158d92663873b7a9df517bec45a27ee9790)
|
|
(This used to be commit a70bc077a1ecc4b42254f83327c8d80c618e95f6)
|
|
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
|
|
The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object. This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.
This NULL pointer test was what was breaking the adding of accounts up until
now, and this code has been reworked to avoid duplicating work - I hope this
will avoid a similar mess-up in future.
Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were
being ignored. Some of these functions malloc() and are permitted to fail.
Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived
precisely didilly-squat, just returning False. Now that we check the returns
this bug was spotted. This could allow different LM and NT passwords.
- the pdbedit code needs to start checking these too, but I havn't had a
chance to fix it.
I have also fixed up where some of the password changing code was using the
pdb_set functions to store *internal* data. I assume this is from a previous
lot of mass conversion work...
Most likally (and going on past experience) I have missed somthing, probably in
the LanMan password change code which I havn't yet been able to test, but this
lot is in much better shape than it was before.
If all this is too much to swallow (particularly for 2.2.2) then just adding a
sam_pass = NULL to the particular line of passdb.c should do the trick for the
ovbious bug.
Andrew Bartlett
(This used to be commit 762c8758a7869809d89b4da9c2a5249678942930)
|
|
This whole area needs to be cleaned up. Should this kind of passowrd
change/check be permitted with encrypt passwords = yes?
In any case I've also had trouble testing this, as I can't find the right
software/configuration to exersise this behaviour. But its better than the
previous situation. Any assistance greatly appriciated.
Andrew Bartlett
(This used to be commit 37655b42897031f754d436435e64a2548de756b5)
|
|
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
|
|
the client code still needs some work
(This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
|
|
(This used to be commit e26502b1f840cd0fafd700c9756b610b38709ce2)
|
|
It's a quick and ugly hack as a proof of concept: the dell powervault 705
works with a samba PDC.
I'll do a correct user enumeration later.
J.F.
(This used to be commit 9ec6a8735682c7dfe9f8573f063da7625d425d8a)
|
|
many possible mem leaks, and segfaults fixed.
someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b465114ce209344965c1ca0333b84db9)
|
|
(This used to be commit 00703d306f14a5977df75cb04ee34ae8628ed40e)
|
|
(This used to be commit 6ab0e949d18b97ea7177175a4e6abb5ba076db98)
|
|
Jeremy.
(This used to be commit b7bd512d9a9b543b9caf93c264776db6852c03ea)
|
|
not change behaviour.
This should make my later diffs smaller, where I actualy start cleaning up this
mess...
Andrew Bartlett
(This used to be commit 04f090c224bb7ac3b53c430a591fce1fc939a81c)
|
|
can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
|
|
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267960e56005a741817ebd227ecfc512a)
|
|
o sed 's/pdb_clear_sam/pdb_free_sam/g'
o add pdb_reset_sam()
o password changing should be ok now as well.
(This used to be commit 96d0e7c3301ad990f6c83b9c216720cb32661fb5)
|
|
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)
J.F.
(This used to be commit a4a4c02b12f030a3b9e6225b999c90689dfc4719)
|
|
- cleaned up GNUC printf attribute macros
- added enum handling in mkproto
- removed non-vararg code
- made slprintf and vslprintf just macros for snprintf and vsnprintf
- don't need slprintf code any more
(This used to be commit c7aeb2254dfc3cd0aa0b6c0bdd426f9323be0ddf)
|
|
added srvstr_push_ascii() and srvstr_pull_ascii() as convenience
routines to replace the current usage of strncpy() like fns
for packet pull/push. We need to do this in *lots* of places
in Samba in order to get our codepage handling right
(This used to be commit 8b0e3679a6dc479c0e3177707dff386559779b69)
|
|
First one adds a new info level into the lanman printing and an ioctl to the trans2 code.
Andrew - this uses ASCII only. It looks ok to me but please check !
Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped.
Jeremy.
(This used to be commit da79b519e0b6b4317d7fb5260d74e0e74a7e0b46)
|
|
(This used to be commit 0ea62800edd618091fde81e8de4347f612f98a18)
|
|
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
|
|
include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We
need these to be different as we're storing LPQ_xx enums in the tdb
already.
rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now
returning status codes.
smbd/lanman.c: Change the RAP status codes to have "RAP" in the name.
printing/printing.c: Keep track of the status of a job. Allow a job to be
deleted from one smbd when being submitted by another.
Made logic in mutex clearer.
Jeremy.
(This used to be commit 71029da7dd74eb91dd6953752bdf238f319d985d)
|
|
source/include/proto.h
- make proto
source/printing/nt_printing.c
source/rpc_server/srv_spoolss_nt.c
- Fix for the overwriting of printerdata entries when WinNT and
Win2k are modifying printer parameters on PCL printers. Turns out
that Win2k creates a printer with a NULL devmode entry and then
expects to set it on *OPEN* (yes this is insane). So we cannot
return a "default" devmode for a printer - and we must allow an
open to set it.
source/tdb/tdb.c
- Show freelist in an easier format. Show total free.
- When storing a new record, allocate memory for the key + data
before the tdb_allocate() as if the malloc fails a (sparse) hole
is left in the tdb.
source/tdb/tdbtool.c
- Show freelist in an easier format. Show total free.
source/tdb/Makefile
- cleaned up Makefile dependancies
source/smbd/lanman.c
- Fix for Win9x corrupting it's own parameter string.
source/printing/printfsp.c
source/printing/printing.c
source/rpc_server/srv_spoolss_nt.c
source/smbd/close.c
- Added normal close parameter into print_fsp_end() which treats an
abnormal close as error condition and deletes the spool file.
(This used to be commit 025f7a092ad258ff774e3f5e53737f8210cc8af6)
|
|
smbd/nttrans.c: Realloc mem fixes based on those that went into trans2.c
smbd/process.c: Move to a table based dispatch, based on a comment from Andrew
about Antons work.
Jeremy.
(This used to be commit a958f7822e095367efb8749b6f1f2e110ffb8866)
|
|
smbd/vfs-wrap.c:
smbd/vfs.c: Added fchmod_acl and chmod_acl.
lib/substitute.c:
smbd/lanman.c:
smbd/open.c:
smbd/process.c:
smbd/reply.c:
smbd/service.c: Removed sessetup_user variable. Added current_user_info struct
which conatins domain info etc. Added '%D' for client domain parameter.
Jeremy.
(This used to be commit 2844ec3d511680609d6794b8718001a1bda9e89f)
|
|
source/smbd/lanman.c
- cleanup and bug fix for win9x print queue purge.
source/printing/printing.c
- cleanup and bug fix for win9x print queue purge.
- print_job_end() changed to cleanup spool file in the event of a
failure returned from the print_run_command()
(This used to be commit 0235fbef37b400a2bf875163878e497282cd1739)
|
|
source/smbd/lanman.c
- Change fill_printq_info() to fix corrupted 9X/ME printer comment
(This used to be commit acbed88a195b32d251fd15fc8fdd069726659d64)
|
|
one printq case. Now goes though common function.
Jeremy.
(This used to be commit e9f48c9cec960b6190fb7a2485c9476640863071)
|
|
on read.
Jeremy.
(This used to be commit 76b8dd376d13eb4469417be217c966d54d333367)
|
|
Jeremy.
(This used to be commit 63cafb34b39443d03d17ae01b47adc0926b05fe2)
|
|
Jeremy.
(This used to be commit f571e1efd01c7b1b500a833df3bd074a8c4c65ec)
|
|
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)
The following functions implement the storage manipulation interface
/*The following definitions come from passdb/pdb_smbpasswd.c */
BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);
There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members. Note that the struct
passdb_ops {} has gone away. Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file. All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.
I'll write some documentation for this later. The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.
What works and may not:
o domain logons from Win9x works
o domain logons from WinNT 4 works
o user and group enumeration
as implemented by Tim works
o file and print access works
o changing password from
Win9x & NT ummm...i'll fix this tonight :)
If I broke anything else, just yell and I'll fix it. I think it
should be fairly quite.
-- jerry
(This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
|
|
(This used to be commit 18fa724a7969666dd5aa176af187054abc94bfd3)
|
|
Jeremy.
(This used to be commit d5be2334d4fb007e39565b771cbe68e338a7fe68)
|
|
or resume a print queue.
(This used to be commit 9998518a69c67c1540266549c69fca977a89acde)
|
|
(This used to be commit e451fd346105d5d34354ff9141d445b5f1a82e0a)
|
|
- make proto
- addition of function to convert from errno values to NT status codes
(source/lib/error.c)
- purge queue done without full access permission will purge only the
jobs owned by that user, rather than failing.
- unlock job database tdb before sending job to printer
- in print_job_start(), ensure that we don't pick a jobid with an existing
temporary file that may be owned by another user, as it causes silent
failures.
- fixes for printer permission checking for NT5 clients
(source/include/rpc_spoolss.h, source/printing/nt_printing.c,
source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c)
- change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c)
- fixed memory leaks for win95 driver download process
(source/smbd/lanman.c)
- properly free prs_structs and dacl in testsuite/printing/psec.c
(This used to be commit 74af3e2caec7197e5d1ca389e2f78054a4197502)
|
|
(This used to be commit 155c7c37398f5f9457ea249ded74f425b90ac9a0)
|
|
possible printjobs from that printer (I think this is correct).
Added error code returns for print_queue_XXX() functions.
Jeremy.
(This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5)
|
|
Thought I had already committed this.
jerry
(This used to be commit 2ceb704c3d06a92b97ba67ac82c007a7ba084b75)
|
|
stored in the TDB. See the message I posted about
this on samba-technical
* If the admin does not desire the new NT print driver
support, nothing needs to be done. All existing
parameters work the same.
* If the admin wants to take advantage of NT printer
driver support but does not want to migrate the 9x drivers
to the new setup, the leave the existing printers.def
file. When smbd attempts to locate a 9x driver for the
printer in the TDB and fails it will drop down to
using the printers.def (and all associated parameters).
The make_printerdef tool will also remain for backwards
compatibility but will be moved to the "this tool is the
old way of doing it" pile.
* If the admin installs a 9x driver for a printer on
a Samba host (in the printing TDB), this information will
take precedence and the three old printing parameters
will be ignored (including print driver location).
* If an admin wants to migrate the printers.def file into
the new setup, I can write a script to do this using
rpcclient. The main problem is the driver namespace
(we need the NT driver name first in order to
be consistent).
jerry
(This used to be commit ac049f8bf348810dc068382fdbc6635a2015d36a)
|
|
from the NT printer tdb.
Also added checks for time restrictions before allowing a job to print.
Jeremy.
(This used to be commit 8cfb55e81abebf0354e6d470ed68bbac1d6560ad)
|
|
fix for the Win9x printer drivers.
Changed command names to add "command" string on the end for some consistancy
with the other scripting commands.
Added '%P' option to tdbpack/unpack to store long comment string.
Made port name be "Samba Printer Port" if no enum port script given.
Fixed prs_uint32_pre code to cope with null args.
Jeremy.
(This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
|
|
Jeremy.
(This used to be commit 5130dd0f8b80aed5fb3c0df290b627057cc9b825)
|
|
filed to be ignored when an upload is done.
Modified to code to goto err on problems, simplifies it.
Jeremy.
(This used to be commit 9157a6ab2646c035a731d53aa3be010488ccf51a)
|