Skip to content

Instantly share code, notes, and snippets.

View fumiyas's full-sized avatar
💭
> 突然の死 <

SATOH Fumiyasu fumiyas

💭
> 突然の死 <
View GitHub Profile
@fumiyas
fumiyas / u-nya.zshrc
Created May 2, 2012 12:33
端末ウィンドウタイトルと右プロンプトに這いよる混沌 (zsh, bash)
#!/bin/zsh
#!/bin/bash
##
## 端末ウィンドウタイトルと右プロンプトに這いよる混沌 (zsh)
## 端末ウィンドウタイトルに這いよる混沌 (bash)
## Written by SATOH Fumiyasu
## https://github.com/fumiyas
## https://twitter.com/#!/satoh_fumiyasu
##
## Inspired by:
@fumiyas
fumiyas / openldap-2.4.31-slappasswd-read-config.patch
Created May 8, 2012 04:25
OpenLDAP: [PATCH] slappasswd: Read slapd.conf to load dynamic password hash modules (obsolete)
From a211ba9874f5706d2646c84d3af72f324d5d0333 Mon Sep 17 00:00:00 2001
From: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date: Thu, 31 May 2012 01:56:08 +0900
Subject: [PATCH] slappasswd: Read slapd.conf to load dynamic password hash
modules
---
doc/man/man8/slappasswd.8 | 21 +++++++++++++++++++
servers/slapd/slappasswd.c | 48 +++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 68 insertions(+), 1 deletion(-)
@fumiyas
fumiyas / libiconv-1.10-ja-errno.patch
Created May 11, 2012 10:45
[PATCH] libiconv-1.10-ja detects a false ENOMEM error
iconv_open() detects a false ENOMEM error on aliases_lookup_with_env()
if errno is already set to ENOMEM and getenv("CHARSET_ALIAS")
returns NULL.
-- SATOH Fumiyasu @ OSS Technology, Inc., 2009-03-26
diff -rup libiconv-1.10-ja/lib/iconv.c libiconv-1.10-ja-errno/lib/iconv.c
--- libiconv-1.10-ja/lib/iconv.c 2009-03-25 21:06:55.000000000 +0900
+++ libiconv-1.10-ja-errno/lib/iconv.c 2009-03-25 21:06:16.000000000 +0900
@@ -246,6 +246,8 @@ aliases_lookup_with_env (register const
function! GetFilename()
let fname = expand("%")
return (fname == "") ? "[No Name]" : fname
endfunction
let &statusline='%{GetFilename()}'
@fumiyas
fumiyas / openldap-2.4.31-slappasswd-moduleload.patch
Created May 31, 2012 04:26
OpenLDAP: [PATCH] slappasswd: Add support loading a dynamically loadable
From 9cb4cb040e77372ea892bba81136d2741a6707bb Mon Sep 17 00:00:00 2001
From: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date: Thu, 31 May 2012 13:13:41 +0900
Subject: [PATCH] slappasswd: Add support loading a dynamically loadable
module
Add "-o module-path=<pathspec>" and "-o module-load=<filename>"
options to load a dynamically loadable password hash module
(e.g., slapd-sha2).
---
@fumiyas
fumiyas / gist:2908368
Created June 11, 2012 03:32
RPM SPEC: Exclude %{_docdir} from find-requires target
## Put the following snippet into %prep, %build or %install in your *.spec
cat <<'EOF' >%{name}-req
#!/bin/sh
while read -r f; do
[[ -z "${f##%{buildroot}%{_docdir}/*}" ]] && continue
echo "$f"
done \
|%{__find_requires} "$@"
EOF
@fumiyas
fumiyas / Makefile
Created June 12, 2012 05:54
OpenLDAP: Revised version of contrib/slapd-modules/passwd/sha2/Makefile
# $OpenLDAP$
LDAP_SRC = ../../../..
LDAP_BUILD = ../../../..
LDAP_INC = -I$(LDAP_SRC)/include -I$(LDAP_BUILD)/include
LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc
OPT = -g -O2 -Wall
INCS = $(LDAP_INC)
@fumiyas
fumiyas / openldap-2.4.31-contrib-slapd-modules-add-makefile.patch
Created June 14, 2012 17:14
OpenLDAP: [PATCH] contrib/slapd-modules: Add missing Makefile
From 8deac1624769aea64495916d911690eb9c59a836 Mon Sep 17 00:00:00 2001
From: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date: Thu, 14 Jun 2012 12:33:37 +0900
Subject: [PATCH] contrib/slapd-modules: Add missing Makefile
---
contrib/slapd-modules/acl/Makefile | 50 +++++++++++++++++++++++++++
contrib/slapd-modules/acl/README | 5 ---
contrib/slapd-modules/acl/README.gssacl | 3 +-
contrib/slapd-modules/acl/README.posixgroup | 4 +--
@fumiyas
fumiyas / openldap-2.4.31-contrib-slapd-modules-unify-makefile.patch
Created June 14, 2012 17:18
OpenLDAP: [PATCH] contrib/slapd-modules: Unify the structure and usage of Makefile
From 8c0919c4d68007a70037924c0c0646f0b05750fe Mon Sep 17 00:00:00 2001
From: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date: Fri, 15 Jun 2012 02:15:48 +0900
Subject: [PATCH] contrib/slapd-modules: Unify the structure and usage of
Makefile
---
contrib/slapd-modules/addpartial/Makefile | 49 ++++++++++++++---
contrib/slapd-modules/addpartial/README | 4 +-
contrib/slapd-modules/allowed/Makefile | 54 +++++++++++--------
@fumiyas
fumiyas / test-libsmbclient-without-HOME-env.c
Created July 13, 2012 02:47
libsmbclient: SMBC_module_init() call does not init global parameters if $HOME is not set
/* https://bugzilla.samba.org/show_bug.cgi?id=9038 */
#include <stdio.h>
#include <stdlib.h>
#include <libsmbclient.h>
char *url;
void smbc_auth_fn(SMBCCTX *smbcctx,
const char *server, const char *share,