1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

92 Commits

Author SHA1 Message Date
Volker Lendecke
df648d47ff r24949: Remove some static buffers 2007-10-10 12:30:29 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jeremy Allison
bafd3b93f9 r23357: timespec_current() was returning the wrong ns time
(multiplying tv_sec, not tv_usec).
Jeremy.
2007-10-10 12:23:09 -05:00
Jim McDonough
2553b6a56d r23041: Remainder of fix for 4630: fix special case of unix_to_nt_time() for
TIME_T_MAX, and also display of it in http_timestring()
2007-10-10 12:22:16 -05:00
Jeremy Allison
80a6312390 r23006: Arg. Fix stupid typo in 64-bit path.
Jeremy.
2007-10-10 12:22:14 -05:00
Jeremy Allison
4e1a0b2549 r23005: If we're running on a system where time_t is 8 bytes
we have to take care to preserve the "special" values
for Windows of 0x80000000 and 0x7FFFFFFF when casting
between time_t and uint32. Add conversion functions
(and use them).
Jeremy.
2007-10-10 12:22:13 -05:00
Jeremy Allison
8f3d530c5a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
2007-10-10 12:18:24 -05:00
Jim McDonough
f3a8048a62 r21637: Get "password never expires" account policy working.
0x8000000000000000LL is "infinity" to NT and should
not be converted numerically to time_t.
2007-10-10 12:18:19 -05:00
Jeremy Allison
461db3c8ed r21060: Start refactoring out the non-return case statements
into functions.
Jeremy.
2007-10-10 12:17:31 -05:00
Jeremy Allison
66cca893e1 r20695: Remove duplication of constants.
Jeremy.
2007-10-10 12:17:03 -05:00
Jeremy Allison
31f8e0edc0 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.
2007-10-10 12:17:03 -05:00
Jeremy Allison
f4e898b622 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.
2007-10-10 12:17:03 -05:00
Volker Lendecke
528082aed8 r18597: A C++ warning 2007-10-10 11:51:57 -05:00
Jelmer Vernooij
1115745cae r18188: merge 3.0-libndr branch 2007-10-10 11:43:56 -05:00
Derrell Lipman
8e119b64f1 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).
2007-10-10 11:39:47 -05:00
Jeremy Allison
63b13d2879 r17834: Another bug found by Volker's tests in the build farm !
Correctly map large nt timevals to TIME_T_MAX.
Jeremy.
2007-10-10 11:38:52 -05:00
Volker Lendecke
872d1299eb 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
2007-10-10 11:38:52 -05:00
Jeremy Allison
ead75870d5 r17818: Fixup uint64 time calc. NT time is a 64 bit number,
not high value seconds, low value 100ns units.
Jeremy.
2007-10-10 11:38:52 -05:00
Jeremy Allison
bd1fbdfb82 r17812: Fix bad unsigned comparisons with TIME_T_MIN/TIME_T_MAX.
Jeremy.
2007-10-10 11:38:50 -05:00
Jeremy Allison
9e65c175b0 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.
2007-10-10 11:38:49 -05:00
Jeremy Allison
425280a1d2 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.
2007-10-10 11:38:48 -05:00
Jeremy Allison
5d9c308e7b r17767: Argggg. Broke the build. Need to fix callers of put_long_date()
and interpret_long_date() first. Reverting...
Jeremy.
2007-10-10 11:38:47 -05:00
Jeremy Allison
4ece92f7ef r17766: Getting ready to properly expose 100ns times on
the wire. Move the internals of nt_time functions
to use struct timespecs.
Jeremy.
2007-10-10 11:38:47 -05:00
Jeremy Allison
9dafb7f48c 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.
2007-10-10 11:19:14 -05:00
Jeremy Allison
6c61dc8ed6 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
2007-10-10 11:17:26 -05:00
Jim McDonough
00eb42791a r16047: Remove unnecessary line, as this value is set in either branch of the
'if' below.  Spotted by Aleksey Fedoseev.
2007-10-10 11:17:18 -05:00
James Peach
e7ddcd8c33 r15449: Remove unused function get_nttime_max (which claims it
is incorrect).
2007-10-10 11:16:46 -05:00
Jeremy Allison
95793d7e64 r13427: Fix ctime -> st_ctime.
Jeremy.
2007-10-10 11:10:01 -05:00
Jeremy Allison
07132d8796 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.
2007-10-10 11:10:01 -05:00
Volker Lendecke
fc73690a70 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
2007-10-10 11:06:26 -05:00
Jeremy Allison
b745114423 r11530: Add the "time offset" parameter back in for people who
might use it.
Jeremy.
2007-10-10 11:05:19 -05:00
Jeremy Allison
414303bc02 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.
2007-10-10 11:05:19 -05:00
Gerald Carter
939c3cb5d7 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)
2007-10-10 11:04:48 -05:00
Tim Potter
dcc7437138 r8946: Some casts to fix warnings when time_t is an unsigned type. Fixes
bugzilla #1888 and #1894.
2007-10-10 11:00:22 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Gerald Carter
4e0ac63c36 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).
2007-10-10 10:56:15 -05:00
Jeremy Allison
00f8ac509a r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t values.
Jeremy.
2007-10-10 10:55:38 -05:00
Jeremy Allison
08553faeeb r5342: Reformat some very old code.
Jeremy.
2007-10-10 10:55:38 -05:00
Jeremy Allison
620f2e608f 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.
2007-10-10 10:53:32 -05:00
Jeremy Allison
894cc6d162 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.
2007-10-10 10:51:54 -05:00
Richard Sharpe
316f83add7 Clean up a comment noticed by Jonathan Shao@Panasas.com and remove an
obsolete comment by Luke Leighton.
-
Tim Potter
761e13da4e 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.
-
Simo Sorce
bda64a11f7 make nt-time <-> unix-time functions nearly reversible -
Andrew Tridgell
0ce6eddad8 applied patch from bug#140
this fixes a timestamp problem with 64 bit machines
-
Andrew Bartlett
9ef0d40c3f Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
-
Jeremy Allison
199c9fcbb9 The _abs time functions should not be converting from/to GMT.
Patch from "Jordan Russell" <jr-list-samba-technical@quo.to>
Jeremy.
-
Gerald Carter
ee9cbf5807 sync with HEAD -
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -