1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

82 Commits

Author SHA1 Message Date
Jeremy Allison
b86d6b75c0 r20695: Remove duplication of constants.
Jeremy.
(This used to be commit 66cca893e1)
2007-10-10 12:17:03 -05:00
Jeremy Allison
ec43849134 r20694: To get this right we need to do signed 64-bit
comparisons here, not unsigned as we're eventually
casting into what it normall a signed 32 bit
value. Guenther please check (but I think I'm right here).
Jeremy.
(This used to be commit 31f8e0edc0)
2007-10-10 12:17:03 -05:00
Jeremy Allison
5a2585416c r20692: Fix bug found by Guenther -
Just try to log on in offline mode without the fix: all accounts are expired,
although they are set to never expire in the PAC/info3.

NTTIME "Never" needs to get (time_t) -1.

We were casting a uint64 to time_t before
comparing, and we should have been doing it
the other way around.

Guenther please check this fixes things.

Jeremy.
(This used to be commit f4e898b622)
2007-10-10 12:17:03 -05:00
Volker Lendecke
8bf6d57176 r18597: A C++ warning
(This used to be commit 528082aed8)
2007-10-10 11:51:57 -05:00
Jelmer Vernooij
995205fc60 r18188: merge 3.0-libndr branch
(This used to be commit 1115745cae)
2007-10-10 11:43:56 -05:00
Derrell Lipman
5e44fc4cd4 r18009: Fixes bug 4026.
This completes the work Jeremy began last week, disambiguating the meaning of
c_time.  (In POSIX terminology, c_time means "status Change time", not "create
time".)  All uses of c_time, a_time and m_time have now been replaced with
change_time, access_time, and write_time, and when creation time is intended,
create_time is used.

Additionally, the capability of setting and retrieving the create time have
been added to the smbc_setxattr() and smbc_getxattr() functions.  An example
of setting all four times can be seen with the program

  examples/libsmbclient/testacl

with the following command line similar to:

  testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt'

The -f option turns on the new mode which uses full time names in the
attribute specification (e.g. ACCESS_TIME vs A_TIME).
(This used to be commit 8e119b64f1)
2007-10-10 11:39:47 -05:00
Jeremy Allison
6365dcef4d r17834: Another bug found by Volker's tests in the build farm !
Correctly map large nt timevals to TIME_T_MAX.
Jeremy.
(This used to be commit 63b13d2879)
2007-10-10 11:38:52 -05:00
Volker Lendecke
b9142f20df r17831: Attempt to fix the build farm: 0x7fffffffffffffff needs special casing too I
think. This broke 'make test' because the newly created user was set to be
kicked off Mi, 22 Jan 1975 23:55:33 CET (unix time 159663333) with the
setuserinfo21 call.

I'm not 100% sure that 0x7ff... means max time as I do it here, I vaguely
remember it to mean "don't touch".

Does anybody know that for sure?

Jeremy, please check this.

Thanks,

Volker
(This used to be commit 872d1299eb)
2007-10-10 11:38:52 -05:00
Jeremy Allison
94af1ad542 r17818: Fixup uint64 time calc. NT time is a 64 bit number,
not high value seconds, low value 100ns units.
Jeremy.
(This used to be commit ead75870d5)
2007-10-10 11:38:52 -05:00
Jeremy Allison
b377324050 r17812: Fix bad unsigned comparisons with TIME_T_MIN/TIME_T_MAX.
Jeremy.
(This used to be commit bd1fbdfb82)
2007-10-10 11:38:50 -05:00
Jeremy Allison
01bb24624d r17809: Add in 64-bit integer time calculations (taken from
Samba4) for machines that have 64-bit integers. Leave
the (double) code for machines that don't. Needs
testing.... :-).
Jeremy.
(This used to be commit 9e65c175b0)
2007-10-10 11:38:49 -05:00
Jeremy Allison
a64925ddff r17800: Start using struct timespec internally for file times
on the wire. This allows us to go to nsec resolution
for systems that support it. It should also now be
easy to add a correct "create time" (birth time)
for systems that support it (*BSD). I'll be watching
the build farm closely after this one for breakage :-).
Jeremy.
(This used to be commit 425280a1d2)
2007-10-10 11:38:48 -05:00
Jeremy Allison
a5a69ec150 r17767: Argggg. Broke the build. Need to fix callers of put_long_date()
and interpret_long_date() first. Reverting...
Jeremy.
(This used to be commit 5d9c308e7b)
2007-10-10 11:38:47 -05:00
Jeremy Allison
89f6af42ba r17766: Getting ready to properly expose 100ns times on
the wire. Move the internals of nt_time functions
to use struct timespecs.
Jeremy.
(This used to be commit 4ece92f7ef)
2007-10-10 11:38:47 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
a1e0a0e928 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
(This used to be commit 6c61dc8ed6)
2007-10-10 11:17:26 -05:00
Jim McDonough
9291391885 r16047: Remove unnecessary line, as this value is set in either branch of the
'if' below.  Spotted by Aleksey Fedoseev.
(This used to be commit 00eb42791a)
2007-10-10 11:17:18 -05:00
James Peach
ea069fcf01 r15449: Remove unused function get_nttime_max (which claims it
is incorrect).
(This used to be commit e7ddcd8c33)
2007-10-10 11:16:46 -05:00
Jeremy Allison
e5ec28ae55 r13427: Fix ctime -> st_ctime.
Jeremy.
(This used to be commit 95793d7e64)
2007-10-10 11:10:01 -05:00
Jeremy Allison
687e5be25e r13423: Write wrapper functions (and configure tests) so we can
always assume we can get a struct timespec out of a stat
struct. This will allow us to portably move to nsec timestamps
on files and directories in the file server code in future.
Jeremy.
(This used to be commit 07132d8796)
2007-10-10 11:10:01 -05:00
Volker Lendecke
da979c9e7e r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)
Implement 'net rpc shell account' -- An editor for account policies

