This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru _1/apt-0.9.7.9+deb7u4/apt-pkg/acquire-item.cc _2/apt-0.9.7.9+deb7u5/apt-pkg/acquire-item.cc | |
--- _1/apt-0.9.7.9+deb7u4/apt-pkg/acquire-item.cc 2014-09-17 07:30:35.000000000 -0700 | |
+++ _2/apt-0.9.7.9+deb7u5/apt-pkg/acquire-item.cc 2014-09-22 23:56:57.000000000 -0700 | |
@@ -970,6 +970,12 @@ | |
else | |
Local = true; | |
+ // do not reverify cdrom sources as apt-cdrom may rewrite the Packages | |
+ // file when its doing the indexcopy | |
+ if (RealURI.substr(0,6) == "cdrom:" && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Demonstrates that LibreSSL's PRNG is not fork-safe on Linux. | |
* See https://www.agwa.name/blog/post/libressls_prng_is_unsafe_on_linux | |
* This code is in the public domain. | |
*/ | |
#include <openssl/rand.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Migrate an old-style git-crypt revamp branch key to a new-style git-crypt revamp branch key. | |
// Reads old key from stdin and writes new key to stdout. | |
// Compile with: c++ -o migrate-revamp-key migrate-revamp-key.cpp | |
#include <iostream> | |
#include <cstdlib> | |
#include <cstring> | |
static void grab (char* p, std::streamsize len) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is C++11-only because it assumes that std::strings can | |
// be accessed and mutated as a contiguous sequence of chars. | |
std::string sys::readlink (const char* pathname) | |
{ | |
std::string buffer(64, '\0'); | |
ssize_t len; | |
while ((len = ::readlink(pathname, &buffer[0], buffer.size())) == static_cast<ssize_t>(buffer.size())) { | |
// buffer may have been truncated - grow and try again | |
buffer.resize(buffer.size() * 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# openssl-rekey -- generate a new key and CSR for each of the certificate | |
# files specified on the command line. Submit the new | |
# CSRs to your certificate authority for a free reissue. | |
# Useful for rekeying after a compromise such as Heartbleed. | |
# | |
# See https://www.agwa.name/blog/post/responding_to_heartbleed_a_script_to_regenerate_ssl_certs_en_masse | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Enable and disable HDMI output on the Raspberry Pi | |
is_off () | |
{ | |
tvservice -s | grep "TV is off" >/dev/null | |
} | |
case $1 in |
NewerOlder