<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/contrib/fuse-lib, branch v4.0.2-1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>fuse-lib: checked_return coverity fix</title>
<updated>2017-11-16T08:07:19+00:00</updated>
<author>
<name>Kartik_Burmee</name>
<email>kburmee@redhat.com</email>
</author>
<published>2017-11-14T11:20:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3bf2ba3fb4910a4e9ba6ea7850f3737c9c285fe8'/>
<id>3bf2ba3fb4910a4e9ba6ea7850f3737c9c285fe8</id>
<content type='text'>
issue: Calling "chdir" without checking return value

function: gf_fuse_unmount_daemon

fix: typecasted return value of function to void.

Change-Id: I5f06fbe886a35c2d4c9f763eeb01771e9451f232
BUG: 789278
Signed-off-by: Kartik_Burmee &lt;kburmee@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
issue: Calling "chdir" without checking return value

function: gf_fuse_unmount_daemon

fix: typecasted return value of function to void.

Change-Id: I5f06fbe886a35c2d4c9f763eeb01771e9451f232
BUG: 789278
Signed-off-by: Kartik_Burmee &lt;kburmee@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>contrib/fuse-lib: Fix compiler warning within switch case</title>
<updated>2017-08-09T12:58:07+00:00</updated>
<author>
<name>Anoop C S</name>
<email>anoopcs@redhat.com</email>
</author>
<published>2017-07-27T08:45:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=071559cb4745669c87198128ab73d7af2017e9bd'/>
<id>071559cb4745669c87198128ab73d7af2017e9bd</id>
<content type='text'>
Following warning is shown when compiled with gcc v7:

mount.c: In function ‘gf_fuse_unmount_daemon’:
mount.c:98:22: warning: statement will never be executed [-Wswitch-unreachable]
		char c = 0;
		     ^
 CCLD fuse.la

We just need to move the relevant declaration statements to that switch
case where it is valid and is being used.

Change-Id: I8e50cc7cfcfc3bc88218cd69abbf516c08ee1648
Updates: #259
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17878
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following warning is shown when compiled with gcc v7:

mount.c: In function ‘gf_fuse_unmount_daemon’:
mount.c:98:22: warning: statement will never be executed [-Wswitch-unreachable]
		char c = 0;
		     ^
 CCLD fuse.la

We just need to move the relevant declaration statements to that switch
case where it is valid and is being used.

Change-Id: I8e50cc7cfcfc3bc88218cd69abbf516c08ee1648
Updates: #259
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17878
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: implement "-oauto_unmount"</title>
<updated>2017-05-23T13:21:25+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2017-05-09T17:26:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=461888bb63b2409f8245c7766aa799ca22f734e6'/>
<id>461888bb63b2409f8245c7766aa799ca22f734e6</id>
<content type='text'>
libfuse has an auto_unmount option which,
if enabled, ensures that the file system
is unmounted at FUSE server termination
by running a separate monitor process
that performs the unmount when that
occurs. (This feature would probably
better be called "robust auto-unmount",
as FUSE servers usually do try to unmount
their file systems upon termination,
it's just this mechanism is not crash
resilient.)

This change implements that option and
behavior for glusterfs.

Note that "auto unmount" (robust or not) is
a leaky abstraction, as the kernel cannot
guarantee that at the path where the FUSE
fs is mounted is actually the toplevel mount
at the time of the umount(2) call, for
multiple reasons, among others, see:

  fuse-devel: "fuse: feasible to distinguish between umount and abort?"
  http://fuse.996288.n3.nabble.com/fuse-feasible-to-distinguish-between-umount-and-abort-tt14358.html
  https://github.com/libfuse/libfuse/issues/122

Updates #153

Change-Id: Ia4432580c9fd2c156d9c73c3a44f4bfd42437599
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17230
Tested-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libfuse has an auto_unmount option which,
if enabled, ensures that the file system
is unmounted at FUSE server termination
by running a separate monitor process
that performs the unmount when that
occurs. (This feature would probably
better be called "robust auto-unmount",
as FUSE servers usually do try to unmount
their file systems upon termination,
it's just this mechanism is not crash
resilient.)

This change implements that option and
behavior for glusterfs.

Note that "auto unmount" (robust or not) is
a leaky abstraction, as the kernel cannot
guarantee that at the path where the FUSE
fs is mounted is actually the toplevel mount
at the time of the umount(2) call, for
multiple reasons, among others, see:

  fuse-devel: "fuse: feasible to distinguish between umount and abort?"
  http://fuse.996288.n3.nabble.com/fuse-feasible-to-distinguish-between-umount-and-abort-tt14358.html
  https://github.com/libfuse/libfuse/issues/122

Updates #153

Change-Id: Ia4432580c9fd2c156d9c73c3a44f4bfd42437599
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17230
Tested-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: extract some functionality to functions</title>
<updated>2017-05-23T13:21:20+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2017-05-09T17:23:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=98db583e9b2e7aa8e095a75a6bb5f42b0d65ae79'/>
<id>98db583e9b2e7aa8e095a75a6bb5f42b0d65ae79</id>
<content type='text'>
- code in run.c to close all file descriptors,
  except for specified ones is extracted to

    int close_fds_except (int *fdv, size_t count);

- tokenizing and editing a string that consists
  of comma-separated tokens (as done eg. in
  mount_param_to_flag() of contrib/fuse/mount.c
  is abstacted into the following API:

    char *token_iter_init (char *str, char sep, token_iter_t *tit);
    gf_boolean_t next_token (char **tokenp, token_iter_t *tit);
    void drop_token (char *token, token_iter_t *tit);

Updates #153

Change-Id: I7cb5bda38f680f08882e2a7ef84f9142ffaa54eb
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17229
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- code in run.c to close all file descriptors,
  except for specified ones is extracted to

    int close_fds_except (int *fdv, size_t count);

- tokenizing and editing a string that consists
  of comma-separated tokens (as done eg. in
  mount_param_to_flag() of contrib/fuse/mount.c
  is abstacted into the following API:

    char *token_iter_init (char *str, char sep, token_iter_t *tit);
    gf_boolean_t next_token (char **tokenp, token_iter_t *tit);
    void drop_token (char *token, token_iter_t *tit);

Updates #153

Change-Id: I7cb5bda38f680f08882e2a7ef84f9142ffaa54eb
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17229
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: clean up mount flag processing</title>
<updated>2017-04-27T17:38:48+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2017-01-03T14:26:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e624e7fe38a784363c57108c73487d83a7bda562'/>
<id>e624e7fe38a784363c57108c73487d83a7bda562</id>
<content type='text'>
In general, when one invokes a mount helper program -- basically
anything that mounts something based on its command line, so thinking of
mount(8), mount.&lt;fs-type&gt; or fusermount, but also of FUSE servers in
general, including glusterfs -- the command line arguments that are to
affect mount(2) are mapped to a bitmask called the mount flags, which is
passed to mount(2), so that the kernel can interpret the flag bits and
adjusts properties of the mount accordingly.

There is a traditional syntax for this mechanism as implemented in
mount(8): one passes "-ocomma,separated,mount,options" and the
individual option name strings are mapped to flag bits in mount(8).

FUSE further explores this idea and typically the FUSE server command
lines allow further option names to be used in the "-ooption,name,list"
which are then separated from the kernel sanctioned option names (to
which we'll refer as "system mount options") and are passed to a
platform specific lower level fuse mount helper interface.

The separation of system mount option names and FUSE specific option
names is also platform specific, so the general mount interface
function, which in case of glusterfs is gf_fuse_mount(), should abstract
this away.

Therefore we change the signature of this function from

        int gf_fuse_mount (const char *mountpoint, char *fsname,
                           unsigned long mountflags, char *mnt_param,
                           pid_t *mtab_pid, int status_fd);

to

        int gf_fuse_mount (const char *mountpoint, char *fsname,
                           char *mnt_param, pid_t *mtab_pid,
                           int status_fd);

and deal with flag extraction in platform specific mount code. Note that
the sole purpose of the mountflags argument was to indicate read-only
mounting. The other system mount option names were expected to reside in
the comma-separated mnt_param string, but they were not properly
processed (see the referred BUG). With the new gf_fuse_mount signature
read-only mounting is to be indicated as a "ro" component in mnt_param.

- For Darwin, which has a dedicated, separate gf_fuse_mount
  implementation, gf_fuse_mount was ignoring mountflags, so only the
  signature had to to be adjusted. However, as bonus, we gain read-only
  support for Darwin, which was missing so far, given that it was
  indicated via the ignored mountflags. Darwin's low level mount helper
  relies on the "ro" component of the option string, which agrees with
  the new calling convention of gf_fuse_mount.

- On Linux, system mount option name handling (apart from the
  distinguished read-only option) used to have the inadvertent side
  effect of adding "nosuid,nodev" as indicated in BUG; since
  Ia89d975d1e27fcfa5ab2036ba546aa8fa0d2d1b0 this side effect is removed,
  but system mount option name handling was left broken (passing system
  mount options other than "ro" fails to mount).

- On other platforms, system mount option name handling is broken
  (expect for the distinguished read-only option).

As of this change, in the general (non-Darwin) implementation of
gf_fuse_mount we take care of proper separation of system mount names
and their conversion to mount flags. For Linux, we adopt the conversion
table from FUSE upstream. For other systems we just provide a best
effort to support those system mount options which are understood across
all Unices (nosuid,nodev,noatime,noexec,ro). (This can be improved later
to provide proper plaform support.)

BUG: 1297182
Change-Id: I5d10b5df46feba7a02bf5bf1018db69e6b52260a
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16313
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Tested-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In general, when one invokes a mount helper program -- basically
anything that mounts something based on its command line, so thinking of
mount(8), mount.&lt;fs-type&gt; or fusermount, but also of FUSE servers in
general, including glusterfs -- the command line arguments that are to
affect mount(2) are mapped to a bitmask called the mount flags, which is
passed to mount(2), so that the kernel can interpret the flag bits and
adjusts properties of the mount accordingly.

There is a traditional syntax for this mechanism as implemented in
mount(8): one passes "-ocomma,separated,mount,options" and the
individual option name strings are mapped to flag bits in mount(8).

FUSE further explores this idea and typically the FUSE server command
lines allow further option names to be used in the "-ooption,name,list"
which are then separated from the kernel sanctioned option names (to
which we'll refer as "system mount options") and are passed to a
platform specific lower level fuse mount helper interface.

The separation of system mount option names and FUSE specific option
names is also platform specific, so the general mount interface
function, which in case of glusterfs is gf_fuse_mount(), should abstract
this away.

Therefore we change the signature of this function from

        int gf_fuse_mount (const char *mountpoint, char *fsname,
                           unsigned long mountflags, char *mnt_param,
                           pid_t *mtab_pid, int status_fd);

to

        int gf_fuse_mount (const char *mountpoint, char *fsname,
                           char *mnt_param, pid_t *mtab_pid,
                           int status_fd);

and deal with flag extraction in platform specific mount code. Note that
the sole purpose of the mountflags argument was to indicate read-only
mounting. The other system mount option names were expected to reside in
the comma-separated mnt_param string, but they were not properly
processed (see the referred BUG). With the new gf_fuse_mount signature
read-only mounting is to be indicated as a "ro" component in mnt_param.

- For Darwin, which has a dedicated, separate gf_fuse_mount
  implementation, gf_fuse_mount was ignoring mountflags, so only the
  signature had to to be adjusted. However, as bonus, we gain read-only
  support for Darwin, which was missing so far, given that it was
  indicated via the ignored mountflags. Darwin's low level mount helper
  relies on the "ro" component of the option string, which agrees with
  the new calling convention of gf_fuse_mount.

- On Linux, system mount option name handling (apart from the
  distinguished read-only option) used to have the inadvertent side
  effect of adding "nosuid,nodev" as indicated in BUG; since
  Ia89d975d1e27fcfa5ab2036ba546aa8fa0d2d1b0 this side effect is removed,
  but system mount option name handling was left broken (passing system
  mount options other than "ro" fails to mount).

- On other platforms, system mount option name handling is broken
  (expect for the distinguished read-only option).

As of this change, in the general (non-Darwin) implementation of
gf_fuse_mount we take care of proper separation of system mount names
and their conversion to mount flags. For Linux, we adopt the conversion
table from FUSE upstream. For other systems we just provide a best
effort to support those system mount options which are understood across
all Unices (nosuid,nodev,noatime,noexec,ro). (This can be improved later
to provide proper plaform support.)

BUG: 1297182
Change-Id: I5d10b5df46feba7a02bf5bf1018db69e6b52260a
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16313
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
Tested-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: limit fusermount fallback to EPERM cases</title>
<updated>2017-01-18T07:19:58+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2016-11-02T06:22:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=90cb8c49787d41a46e5b86d73bdc515f54aff4c0'/>
<id>90cb8c49787d41a46e5b86d73bdc515f54aff4c0</id>
<content type='text'>
There are two mount mechanims for fuse:
1) Call mount(2) syscall directly -- implemented by fuse_mount_sys
2) Call out to fusermount(1) helper utilty to do the mount --
   implemented by fuse_mount_fusermount
   [Note: both libfuse and glusterfs ships a variant of this helper
   utility; named, respectively, fusermount and fusermount-glusterfs.
   The two has diverged, and are not compatible at the moment.]

The intended use of 1) is privileged mounting, ie. when root
is invoking the glusterfs client. (It cannot work for non-privileged
users as the kernel enforces privilege for mount(2), more precisely,
caller context needs CAP_SYS_ADMIN, see capabilities(7).)

The intended use of 2) is unprivileged mountig, ie. when
the glusterfs client is invoked by an unprivileged user.
The helper utility is a setuid binary, so it can perform
mount(2) on behalf of the user.

