Hello community,

here is the log from the commit of package libqb for openSUSE:Factory checked 
in at 2015-03-18 13:01:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqb (Old)
 and      /work/SRC/openSUSE:Factory/.libqb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqb"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libqb/libqb.changes      2014-10-31 
18:27:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libqb.new/libqb.changes 2015-03-18 
13:01:59.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Mar  9 16:10:28 UTC 2015 - y...@suse.com
+
+- ipc_setup: yield to scheduler during new connection auth processing
+- kqueue: The udata member of the kevent struct is a void *
+- Upstream version cs: 83552692aa5425e50049b130eb2e17ea7b31217d
+
+-------------------------------------------------------------------

Old:
----
  libqb-0.17.1.git20140826.3f7de65.tar.bz2

New:
----
  libqb-0.17.1.git20150305.8355269.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqb.spec ++++++
--- /var/tmp/diff_new_pack.RJoBek/_old  2015-03-18 13:02:00.000000000 +0100
+++ /var/tmp/diff_new_pack.RJoBek/_new  2015-03-18 13:02:00.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libqb
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           libqb
-Version:        0.17.1.git20140826.3f7de65
+Version:        0.17.1.git20150305.8355269
 Release:        0
 Summary:        An IPC library for high performance servers
 License:        LGPL-2.1+

++++++ _service ++++++
--- /var/tmp/diff_new_pack.RJoBek/_old  2015-03-18 13:02:00.000000000 +0100
+++ /var/tmp/diff_new_pack.RJoBek/_new  2015-03-18 13:02:00.000000000 +0100
@@ -8,10 +8,10 @@
     To update to a new release, change "revision" to the desired
     git commit hash and bump "version" if necessary
 
-    <param name="version">0.17.0</param>
+    <param name="version">0.17.1</param>
 -->
-    <param name="versionformat">0.17.0+git%cd.%h</param>
-    <param name="revision">3f7de657855bb9fb4e58777851735bf663fa7f3f</param>
+    <param name="versionformat">0.17.1+git%cd.%h</param>
+    <param name="revision">83552692aa5425e50049b130eb2e17ea7b31217d</param>
   </service>
 
   <service name="recompress" mode="disabled">

