****************************************************************************/
int main(int argc,char *argv[])
{
+ TALLOC_CTX *frame = talloc_stackframe();
char *p;
DEBUGLEVEL = 1;
strupper_m(my_netbios_name);
init_mount();
+ TALLOC_FREE(frame);
return 0;
}
umount filesystems they don't own */
int fid = open(mount_point, O_RDONLY|O_NOFOLLOW, 0);
__kernel_uid32_t mount_uid;
-
+
if (fid == -1) {
fprintf(stderr, "Could not open %s: %s\n",
mount_point, strerror(errno));
return -1;
}
-
+
if (ioctl(fid, SMB_IOC_GETMOUNTUID32, &mount_uid) != 0) {
__kernel_uid_t mount_uid16;
if (ioctl(fid, SMB_IOC_GETMOUNTUID, &mount_uid16) != 0) {
if (path == NULL)
return NULL;
-
+
if (realpath (path, canonical))
return canonical;
}
-int
+int
main(int argc, char *argv[])
{
int fd;
struct mntent *mnt;
FILE* mtab;
FILE* new_mtab;
+ TALLOC_CTX *frame = talloc_stackframe();
if (argc != 2) {
usage();
return 1;
}
close(fd);
-
+
if ((mtab = setmntent(MOUNTED, "r")) == NULL) {
fprintf(stderr, "Can't open " MOUNTED ": %s\n",
strerror(errno));
return 1;
}
+ TALLOC_FREE(frame);
return 0;
-}
+}