nt_time_to_unix_abs changed its argument which to me seems wrong, and I could
not find a caller that depends on this. So I changed it. Applied some more
const in time.c.

Volker
(This used to be commit fc73690a70)
2007-10-10 11:06:26 -05:00
Jeremy Allison
4787311083 r11530: Add the "time offset" parameter back in for people who
might use it.
Jeremy.
(This used to be commit b745114423)
2007-10-10 11:05:19 -05:00
Jeremy Allison
6d5757395a r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
(This used to be commit 414303bc02)
2007-10-10 11:05:19 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Tim Potter
311cf22a2e r8946: Some casts to fix warnings when time_t is an unsigned type. Fixes
bugzilla #1888 and #1894.
(This used to be commit dcc7437138)
2007-10-10 11:00:22 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241)
2007-10-10 10:57:02 -05:00
Gerald Carter
5d1cb8e79e r6014: rather large change set....
pulling back all recent rpc changes from trunk into
3.0.  I've tested a compile and so don't think I've missed
any files.  But if so, just mail me and I'll clean backup
in a couple of hours.

Changes include \winreg, \eventlog, \svcctl, and
general parse_misc.c updates.

I am planning on bracketing the event code with an
#ifdef ENABLE_EVENTLOG until I finish merging Marcin's
changes (very soon).
(This used to be commit 4e0ac63c36)
2007-10-10 10:56:15 -05:00
Jeremy Allison
0f87a9ada3 r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t values.
Jeremy.
(This used to be commit 00f8ac509a)
2007-10-10 10:55:38 -05:00
Jeremy Allison
daa2d8bd1f r5342: Reformat some very old code.
Jeremy.
(This used to be commit 08553faeeb)
2007-10-10 10:55:38 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
(This used to be commit 894cc6d162)
2007-10-10 10:51:54 -05:00
Richard Sharpe
e83fc388b3 Clean up a comment noticed by Jonathan Shao@Panasas.com and remove an
obsolete comment by Luke Leighton.
(This used to be commit 316f83add7)
2003-11-26 19:15:22 +00:00
Tim Potter
fc809973b9 Use the actual size of the buffer in strftime instead of a made up value
which just happens to be less than sizeof(fstring).  Closes #713.
(This used to be commit 761e13da4e)
2003-11-04 20:09:44 +00:00
Simo Sorce
a98fc57af9 make nt-time <-> unix-time functions nearly reversible
(This used to be commit bda64a11f7)
2003-10-12 20:48:56 +00:00
Andrew Tridgell
7309f50062 applied patch from bug#140
this fixes a timestamp problem with 64 bit machines
(This used to be commit 0ce6eddad8)
2003-06-09 02:54:07 +00:00
Andrew Bartlett
266ec4aac0 Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
(This used to be commit 9ef0d40c3f)
2003-02-24 03:09:08 +00:00
Jeremy Allison
f35d43a7d2 The _abs time functions should not be converting from/to GMT.
Patch from "Jordan Russell" <jr-list-samba-technical@quo.to>
Jeremy.
(This used to be commit 199c9fcbb9)
2002-12-10 00:46:52 +00:00
Gerald Carter
7d1eb6f7b6 sync with HEAD
(This used to be commit ee9cbf5807)
2002-09-26 18:58:34 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
1d40138232 Round and round we go....
Jeremy.
(This used to be commit 2603ab3c68)
2002-01-11 23:33:12 +00:00
Jeremy Allison
b741f6b04c Latest attempt at changeid.
Jeremy.
(This used to be commit 24ee18c77e)
2002-01-11 21:52:46 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Jeremy Allison
cb4b13a82b Fixed the bug with member servers in a Samba PDC hosted domain not allowing
other access. Problem was max time was being set to 0xffffffff, instead of
0x7fffffff.
Jeremy.
(This used to be commit 94403d8417)
2001-10-02 06:57:18 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
484a7c0341 move to SAFE_FREE()
(This used to be commit 60e907b7e8)
2001-09-17 02:19:44 +00:00
Tim Potter
82901df5e3 Merge from TNG - function to initialise NTTIME structure.
(This used to be commit 14bc8283f2)
2001-08-28 06:02:18 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +00:00