Comment 1 for bug 1908638

Revision history for this message
Jochen Sprickerhof (v-launchpad-jochen-sprickerhof-de) wrote :

Hi Evan,

thanks for opening the bug, it is indeed a result of the 0014-Don-t-compare-source-when-checking-if-it-s-already-m.patch.
As far as I understand polydirs are implemented as mount overlays and so /data2 in your example is a mount point already.
You can test this with this example using the same functions as libpam-mount:

// sudo apt install gcc libmount-dev; cc -o lsmount lsmount.c -lmount; ./lsmount

#include <libmount/libmount.h>

int main()
{
 struct libmnt_context *ctx;
 struct libmnt_table *table;
 struct libmnt_iter *iter;
 struct libmnt_fs *fs;

 ctx = mnt_new_context();
 if (ctx == NULL)
  return -1;
 if (mnt_context_get_mtab(ctx, &table) != 0)
  goto out;
 iter = mnt_new_iter(MNT_ITER_BACKWARD);
 if (iter == NULL)
  goto out;

 while (mnt_table_next_fs(table, iter, &fs) == 0)
     printf("source:\t%s target: %s\n", mnt_fs_get_source(fs), mnt_fs_get_target(fs));
 out:
 mnt_free_context(ctx);
 return 0;
}

It should list /data2 as a target if run as the user with the polydir.
As far as I understand, mounting something on top of the polydir would hide the polydir.

Can you give some more background of your setup?