-
Notifications
You must be signed in to change notification settings - Fork 916
Comparing changes
Open a pull request
base repository: golang/glog
base: v1.0.0
head repository: golang/glog
compare: v1.2.4
- 16 commits
- 19 files changed
- 4 contributors
Commits on Mar 3, 2023
-
glog: update glog to the latest internal version (#59)
This change upstreams a number of changes since the last package update. In particular this adds: - New exported APIs (see godoc for further details): - glog.VDepth - glog.InfoDepthf - glog.WarningDepthf - glog.ErrorDepthf - glog.FatalDepthf - glog.ExitDepthf - glog.Names - glog.NewStandardLogger - glog.Verbose.InfoDepth - glog.Verbose.InfoDepthf - glog.ErrNoLog - The -log_backtrace_at flag accepts now a comma-separated list of file:line locations. - The -vmodule flag accepts a new syntax to match the full path to a module instead of just the module name. See the updated package documentation. - A new internal/logsink package to support other outputs than files. Note: This package is internal, because we cannot guarantee at this point that the API remains stable. More details at go/log-vs-glog (google-internal).
Configuration menu - View commit details
-
Copy full SHA for 115d1f9 - Browse repository at this point
Copy the full SHA 115d1f9View commit details
Commits on Mar 17, 2023
-
This was raised in #53. cl/514318873 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for 2cef961 - Browse repository at this point
Copy the full SHA 2cef961View commit details -
glog: make zero value of vModuleFlag usable
The flag package ensures that the zero value of a flag.Value is usable. This commit fixes this. This was raised in https://groups.google.com/g/golang-nuts/c/Atlr8uAjn6U/m/iId17Td5BQAJ. cl/517349579 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for 9c9801e - Browse repository at this point
Copy the full SHA 9c9801eView commit details -
glog: don't use SIGABRT on platforms that don't support signals
cl/517387773 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for c0f9e3d - Browse repository at this point
Copy the full SHA c0f9e3dView commit details
Commits on Mar 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6ce8ac9 - Browse repository at this point
Copy the full SHA 6ce8ac9View commit details -
glog: use os.Stderr directly for writing to stderr (#62)
This was raised in https://groups.google.com/g/golang-nuts/c/o85vycfiGVY/m/MblpnfF6BQAJ. Before the 1.1.0 release it was possible to set os.Stderr to a different *os.File (like an os.Pipe) to capture output that is written to stderr. Restore that behavior.
Configuration menu - View commit details
-
Copy full SHA for 03ad3c2 - Browse repository at this point
Copy the full SHA 03ad3c2View commit details
Commits on Aug 9, 2023
-
glog: populate symlinks -log_link directory (#64)
This was reported in https://groups.google.com/g/golang-nuts/c/Fh9o3CPjIIw/m/TyiUDY2uAAAJ.
Configuration menu - View commit details
-
Copy full SHA for 6b9d7f7 - Browse repository at this point
Copy the full SHA 6b9d7f7View commit details
Commits on Nov 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bcf3184 - Browse repository at this point
Copy the full SHA bcf3184View commit details -
glog: add context variants to most log functions
We export this new API to make the internal and external versions identical. The context is currently plumbed through to the internal/logsink package, but effectively discarded there. cl/560684897 (google-internal) cl/579771826 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for b256bbe - Browse repository at this point
Copy the full SHA b256bbeView commit details
Commits on Apr 4, 2024
-
glog: don't hold mutex when sync'ing (#68)
Some environments are slow when syncing and holding the lock might cause contention. cl/621846576 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for 861d094 - Browse repository at this point
Copy the full SHA 861d094View commit details
Commits on Jul 9, 2024
-
glog: avoid calling user.Current() on windows (#69)
Use the current process token to look up the user's name on Windows. This is more reliable than using the USER or USERNAME environment variables, which are not always set, or might be overridden by the user accidentally or maliciously. It follows the implementation of the user.Current() implementation in the standard library. cl/650142356 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for 9730314 - Browse repository at this point
Copy the full SHA 9730314View commit details
Commits on Nov 4, 2024
-
glog: check that stderr is valid before using it by default (#72)
Windows Services are [spawned without `stdout` and `stderr`](https://learn.microsoft.com/en-us/windows/console/getstdhandle#return-value:~:text=If%20an%20application%20does%20not%20have%20associated%20standard%20handles%2C%20such%20as%20a%20service%20running%20on%20an%20interactive%20desktop%2C%20and%20has%20not%20redirected%20them%2C%20the%20return%20value%20is%20NULL.), so any attempt to use them equates to referencing an invalid file `Handle`. `stderrSink` returns the error, which makes `logsink` trigger the termination of the process. The result is that any call to `log.Error` (or `log.Fatal`) from a Windows Service will always crash the program. This approach checks that `os.Stderr`'s embedded file descriptor (`Handle`, for Windows) is non-NULL once during `init` to determine its validity and if it fails, then never registers `stderrSink` as a logsink. Disabling based upon whether `os.Stderr` is NULL was chosen because it's precise, doesn't actually influence the result of any output and doesn't require any syscalls, but still detects the case in which `stderr` is unavailable on Windows. A rejected approach here would've been to swallow the errors from `stderrSink.Emit`, thus sparing us program termination at the hands of `logsink`. I rejected this approach because it felt like it could result in some subtle behavioral changes. For example, invoking `log.Error` after `os.Stderr.Close()` would no longer exit the program and that felt like a non-trivial change (although I can think of no reason why one would desire this behavior). cl/680817112 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for 459cf3b - Browse repository at this point
Copy the full SHA 459cf3bView commit details
Commits on Nov 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 04dbec0 - Browse repository at this point
Copy the full SHA 04dbec0View commit details
Commits on Jan 13, 2025
-
glog: Don't try to create/rotate a given syncBuffer twice in the same…
… second If you do, then you truncate the existing file. So logging too much too quickly would lose log data. cl/709080575 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for dd58629 - Browse repository at this point
Copy the full SHA dd58629View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7139da2 - Browse repository at this point
Copy the full SHA 7139da2View commit details -
glog: have createInDir fail if the file already exists
This prevents an attack like the one described [here](https://owasp.org/www-community/vulnerabilities/Insecure_Temporary_File#:~:text=On%20Unix%20based,with%20elevated%20permissions.). An unprivileged attacker could use symlinks to trick a privileged logging process to follow a symlink from the log dir and write logs over an arbitrary file. The components of the log names are program, host, username, tag, date, time and PID. These are all predictable. It's not at all unusual for the logdir to be writable by unprivileged users, and one of the fallback directories (/tmp) traditionally has broad write privs with the sticky bit set on Unix systems. As a concrete example, let's say I've got a glog-enabled binary running as a root cronjob. I can gauge when that cron job will run and then use a bash script to spray the log dir with glog-looking symlinks to `/etc/shadow` with predicted times and PIDs. When the cronjob runs, the `os.Create` call will follow the symlink, truncate `/etc/shadow` and then fill it with logs. This change defeats that by setting `O_EXCL`, which will cause the open call to fail if the file already exists. Fixes CVE-2024-45339 cl/712795111 (google-internal)
Configuration menu - View commit details
-
Copy full SHA for a0e3c40 - Browse repository at this point
Copy the full SHA a0e3c40View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.0.0...v1.2.4