The main mount routine, gf_fuse_mount, calls fuse_mount_sys first,
and if that fails, tries also with fuse_mount_fusermount. This
is what we call "fusermount fallback". However, in the light of
the above remarks about intended use, this logic should apply if
the fuse_mount_fusermount fails because of a privilege shortage,
ie. with error "Operation not permitted" (errno EPERM).

So far the fallback was unconditional (masking bugs of
fuser_mount_sys, as it happens in referred BUG). Now we
add the "errno == EPERM" condition.

BUG: 1297182
Change-Id: Ia89d975d1e27fcfa5ab2036ba546aa8fa0d2d1b0
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: http://review.gluster.org/15766
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two mount mechanims for fuse:
1) Call mount(2) syscall directly -- implemented by fuse_mount_sys
2) Call out to fusermount(1) helper utilty to do the mount --
   implemented by fuse_mount_fusermount
   [Note: both libfuse and glusterfs ships a variant of this helper
   utility; named, respectively, fusermount and fusermount-glusterfs.
   The two has diverged, and are not compatible at the moment.]

The intended use of 1) is privileged mounting, ie. when root
is invoking the glusterfs client. (It cannot work for non-privileged
users as the kernel enforces privilege for mount(2), more precisely,
caller context needs CAP_SYS_ADMIN, see capabilities(7).)

The intended use of 2) is unprivileged mountig, ie. when
the glusterfs client is invoked by an unprivileged user.
The helper utility is a setuid binary, so it can perform
mount(2) on behalf of the user.

The main mount routine, gf_fuse_mount, calls fuse_mount_sys first,
and if that fails, tries also with fuse_mount_fusermount. This
is what we call "fusermount fallback". However, in the light of
the above remarks about intended use, this logic should apply if
the fuse_mount_fusermount fails because of a privilege shortage,
ie. with error "Operation not permitted" (errno EPERM).

So far the fallback was unconditional (masking bugs of
fuser_mount_sys, as it happens in referred BUG). Now we
add the "errno == EPERM" condition.

BUG: 1297182
Change-Id: Ia89d975d1e27fcfa5ab2036ba546aa8fa0d2d1b0
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
Reviewed-on: http://review.gluster.org/15766
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: fix return value check for setuid</title>
<updated>2015-05-16T07:19:09+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2015-05-14T06:40:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b5ceb1a9de9af563b0f91e2a3138fa5a95cad9f6'/>
<id>b5ceb1a9de9af563b0f91e2a3138fa5a95cad9f6</id>
<content type='text'>
setuid() sets the effective user ID of the calling process. If the
effective UID of the caller is root, the real UID and saved set-user-ID
are also set. On success, zero is returned.  On error, -1 is returned,
and errno is set appropriately.