++++++ libqb-0.17.1.git20140826.3f7de65.tar.bz2 -> 
libqb-0.17.1.git20150305.8355269.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/HEAD 
new/libqb-0.17.1.git20150305.8355269/.git/HEAD
--- old/libqb-0.17.1.git20140826.3f7de65/.git/HEAD      1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/HEAD      2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1 @@
+ref: refs/heads/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/ORIG_HEAD 
new/libqb-0.17.1.git20150305.8355269/.git/ORIG_HEAD
--- old/libqb-0.17.1.git20140826.3f7de65/.git/ORIG_HEAD 1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/ORIG_HEAD 2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1 @@
+83552692aa5425e50049b130eb2e17ea7b31217d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/config 
new/libqb-0.17.1.git20150305.8355269/.git/config
--- old/libqb-0.17.1.git20140826.3f7de65/.git/config    1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/config    2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1,11 @@
+[core]
+       repositoryformatversion = 0
+       filemode = true
+       bare = false
+       logallrefupdates = true
+[remote "origin"]
+       url = git://github.com/ClusterLabs/libqb.git
+       fetch = +refs/heads/*:refs/remotes/origin/*
+[branch "master"]
+       remote = origin
+       merge = refs/heads/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/description 
new/libqb-0.17.1.git20150305.8355269/.git/description
--- old/libqb-0.17.1.git20140826.3f7de65/.git/description       1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/description       2015-03-09 
17:02:18.000000000 +0100
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/applypatch-msg.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/applypatch-msg.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/applypatch-msg.sample       
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/applypatch-msg.sample       
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message taken by
+# applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.  The hook is
+# allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "applypatch-msg".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/commit-msg" &&
+       exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/commit-msg.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/commit-msg.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/commit-msg.sample   
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/commit-msg.sample   
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by "git commit" with one argument, the name of the file
+# that has the commit message.  The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit.  The hook is allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "commit-msg".
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
+# hook is more suited to it.
+#
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+        sort | uniq -c | sed -e '/^[   ]*1[    ]/d')" || {
+       echo >&2 Duplicate Signed-off-by lines.
+       exit 1
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/post-update.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/post-update.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/post-update.sample  
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/post-update.sample  
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# An example hook script to prepare a packed repository for use over
+# dumb transports.
+#
+# To enable this hook, rename this file to "post-update".
+
+exec git update-server-info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-applypatch.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-applypatch.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-applypatch.sample       
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-applypatch.sample       
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+       exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
+:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-commit.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-commit.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-commit.sample   
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-commit.sample   
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by "git commit" with no arguments.  The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-commit".
+
+if git rev-parse --verify HEAD >/dev/null 2>&1
+then
+       against=HEAD
+else
+       # Initial commit: diff against an empty tree object
+       against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+# If you want to allow non-ASCII filenames set this variable to true.
+allownonascii=$(git config --bool hooks.allownonascii)
+
+# Redirect output to stderr.
+exec 1>&2
+
+# Cross platform projects tend to avoid non-ASCII filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if [ "$allownonascii" != "true" ] &&
+       # Note that the use of brackets around a tr range is ok here, (it's
+       # even required, for portability to Solaris 10's /usr/bin/tr), since
+       # the square bracket bytes happen to fall in the designated range.
+       test $(git diff --cached --name-only --diff-filter=A -z $against |
+         LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
+then
+       cat <<\EOF
+Error: Attempt to add a non-ASCII file name.
+
+This can cause problems if you want to work with people on other platforms.
+
+To be portable it is advisable to rename the file.
+
+If you know what you are doing you can disable this check using:
+
+  git config hooks.allownonascii true
+EOF
+       exit 1
+fi
+
+# If there are whitespace errors, print the offending file names and fail.
+exec git diff-index --check --cached $against --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-push.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-push.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-push.sample     
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-push.sample     
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# An example hook script to verify what is about to be pushed.  Called by "git
+# push" after it has checked the remote status, but before anything has been
+# pushed.  If this script exits with a non-zero status nothing will be pushed.
+#
+# This hook is called with the following parameters:
+#
+# $1 -- Name of the remote to which the push is being done
+# $2 -- URL to which the push is being done
+#
+# If pushing without using a named remote those arguments will be equal.
+#
+# Information about the commits which are being pushed is supplied as lines to
+# the standard input in the form:
+#
+#   <local ref> <local sha1> <remote ref> <remote sha1>
+#
+# This sample shows how to prevent push of commits where the log message starts
+# with "WIP" (work in progress).
+
+remote="$1"
+url="$2"
+
+z40=0000000000000000000000000000000000000000
+
+IFS=' '
+while read local_ref local_sha remote_ref remote_sha
+do
+       if [ "$local_sha" = $z40 ]
+       then
+               # Handle delete
+               :
+       else
+               if [ "$remote_sha" = $z40 ]
+               then
+                       # New branch, examine all commits
+                       range="$local_sha"
+               else
+                       # Update to existing branch, examine new commits
+                       range="$remote_sha..$local_sha"
+               fi
+
+               # Check for WIP commit
+               commit=`git rev-list -n 1 --grep '^WIP' "$range"`
+               if [ -n "$commit" ]
+               then
+                       echo "Found WIP commit in $local_ref, not pushing"
+                       exit 1
+               fi
+       fi
+done
+
+exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-rebase.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-rebase.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/pre-rebase.sample   
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/pre-rebase.sample   
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,169 @@
+#!/bin/sh
+#
+# Copyright (c) 2006, 2008 Junio C Hamano
+#
+# The "pre-rebase" hook is run just before "git rebase" starts doing
+# its job, and can prevent the command from running by exiting with
+# non-zero status.
+#
+# The hook is called with the following parameters:
+#
+# $1 -- the upstream the series was forked from.
+# $2 -- the branch being rebased (or empty when rebasing the current branch).
+#
+# This sample shows how to prevent topic branches that are already
+# merged to 'next' branch from getting rebased, because allowing it
+# would result in rebasing already published history.
+
+publish=next
+basebranch="$1"
+if test "$#" = 2
+then
+       topic="refs/heads/$2"
+else
+       topic=`git symbolic-ref HEAD` ||
+       exit 0 ;# we do not interrupt rebasing detached HEAD
+fi
+
+case "$topic" in
+refs/heads/??/*)
+       ;;
+*)
+       exit 0 ;# we do not interrupt others.
+       ;;
+esac
+
+# Now we are dealing with a topic branch being rebased
+# on top of master.  Is it OK to rebase it?
+
+# Does the topic really exist?
+git show-ref -q "$topic" || {
+       echo >&2 "No such branch $topic"
+       exit 1
+}
+
+# Is topic fully merged to master?
+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
+if test -z "$not_in_master"
+then
+       echo >&2 "$topic is fully merged to master; better remove it."
+       exit 1 ;# we could allow it, but there is no point.
+fi
+
+# Is topic ever merged to next?  If so you should not be rebasing it.
+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
+only_next_2=`git rev-list ^master           ${publish} | sort`
+if test "$only_next_1" = "$only_next_2"
+then
+       not_in_topic=`git rev-list "^$topic" master`
+       if test -z "$not_in_topic"
+       then
+               echo >&2 "$topic is already up-to-date with master"
+               exit 1 ;# we could allow it, but there is no point.
+       else
+               exit 0
+       fi
+else
+       not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
+       /usr/bin/perl -e '
+               my $topic = $ARGV[0];
+               my $msg = "* $topic has commits already merged to public 
branch:\n";
+               my (%not_in_next) = map {
+                       /^([0-9a-f]+) /;
+                       ($1 => 1);
+               } split(/\n/, $ARGV[1]);
+               for my $elem (map {
+                               /^([0-9a-f]+) (.*)$/;
+                               [$1 => $2];
+                       } split(/\n/, $ARGV[2])) {
+                       if (!exists $not_in_next{$elem->[0]}) {
+                               if ($msg) {
+                                       print STDERR $msg;
+                                       undef $msg;
+                               }
+                               print STDERR " $elem->[1]\n";
+                       }
+               }
+       ' "$topic" "$not_in_next" "$not_in_master"
+       exit 1
+fi
+
+exit 0
+
+################################################################
+
+This sample hook safeguards topic branches that have been
+published from being rewound.
+
+The workflow assumed here is:
+
+ * Once a topic branch forks from "master", "master" is never
+   merged into it again (either directly or indirectly).
+
+ * Once a topic branch is fully cooked and merged into "master",
+   it is deleted.  If you need to build on top of it to correct
+   earlier mistakes, a new topic branch is created by forking at
+   the tip of the "master".  This is not strictly necessary, but
+   it makes it easier to keep your history simple.
+
+ * Whenever you need to test or publish your changes to topic
+   branches, merge them into "next" branch.
+
+The script, being an example, hardcodes the publish branch name
+to be "next", but it is trivial to make it configurable via
+$GIT_DIR/config mechanism.
+
+With this workflow, you would want to know:
+
+(1) ... if a topic branch has ever been merged to "next".  Young
+    topic branches can have stupid mistakes you would rather
+    clean up before publishing, and things that have not been
+    merged into other branches can be easily rebased without
+    affecting other people.  But once it is published, you would
+    not want to rewind it.
+
+(2) ... if a topic branch has been fully merged to "master".
+    Then you can delete it.  More importantly, you should not
+    build on top of it -- other people may already want to
+    change things related to the topic as patches against your
+    "master", so if you need further changes, it is better to
+    fork the topic (perhaps with the same name) afresh from the
+    tip of "master".
+
+Let's look at this example:
+
+                  o---o---o---o---o---o---o---o---o---o "next"
+                 /       /           /           /
+                /   a---a---b A     /           /
+               /   /               /           /
+              /   /   c---c---c---c B         /
+             /   /   /             \         /
+            /   /   /   b---b C     \       /
+           /   /   /   /             \     /
+    ---o---o---o---o---o---o---o---o---o---o---o "master"
+
+
+A, B and C are topic branches.
+
+ * A has one fix since it was merged up to "next".
+
+ * B has finished.  It has been fully merged up to "master" and "next",
+   and is ready to be deleted.
+
+ * C has not merged to "next" at all.
+
+We would want to allow C to be rebased, refuse A, and encourage
+B to be deleted.
+
+To compute (1):
+
+       git rev-list ^master ^topic next
+       git rev-list ^master        next
+
+       if these match, topic has not merged in next at all.
+
+To compute (2):
+
+       git rev-list master..topic
+
+       if this is empty, it is fully merged to "master".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/prepare-commit-msg.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/prepare-commit-msg.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/prepare-commit-msg.sample   
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/prepare-commit-msg.sample   
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# An example hook script to prepare the commit log message.
+# Called by "git commit" with the name of the file that has the
+# commit message, followed by the description of the commit
+# message's source.  The hook's purpose is to edit the commit
+# message file.  If the hook fails with a non-zero status,
+# the commit is aborted.
+#
+# To enable this hook, rename this file to "prepare-commit-msg".
+
+# This hook includes three examples.  The first comments out the
+# "Conflicts:" part of a merge commit.
+#
+# The second includes the output of "git diff --name-status -r"
+# into the message, just before the "git status" output.  It is
+# commented because it doesn't cope with --amend or with squashed
+# commits.
+#
+# The third example adds a Signed-off-by line to the message, that can
+# still be edited.  This is rarely a good idea.
+
+case "$2,$3" in
+  merge,)
+    /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; 
print' "$1" ;;
+
+# ,|template,)
+#   /usr/bin/perl -i.bak -pe '
+#      print "\n" . `git diff --cached --name-status -r`
+#       if /^#/ && $first++ == 0' "$1" ;;
+
+  *) ;;
+esac
+
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/update.sample 
new/libqb-0.17.1.git20150305.8355269/.git/hooks/update.sample
--- old/libqb-0.17.1.git20140826.3f7de65/.git/hooks/update.sample       
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/hooks/update.sample       
2015-03-09 17:02:18.000000000 +0100
@@ -0,0 +1,128 @@
+#!/bin/sh
+#
+# An example hook script to blocks unannotated tags from entering.
+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, rename this file to "update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+#   This boolean sets whether unannotated tags will be allowed into the
+#   repository.  By default they won't be.
+# hooks.allowdeletetag
+#   This boolean sets whether deleting tags will be allowed in the
+#   repository.  By default they won't be.
+# hooks.allowmodifytag
+#   This boolean sets whether a tag may be modified after creation. By default
+#   it won't be.
+# hooks.allowdeletebranch
+#   This boolean sets whether deleting branches will be allowed in the
+#   repository.  By default they won't be.
+# hooks.denycreatebranch
+#   This boolean sets whether remotely creating branches will be denied
+#   in the repository.  By default this is allowed.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+       echo "Don't run this script from the command line." >&2
+       echo " (if you want, you could supply GIT_DIR then run" >&2
+       echo "  $0 <ref> <oldrev> <newrev>)" >&2
+       exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+       echo "usage: $0 <ref> <oldrev> <newrev>" >&2
+       exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --bool hooks.denycreatebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
+allowmodifytag=$(git config --bool hooks.allowmodifytag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+case "$projectdesc" in
+"Unnamed repository"* | "")
+       echo "*** Project description file hasn't been set" >&2
+       exit 1
+       ;;
+esac
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+zero="0000000000000000000000000000000000000000"
+if [ "$newrev" = "$zero" ]; then
+       newrev_type=delete
+else
+       newrev_type=$(git cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+       refs/tags/*,commit)
+               # un-annotated tag
+               short_refname=${refname##refs/tags/}
+               if [ "$allowunannotated" != "true" ]; then
+                       echo "*** The un-annotated tag, $short_refname, is not 
allowed in this repository" >&2
+                       echo "*** Use 'git tag [ -a | -s ]' for tags you want 
to propagate." >&2
+                       exit 1
+               fi
+               ;;
+       refs/tags/*,delete)
+               # delete tag
+               if [ "$allowdeletetag" != "true" ]; then
+                       echo "*** Deleting a tag is not allowed in this 
repository" >&2
+                       exit 1
+               fi
+               ;;
+       refs/tags/*,tag)
+               # annotated tag
+               if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > 
/dev/null 2>&1
+               then
+                       echo "*** Tag '$refname' already exists." >&2
+                       echo "*** Modifying a tag is not allowed in this 
repository." >&2
+                       exit 1
+               fi
+               ;;
+       refs/heads/*,commit)
+               # branch
+               if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
+                       echo "*** Creating a branch is not allowed in this 
repository" >&2
+                       exit 1
+               fi
+               ;;
+       refs/heads/*,delete)
+               # delete branch
+               if [ "$allowdeletebranch" != "true" ]; then
+                       echo "*** Deleting a branch is not allowed in this 
repository" >&2
+                       exit 1
+               fi
+               ;;
+       refs/remotes/*,commit)
+               # tracking branch
+               ;;
+       refs/remotes/*,delete)
+               # delete tracking branch
+               if [ "$allowdeletebranch" != "true" ]; then
+                       echo "*** Deleting a tracking branch is not allowed in 
this repository" >&2
+                       exit 1
+               fi
+               ;;
+       *)
+               # Anything else (is there anything else?)
+               echo "*** Update hook: unknown type of update to ref $refname 
of type $newrev_type" >&2
+               exit 1
+               ;;
+esac
+
+# --- Finished
+exit 0
Files old/libqb-0.17.1.git20140826.3f7de65/.git/index and 
new/libqb-0.17.1.git20150305.8355269/.git/index differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/info/exclude 
new/libqb-0.17.1.git20150305.8355269/.git/info/exclude
--- old/libqb-0.17.1.git20140826.3f7de65/.git/info/exclude      1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/info/exclude      2015-03-09 
17:02:18.000000000 +0100
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/logs/HEAD 
new/libqb-0.17.1.git20150305.8355269/.git/logs/HEAD
--- old/libqb-0.17.1.git20140826.3f7de65/.git/logs/HEAD 1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/logs/HEAD 2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 
83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 
1425916942 +0100   clone: from git://github.com/ClusterLabs/libqb.git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/logs/refs/heads/master 
new/libqb-0.17.1.git20150305.8355269/.git/logs/refs/heads/master
--- old/libqb-0.17.1.git20140826.3f7de65/.git/logs/refs/heads/master    
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/logs/refs/heads/master    
2015-03-09 17:02:22.000000000 +0100
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 
83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 
1425916942 +0100   clone: from git://github.com/ClusterLabs/libqb.git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/logs/refs/remotes/origin/HEAD 
new/libqb-0.17.1.git20150305.8355269/.git/logs/refs/remotes/origin/HEAD
--- old/libqb-0.17.1.git20140826.3f7de65/.git/logs/refs/remotes/origin/HEAD     
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/logs/refs/remotes/origin/HEAD     
2015-03-09 17:02:22.000000000 +0100
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 
83552692aa5425e50049b130eb2e17ea7b31217d nobody <nobody@obs.service.11213> 
1425916942 +0100   clone: from git://github.com/ClusterLabs/libqb.git
Files 
old/libqb-0.17.1.git20140826.3f7de65/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.idx
 and 
new/libqb-0.17.1.git20150305.8355269/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.idx
 differ
Files 
old/libqb-0.17.1.git20140826.3f7de65/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.pack
 and 
new/libqb-0.17.1.git20150305.8355269/.git/objects/pack/pack-ba9131ced3cf30c8555ce190455682b574c9b5e1.pack
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/.git/packed-refs 
new/libqb-0.17.1.git20150305.8355269/.git/packed-refs
--- old/libqb-0.17.1.git20140826.3f7de65/.git/packed-refs       1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/packed-refs       2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1,68 @@
+# pack-refs with: peeled fully-peeled 
+65933318882f6c975578dba43e1fc27eb43157d5 refs/remotes/origin/eventfd
+27bea015fcf1dc773016adf07feac681d068531d refs/remotes/origin/gh-pages
+3d4be7fa8018d520869fced8472a28da1f54cca5 refs/remotes/origin/maint-0.5
+83552692aa5425e50049b130eb2e17ea7b31217d refs/remotes/origin/master
+b40fa6a87478e6a6572bb68bf2ad9d8fa334f1ce refs/remotes/origin/mingw
+3372064f98f9a453fd1a4b2a1aa98670f3fa0f60 refs/remotes/origin/no-sock-block
+f878118d9388534ca96d74763fc9d0c74e313a67 refs/remotes/origin/speed
+9191fe783aac63c86eceda14f887fdf953abb2f9 refs/tags/libqb-0.0.0
+^69d77500dfc96f139f380d6b90b793bcb04b0619
+6a50cd6dda2d067555c509877f0a5bc0e92b3f49 refs/tags/libqb-0.1.0
+^80544249528b05e3999215e892728f270a56defe
+fff6f1bbc0a6e266b5b73d81cc4e51e207c58183 refs/tags/v0.1.0
+^80544249528b05e3999215e892728f270a56defe
+834b4d6e9f9e7d9a9dc537d20ca73ec59ae90f68 refs/tags/v0.10.0
+^362b0dccd458a08fa8f5394db5eb5ebeac36a9ee
+6e153667273bb10f82d304581b60ba3ec39c001d refs/tags/v0.10.1
+^1c8a9d6461859860f2c8c2d10250a2ce1ebc56e8
+49310898e3dd183e430d5679351b91580222f232 refs/tags/v0.11.0
+^418471e6c1b916cca2f02c2234447cc99ac78c9b
+973c32144cc8cf32ff929df35c5c38bf9237d604 refs/tags/v0.11.1
+^50f07abcfe7010360f697d1f26b56fec863d892f
+9145d188cb1fa81d9c04fb2847603359a50e4d4e refs/tags/v0.12.0
+^0b8aeb66c82525edf5801369751abadcd2811239
+4ef15502ae194340349646e73f54022b853e82c9 refs/tags/v0.13.0
+^955d43eae698a5eded78234420491171825c7e98
+83d3799f041a64924ea939581991cd0e9e4a06bd refs/tags/v0.14.0
+^1c2b77f005a8011471af11839b7e1b67d147e10d
+de60db63ad2801aaaf826284d92be916fef4a0d1 refs/tags/v0.14.1
+^5470bf5625353c3eaeac2ee0eb75704d0e02a691
+7ed428162b031e903d9e7fcda61ebf9b069cda96 refs/tags/v0.14.2
+^d54e8b1e8c3235918d57e1f1657efc3bb1b4bd4a
+a6a7809726d43cdf442e23f7347e4bf2dfc5eaf1 refs/tags/v0.14.3
+^92ada8c4d1b0d8ba2380971f64cfaaf35ad1fd23
+9ae3d5f2ede74ec11caba673eb890e20169c96a8 refs/tags/v0.14.4
+^848242a7860c5a7e19240c2ded053fa9908af9e0
+27a6bcdb754ea847c1eec40e97e41f54ace42924 refs/tags/v0.15.0
+^986b92d3918a6fccec58e173d9f4dfe53d878635
+46e5cea42f8195fb514b39862b6782f89153eee4 refs/tags/v0.16.0
+^75f7ed373758b3cb9087e89e4fae17379dd7b483
+c7cbc7cdf0e34adf865e5cdec8daf46a6e5786bc refs/tags/v0.17.0
+^78978d07ac2f19a801ebde61379ac55359cc17f3
+78978d07ac2f19a801ebde61379ac55359cc17f3 refs/tags/v0.17.0.rc1
+312f3e562ce93d6c676088b66934a894c79837df refs/tags/v0.17.1
+^3f7de657855bb9fb4e58777851735bf663fa7f3f
+d2b8c8cc781b175ce5cc4a6de49f4b46f1be54a5 refs/tags/v0.17.1-rc1
+c1c58f48f175c7eddd6ae2dc44545c3cc85bd126 refs/tags/v0.2.0
+^21fc479b92f111a5cb208b8b9d432afafedb9a32
+ecc2405e71b8035bd3c8ba4e25da454312da5bf3 refs/tags/v0.3.0
+^01838c18c631ad2be8f3dfd39799a92863b9be48
+cc47ad114f1157ed8ec0df264c6ee180828883bc refs/tags/v0.4.0
+^f647c79693c9136e93283620bfbeaa815eac298d
+70a792cc653bf064e4840cae99d9c2eace8a06f8 refs/tags/v0.4.1
+^ea704d58210e76104fe17d017e8e455ea00904cd
+70bc9a333008eccbbef03238b2269bddff4257c8 refs/tags/v0.5.0
+^a69482ade6e212cba7250fa7dc30ed251ab9041c
+497d500fbf254fe112a8bfe32a6e84d377c10f3c refs/tags/v0.5.1
+^e910830b269cc4fa6b0b92c1041bf454c708cfd2
+d186bcc37af7df92a90e58d2ac135b1178b404b4 refs/tags/v0.6.0
+^750d6e2fa579df6dbc6ac0fa7ddd550d5ac9d008
+682f2c392cc12759c451dd52b6911b73efa3c78d refs/tags/v0.7.0
+^ce18956cc2148329a3bffc6789c8084c026ca5b9
+e7e1ced04d40c201c8a1d248e74c27f82b29d072 refs/tags/v0.8.0
+^e15a48254ab4a006e659e3f881b417a4d983cb28
+3e5a38958c6e50b035d4042615f1ccedf65d0fff refs/tags/v0.8.1
+^e0d55fe8f789598faba2d7a173d07c2e8e9a2005
+a329208c50b985950cc393ed70a165eb5ba4f643 refs/tags/v0.9.0
+^297970af0369e958685dc796fd39896728cc0bab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/refs/heads/master 
new/libqb-0.17.1.git20150305.8355269/.git/refs/heads/master
--- old/libqb-0.17.1.git20140826.3f7de65/.git/refs/heads/master 1970-01-01 
01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/refs/heads/master 2015-03-09 
17:02:22.000000000 +0100
@@ -0,0 +1 @@
+83552692aa5425e50049b130eb2e17ea7b31217d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/.git/refs/remotes/origin/HEAD 
new/libqb-0.17.1.git20150305.8355269/.git/refs/remotes/origin/HEAD
--- old/libqb-0.17.1.git20140826.3f7de65/.git/refs/remotes/origin/HEAD  
1970-01-01 01:00:00.000000000 +0100
+++ new/libqb-0.17.1.git20150305.8355269/.git/refs/remotes/origin/HEAD  
2015-03-09 17:02:22.000000000 +0100
@@ -0,0 +1 @@
+ref: refs/remotes/origin/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/configure.ac 
new/libqb-0.17.1.git20150305.8355269/configure.ac
--- old/libqb-0.17.1.git20140826.3f7de65/configure.ac   2014-10-21 
10:06:11.000000000 +0200
+++ new/libqb-0.17.1.git20150305.8355269/configure.ac   2015-03-09 
17:02:22.000000000 +0100
@@ -78,7 +78,7 @@
 # args. Global CFLAGS are ignored during this test.
 cc_supports_flag() {
        BACKUP="$CPPFLAGS"
-       CPPFLAGS="$CPPFLAGS $@"
+       CPPFLAGS="$CPPFLAGS $@ -Werror"
        AC_MSG_CHECKING([whether $CC supports "$@"])
        AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
                          [RC=0; AC_MSG_RESULT([yes])],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/lib/ipc_setup.c 
new/libqb-0.17.1.git20150305.8355269/lib/ipc_setup.c
--- old/libqb-0.17.1.git20140826.3f7de65/lib/ipc_setup.c        2014-10-21 
10:06:11.000000000 +0200
+++ new/libqb-0.17.1.git20150305.8355269/lib/ipc_setup.c        2015-03-09 
17:02:22.000000000 +0100
@@ -48,6 +48,24 @@
        pid_t pid;
 };
 
+struct ipc_auth_data {
+       int32_t sock;
+       struct qb_ipcs_service *s;
+       struct qb_ipc_connection_request msg;
+       struct msghdr msg_recv;
+       struct iovec iov_recv;
+       struct ipc_auth_ugp ugp;
+
+       size_t processed;
+       size_t len;
+
+#ifdef SO_PASSCRED
+       char *cmsg_cred;
+#endif
+
+};
+
+
 static int32_t qb_ipcs_us_connection_acceptor(int fd, int revent, void *data);
 
 ssize_t
@@ -83,20 +101,21 @@
 }
 
 static ssize_t
-qb_ipc_us_recv_msghdr(int32_t s, struct msghdr *hdr, char *msg, size_t len)
+qb_ipc_us_recv_msghdr(struct ipc_auth_data *data)
 {
+       char *msg = (char *) &data->msg;
        int32_t result;
-       int32_t processed = 0;
 
        qb_sigpipe_ctl(QB_SIGPIPE_IGNORE);
 
 retry_recv:
-       hdr->msg_iov->iov_base = &msg[processed];
-       hdr->msg_iov->iov_len = len - processed;
+       data->msg_recv.msg_iov->iov_base = &msg[data->processed];
+       data->msg_recv.msg_iov->iov_len = data->len - data->processed;
 
-       result = recvmsg(s, hdr, MSG_NOSIGNAL | MSG_WAITALL);
+       result = recvmsg(data->sock, &data->msg_recv, MSG_NOSIGNAL | 
MSG_WAITALL);
        if (result == -1 && errno == EAGAIN) {
-               goto retry_recv;
+               qb_sigpipe_ctl(QB_SIGPIPE_DEFAULT);
+               return -EAGAIN;
        }
        if (result == -1) {
                qb_sigpipe_ctl(QB_SIGPIPE_DEFAULT);
@@ -105,18 +124,18 @@
        if (result == 0) {
                qb_sigpipe_ctl(QB_SIGPIPE_DEFAULT);
                qb_util_log(LOG_DEBUG,
-                           "recv(fd %d) got 0 bytes assuming ENOTCONN", s);
+                           "recv(fd %d) got 0 bytes assuming ENOTCONN", 
data->sock);
                return -ENOTCONN;
        }
 
-       processed += result;
-       if (processed != len) {
+       data->processed += result;
+       if (data->processed != data->len) {
                goto retry_recv;
        }
        qb_sigpipe_ctl(QB_SIGPIPE_DEFAULT);
-       assert(processed == len);
+       assert(data->processed == data->len);
 
-       return processed;
+       return data->processed;
 }
 
 int32_t
@@ -434,6 +453,7 @@
        (void)s->poll_fns.dispatch_del(s->server_sock);
        shutdown(s->server_sock, SHUT_RDWR);
        close(s->server_sock);
+       s->server_sock = -1;
        return 0;
 }
 
@@ -541,45 +561,56 @@
        return res;
 }
 
-static int32_t
-qb_ipcs_uc_recv_and_auth(int32_t sock, void *msg, size_t len,
-                        struct ipc_auth_ugp *ugp)
+static void
+destroy_ipc_auth_data(struct ipc_auth_data *data)
 {
-       int32_t res = 0;
-       struct msghdr msg_recv;
-       struct iovec iov_recv;
+       if (data->s) {
+               qb_ipcs_unref(data->s);
+       }
 
 #ifdef SO_PASSCRED
-       char cmsg_cred[CMSG_SPACE(sizeof(struct ucred))];
-       int off = 0;
-       int on = 1;
-#endif
-       msg_recv.msg_iov = &iov_recv;
-       msg_recv.msg_iovlen = 1;
-       msg_recv.msg_name = 0;
-       msg_recv.msg_namelen = 0;
-#ifdef SO_PASSCRED
-       msg_recv.msg_control = (void *)cmsg_cred;
-       msg_recv.msg_controllen = sizeof(cmsg_cred);
+       free(data->cmsg_cred);
 #endif
-#ifdef QB_SOLARIS
-       msg_recv.msg_accrights = 0;
-       msg_recv.msg_accrightslen = 0;
-#else
-       msg_recv.msg_flags = 0;
-#endif /* QB_SOLARIS */
+       free(data);
+}
+
+static int32_t
+process_auth(int32_t fd, int32_t revents, void *d)
+{
+       struct ipc_auth_data *data = (struct ipc_auth_data *) d;
 
-       iov_recv.iov_base = msg;
-       iov_recv.iov_len = len;
+       int32_t res = 0;
 #ifdef SO_PASSCRED
-       setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+       int off = 0;
 #endif
 
-       res = qb_ipc_us_recv_msghdr(sock, &msg_recv, msg, len);
-       if (res < 0) {
+       if (data->s->server_sock == -1) {
+               qb_util_log(LOG_DEBUG, "Closing fd (%d) for server shutdown", 
fd);
+               res = -ESHUTDOWN;
                goto cleanup_and_return;
        }
-       if (res != len) {
+
+       if (revents & POLLNVAL) {
+               qb_util_log(LOG_DEBUG, "NVAL conn fd (%d)", fd);
+               res = -EINVAL;
+               goto cleanup_and_return;
+       }
+       if (revents & POLLHUP) {
+               qb_util_log(LOG_DEBUG, "HUP conn fd (%d)", fd);
+               res = -ESHUTDOWN;
+               goto cleanup_and_return;
+       }
+       if ((revents & POLLIN) == 0) {
+               return 0;
+       }
+
+       res = qb_ipc_us_recv_msghdr(data);
+       if (res == -EAGAIN) {
+               /* yield to mainloop, Let mainloop call us again */
+               return 0;
+       }
+
+       if (res != data->len) {
                res = -EIO;
                goto cleanup_and_return;
        }
@@ -595,11 +626,11 @@
        {
                ucred_t *uc = NULL;
 
-               if (getpeerucred(sock, &uc) == 0) {
+               if (getpeerucred(data->sock, &uc) == 0) {
                        res = 0;
-                       ugp->uid = ucred_geteuid(uc);
-                       ugp->gid = ucred_getegid(uc);
-                       ugp->pid = ucred_getpid(uc);
+                       ugp.uid = ucred_geteuid(uc);
+                       ugp.gid = ucred_getegid(uc);
+                       ugp.pid = ucred_getpid(uc);
                        ucred_free(uc);
                } else {
                        res = -errno;
@@ -614,7 +645,7 @@
                 * TODO get the peer's pid.
                 * c->pid = ?;
                 */
-               if (getpeereid(sock, &ugp->uid, &ugp->gid) == 0) {
+               if (getpeereid(data->sock, &ugp.uid, &ugp.gid) == 0) {
                        res = 0;
                } else {
                        res = -errno;
@@ -630,33 +661,105 @@
                struct cmsghdr *cmsg;
 
                res = -EINVAL;
-               for (cmsg = CMSG_FIRSTHDR(&msg_recv); cmsg != NULL;
-                    cmsg = CMSG_NXTHDR(&msg_recv, cmsg)) {
+               for (cmsg = CMSG_FIRSTHDR(&data->msg_recv); cmsg != NULL;
+                    cmsg = CMSG_NXTHDR(&data->msg_recv, cmsg)) {
                        if (cmsg->cmsg_type != SCM_CREDENTIALS)
                                continue;
 
                        memcpy(&cred, CMSG_DATA(cmsg), sizeof(struct ucred));
                        res = 0;
-                       ugp->pid = cred.pid;
-                       ugp->uid = cred.uid;
-                       ugp->gid = cred.gid;
+                       data->ugp.pid = cred.pid;
+                       data->ugp.uid = cred.uid;
+                       data->ugp.gid = cred.gid;
                        break;
                }
        }
 #else /* no credentials */
-       ugp->pid = 0;
-       ugp->uid = 0;
-       ugp->gid = 0;
+       data->ugp.pid = 0;
+       data->ugp.uid = 0;
+       data->ugp.gid = 0;
        res = -ENOTSUP;
 #endif /* no credentials */
 
 cleanup_and_return:
+#ifdef SO_PASSCRED
+       setsockopt(data->sock, SOL_SOCKET, SO_PASSCRED, &off, sizeof(off));
+#endif
 
+       (void)data->s->poll_fns.dispatch_del(data->sock);
+
+       if (res < 0) {
+               close(data->sock);
+       } else if (data->msg.hdr.id == QB_IPC_MSG_AUTHENTICATE) {
+               (void)handle_new_connection(data->s, res, data->sock, 
&data->msg, data->len, &data->ugp);
+       } else {
+               close(data->sock);
+       }
+       destroy_ipc_auth_data(data);
+
+       return 1;
+}
+
+static void
+qb_ipcs_uc_recv_and_auth(int32_t sock, struct qb_ipcs_service *s)
+{
+       int res = 0;
+       struct ipc_auth_data *data = NULL;
 #ifdef SO_PASSCRED
-       setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &off, sizeof(off));
+       int on = 1;
 #endif
 
-       return res;
+       data = calloc(1, sizeof(struct ipc_auth_data));
+       if (data == NULL) {
+               close(sock);
+               /* -ENOMEM */
+               return;
+       }
+
+       data->s = s;
+       qb_ipcs_ref(data->s);
+
+       data->msg_recv.msg_iov = &data->iov_recv;
+       data->msg_recv.msg_iovlen = 1;
+       data->msg_recv.msg_name = 0;
+       data->msg_recv.msg_namelen = 0;
+
+#ifdef SO_PASSCRED
+       data->cmsg_cred = calloc(1,CMSG_SPACE(sizeof(struct ucred)));
+       if (data->cmsg_cred == NULL) {
+               close(sock);
+               destroy_ipc_auth_data(data);
+               /* -ENOMEM */
+               return;
+       }
+       data->msg_recv.msg_control = (void *)data->cmsg_cred;
+       data->msg_recv.msg_controllen = CMSG_SPACE(sizeof(struct ucred));
+#endif
+#ifdef QB_SOLARIS
+       data->msg_recv.msg_accrights = 0;
+       data->msg_recv.msg_accrightslen = 0;
+#else
+       data->msg_recv.msg_flags = 0;
+#endif /* QB_SOLARIS */
+
+       data->len = sizeof(struct qb_ipc_connection_request);
+       data->iov_recv.iov_base = &data->msg;
+       data->iov_recv.iov_len = data->len;
+       data->sock = sock;
+
+#ifdef SO_PASSCRED
+       setsockopt(sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+#endif
+
+       res = s->poll_fns.dispatch_add(QB_LOOP_MED,
+                                       data->sock,
+                                       POLLIN | POLLPRI | POLLNVAL,
+                                       data, process_auth);
+       if (res < 0) {
+               qb_util_log(LOG_DEBUG, "Failed to process AUTH for fd (%d)", 
data->sock);
+               close(sock);
+               destroy_ipc_auth_data(data);
+       }
 }
 
 static int32_t
@@ -666,8 +769,6 @@
        int32_t new_fd;
        struct qb_ipcs_service *s = (struct qb_ipcs_service *)data;
        int32_t res;
-       struct qb_ipc_connection_request setup_msg;
-       struct ipc_auth_ugp ugp;
        socklen_t addrlen = sizeof(struct sockaddr_un);
 
        if (revent & (POLLNVAL | POLLHUP | POLLERR)) {
@@ -707,22 +808,6 @@
                return 0;
        }
 
-       res = qb_ipcs_uc_recv_and_auth(new_fd, &setup_msg, sizeof(setup_msg),
-                                      &ugp);
-       if (res < 0) {
-               close(new_fd);
-               /* This is an error, but -1 would indicate disconnect
-                * from the poll loop
-                */
-               return 0;
-       }
-
-       if (setup_msg.hdr.id == QB_IPC_MSG_AUTHENTICATE) {
-               (void)handle_new_connection(s, res, new_fd, &setup_msg,
-                                           sizeof(setup_msg), &ugp);
-       } else {
-               close(new_fd);
-       }
-
+       qb_ipcs_uc_recv_and_auth(new_fd, s);
        return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libqb-0.17.1.git20140826.3f7de65/lib/ipc_socket.c 
new/libqb-0.17.1.git20150305.8355269/lib/ipc_socket.c
--- old/libqb-0.17.1.git20140826.3f7de65/lib/ipc_socket.c       2014-10-21 
10:06:11.000000000 +0200
+++ new/libqb-0.17.1.git20150305.8355269/lib/ipc_socket.c       2015-03-09 
17:02:22.000000000 +0100
@@ -287,8 +287,36 @@
 static void
 qb_ipcc_us_disconnect(struct qb_ipcc_connection *c)
 {
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+  struct sockaddr_un un_addr;
+  socklen_t un_addr_len = sizeof(struct sockaddr_un);
+  char *base_name;
+  char sock_name[PATH_MAX];
+  size_t length;
+#endif
+
        munmap(c->request.u.us.shared_data, SHM_CONTROL_SIZE);
        unlink(c->request.u.us.shared_file_name);
+
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+    if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, 
&un_addr_len) == 0) {
+      length = strlen(un_addr.sun_path);
+      base_name = strndup(un_addr.sun_path,length-8);
+      qb_util_log(LOG_DEBUG, "unlinking socket bound files with base_name=%s 
length=%d",base_name,length);
+      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
+      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+      unlink(sock_name);
+      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
+      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+      unlink(sock_name);
+      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
+      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+      unlink(sock_name);
+      snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
+      qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+      unlink(sock_name);
+    }
+#endif
        qb_ipcc_us_sock_close(c->event.u.us.sock);
        qb_ipcc_us_sock_close(c->request.u.us.sock);
        qb_ipcc_us_sock_close(c->setup.u.us.sock);
@@ -629,12 +657,38 @@
 static void
 qb_ipcs_us_disconnect(struct qb_ipcs_connection *c)
 {
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+       struct sockaddr_un un_addr;
+       socklen_t un_addr_len = sizeof(struct sockaddr_un);
+       char *base_name;
+       char sock_name[PATH_MAX];
+       size_t length;
+#endif
        qb_enter();
 
        if (c->state == QB_IPCS_CONNECTION_ESTABLISHED ||
            c->state == QB_IPCS_CONNECTION_ACTIVE) {
                _sock_rm_from_mainloop(c);
 
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+               if (getsockname(c->response.u.us.sock, (struct sockaddr 
*)&un_addr, &un_addr_len) == 0) {
+                       length = strlen(un_addr.sun_path);
+                       base_name = strndup(un_addr.sun_path,length-8);
+                       qb_util_log(LOG_DEBUG, "unlinking socket bound files 
with base_name=%s length=%d",base_name,length);
+                       
snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"request");
+                       qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+                       unlink(sock_name);
+                       snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event");
+                       qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+                       unlink(sock_name);
+                       
snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"event-tx");
+                       qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+                       unlink(sock_name);
+                       
snprintf(sock_name,PATH_MAX,"%s-%s",base_name,"response");
+                       qb_util_log(LOG_DEBUG, "unlink sock_name=%s",sock_name);
+                       unlink(sock_name);
+               }
+#endif
                qb_ipcc_us_sock_close(c->setup.u.us.sock);
                qb_ipcc_us_sock_close(c->request.u.us.sock);
                qb_ipcc_us_sock_close(c->event.u.us.sock);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libqb-0.17.1.git20140826.3f7de65/lib/loop_poll_kqueue.c 
new/libqb-0.17.1.git20150305.8355269/lib/loop_poll_kqueue.c
--- old/libqb-0.17.1.git20140826.3f7de65/lib/loop_poll_kqueue.c 2014-10-21 
10:06:11.000000000 +0200
+++ new/libqb-0.17.1.git20150305.8355269/lib/loop_poll_kqueue.c 2015-03-09 
17:02:22.000000000 +0100
@@ -55,7 +55,7 @@
        struct kevent ke;
        short filters = _poll_to_filter_(events);
 
-       EV_SET(&ke, fd, filters, EV_ADD | EV_ENABLE, 0, 0, (intptr_t)pe);
+       EV_SET(&ke, fd, filters, EV_ADD | EV_ENABLE, 0, 0, pe);
 
        res = kevent(s->epollfd, &ke, 1, NULL, 0, NULL);
        if (res == -1) {
@@ -74,8 +74,8 @@
        short new_filters = _poll_to_filter_(events);
        short old_filters = _poll_to_filter_(pe->ufd.events);
 
-       EV_SET(&ke[0], fd, old_filters, EV_DELETE, 0, 0, (intptr_t)pe);
-       EV_SET(&ke[1], fd, new_filters, EV_ADD | EV_ENABLE, 0, 0, (intptr_t)pe);
+       EV_SET(&ke[0], fd, old_filters, EV_DELETE, 0, 0, pe);
+       EV_SET(&ke[1], fd, new_filters, EV_ADD | EV_ENABLE, 0, 0, pe);
 
        res = kevent(s->epollfd, ke, 2, NULL, 0, NULL);
        if (res == -1) {
@@ -92,7 +92,7 @@
        struct kevent ke;
        short filters = _poll_to_filter_(events);
 
-       EV_SET(&ke, fd, filters, EV_DELETE, 0, 0, (intptr_t)pe);
+       EV_SET(&ke, fd, filters, EV_DELETE, 0, 0, pe);
 
        res = kevent(s->epollfd, &ke, 1, NULL, 0, NULL);
        if (res == -1 && errno == ENOENT) {
@@ -170,7 +170,7 @@
                         * empty/deleted
                         */
                        EV_SET(&events[i], events[i].ident, events[i].filter,
-                              EV_DELETE, 0, 0, (intptr_t)pe);
+                              EV_DELETE, 0, 0, pe);
                        (void)kevent(s->epollfd, &events[i], 1, NULL, 0, NULL);
                        continue;
                }

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to