The Samba-Bugzilla – Attachment 2836 Details for
Bug 4402
Incorrect time logged with glibc 2.5 inside chroot area
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test program #2
chroot-timezone.c (text/x-csrc), 580 bytes, created by
Matt McCutchen
on 2007-07-21 09:13:07 UTC
(
hide
)
Description:
Test program #2
Filename:
MIME Type:
Creator:
Matt McCutchen
Created:
2007-07-21 09:13:07 UTC
Size:
580 bytes
patch
obsolete
>#include <unistd.h> >#include <time.h> >#include <stdio.h> >#include <sys/time.h> > >void showtime() { > int pid; > time_t time1; > struct tm tm; > char timestr[100]; > > pid = getpid(); > time(&time1); > //localtime_r(&time1, &tm); > //strftime(timestr, sizeof timestr, "%Y/%m/%d %H:%M:%S", &tm); > strftime(timestr, sizeof timestr, "%Y/%m/%d %H:%M:%S", localtime(&time1)); > printf("Process %d gets time %s\n", pid, timestr); >} > >int main() { > showtime(); > > fork(); > > if (chroot("/home/matt/test/jail") < 0) { > perror("chroot"); > return 1; > } > > fork(); > > sleep(2); > > showtime(); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4402
:
2829
| 2836