Linux Kernel: System call hooking example

I finally found the answer myself. http://www.linuxforums.org/forum/linux-kernel/133982-cannot-modify-sys_call_table.html The kernel was changed at some point so that the system call table is read only. cypherpunk: Even if it is late but the Solution may interest others too: In the entry.S file you will find: Code: .section .rodata,”a” #include “syscall_table_32.S” sys_call_table -> ReadOnly You have to compile … Read more

Applying a git post-commit hook to all current and future repositories

As of Git 1.7.1, you can set init.templatedir in your gitconfig to tell Git where to look for templates. Set it like this: git config –global init.templatedir ‘~/.git_template’ Afterward, new repositories you create or clone will use this directory for templates. Place the hooks you want in ~/.git_template/hooks. Existing repositories can be reinitialized with the … Read more

Adding console.log to every function automatically

Here’s a way to augment all functions in the global namespace with the function of your choice: function augment(withFn) { var name, fn; for (name in window) { fn = window[name]; if (typeof fn === ‘function’) { window[name] = (function(name, fn) { var args = arguments; return function() { withFn.apply(this, args); return fn.apply(this, arguments); } … Read more

How to configure Git post commit hook

As mentioned in “Polling must die: triggering Jenkins builds from a git hook“, you can notify Jenkins of a new commit: With the latest Git plugin 1.1.14 (that I just release now), you can now do this more >easily by simply executing the following command: curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository> This will scan all … Read more

Putting Git hooks into a repository

I generally agree with Scy, with a couple of additional suggestions, enough that it’s worth a separate answer. First, you should write a script which creates the appropriate symlinks, especially if these hooks are about enforcing policy or creating useful notifications. People will be much more likely to use the hooks if they can just … Read more