there are cases where setuid() can fail even when the caller is UID 0;
it is a grave security error to omit checking for a failure return from
setuid(). if an environment limits the number of processes a user can
have, setuid() might fail if the target uid already is at the limit.

Fix is to check return value of setuid.

Change-Id: I7aa5ab5e347603c69dc93188417cc4f4c81ffc75
BUG: 1221490
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10780
Reviewed-by: Prasanna Kumar Kalever
Tested-by: Prasanna Kumar Kalever
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
setuid() sets the effective user ID of the calling process. If the
effective UID of the caller is root, the real UID and saved set-user-ID
are also set. On success, zero is returned.  On error, -1 is returned,
and errno is set appropriately.

there are cases where setuid() can fail even when the caller is UID 0;
it is a grave security error to omit checking for a failure return from
setuid(). if an environment limits the number of processes a user can
have, setuid() might fail if the target uid already is at the limit.

Fix is to check return value of setuid.

Change-Id: I7aa5ab5e347603c69dc93188417cc4f4c81ffc75
BUG: 1221490
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10780
Reviewed-by: Prasanna Kumar Kalever
Tested-by: Prasanna Kumar Kalever
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not use umount -l on non Linux systems</title>
<updated>2015-01-02T09:42:12+00:00</updated>
<author>
<name>Emmanuel Dreyfus</name>
<email>manu@netbsd.org</email>
</author>
<published>2014-12-24T13:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4c3a6bc4573013df1912996e77ded48fddc01516'/>
<id>4c3a6bc4573013df1912996e77ded48fddc01516</id>
<content type='text'>
Lazy unmount are only supported on Linux. Force umount instead, since
this code path is used in emergency exit anyway.

On NetBSD, just have the filesystem calling exit, the kernel will unmount.

BUG: 1129939
Change-Id: If623ebf60b7a747ea7e78034b6d71ec2241dea4a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/9334
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lazy unmount are only supported on Linux. Force umount instead, since
this code path is used in emergency exit anyway.

On NetBSD, just have the filesystem calling exit, the kernel will unmount.

BUG: 1129939
Change-Id: If623ebf60b7a747ea7e78034b6d71ec2241dea4a
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/9334
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: make GLUSTERD_WORKDIR rely on localstatedir</title>
<updated>2014-08-07T08:17:29+00:00</updated>
<author>
<name>Harshavardhana</name>
<email>harsha@harshavardhana.net</email>
</author>
<published>2014-06-30T01:56:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=2ec6ea43f2ddc6c00a030be6d04c00f0924277b7'/>
<id>2ec6ea43f2ddc6c00a030be6d04c00f0924277b7</id>
<content type='text'>
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>porting: Port for FreeBSD rebased from Mike Ma's efforts</title>
<updated>2014-07-03T00:20:34+00:00</updated>
<author>
<name>Harshavardhana</name>
<email>harsha@harshavardhana.net</email>
</author>
<published>2014-06-21T09:00:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=1b74cf992986287a510fe3b28a8ee7554e8b0992'/>
<id>1b74cf992986287a510fe3b28a8ee7554e8b0992</id>
<content type='text'>
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma &lt;mikemandarine@gmail.com&gt;
Signed-off-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma &lt;mikemandarine@gmail.com&gt;
Signed-off-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
