From 2e4139498d33005f4d9c56db360024b11ae5a42e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 20 Nov 2018 13:54:12 +0000 Subject: community/chntpw: remove openssl dep, add patches from fedora OpenSSL is not used at all so remove the dependency and misleading build option. The patches from Fedora seems to be needed so we add those. --- .../chntpw-110511-detect-failure-to-write-key.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 community/chntpw/chntpw-110511-detect-failure-to-write-key.patch (limited to 'community/chntpw/chntpw-110511-detect-failure-to-write-key.patch') diff --git a/community/chntpw/chntpw-110511-detect-failure-to-write-key.patch b/community/chntpw/chntpw-110511-detect-failure-to-write-key.patch new file mode 100644 index 0000000000..818639d83a --- /dev/null +++ b/community/chntpw/chntpw-110511-detect-failure-to-write-key.patch @@ -0,0 +1,19 @@ +diff -ur chntpw-110511.orig/ntreg.c chntpw-110511/ntreg.c +--- chntpw-110511.orig/ntreg.c 2011-05-11 12:33:56.000000000 -0700 ++++ chntpw-110511/ntreg.c 2011-11-01 13:45:02.550421729 -0700 +@@ -3389,7 +3389,14 @@ + + fprintf(file,"\r\n"); /* Must end file with an empty line, windows does that */ + +- fclose(file); ++ if (ferror (file)) { ++ printf("failed to write file '%s'\n", filename); ++ fclose (file); ++ return; ++ } ++ if (fclose(file)) ++ printf("failed to write file '%s': %s\n", filename, ++ strerror(errno)); + } + + /* ================================================================ */ -- cgit v1.2.3