niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » SGI/IRIX » admin
fsync() doesn't work with Secure NFS?
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Peter Eriksson,F F203,278
*nix forums addict


Joined: 23 Feb 2005
Posts: 65

PostPosted: Wed Feb 22, 2006 7:56 pm    Post subject: Re: fsync() doesn't work with Secure NFS? Reply with quote

Peter Eriksson <peter@ifm.liu.se> writes:

Quote:
Sample run:

rm *
/tmp/t
fd = 3, res = 4, rc = 0, errno = 0, cc = 0
ls -l
total 1
-rw-r--r-- 1 peter nuucp 4 Nov 15 14:06 dummy.txt
ls
/tmp/t fsync
fd = 3, res = 4, rc = -1, errno = 13, cc = -1
ls -l
total 0
-rw-r--r-- 1 peter nuucp 0 Nov 15 14:06 dummy.txt

There's also supposed to be an "rm *" before the "ls" command
(I was a little bit quick editing&posting that piece).

- Peter

--
--
Peter Eriksson <peter@ifm.liu.se> Phone: +46 13 28 2786
Computer Systems Manager/BOFH Cell/GSM: +46 705 18 2786
Physics Department, Linköping University Room: Building F, F203
Back to top
Peter Eriksson,F F203,278
*nix forums addict


Joined: 23 Feb 2005
Posts: 65

PostPosted: Wed Feb 22, 2006 7:56 pm    Post subject: fsync() doesn't work with Secure NFS? Reply with quote

The following small program fails when run inside a Secure NFS-mounted
directory (using Kerberos for authentication) in an interresting way:

#include <errno.h>
int main(int argc, char **argv)
{
int rc = 0, fd, res, cc;

fd = creat("dummy.txt", 0666);
res = write(fd, "test", 4);

if (argc > 1 && strcmp(argv[1], "fsync") == 0)
rc = fsync(fd);
else if (argc > 1 && strcmp(argv[1], "fdatasync") == 0)
rc = fdatasync(fd);

cc = close(fd);

printf("fd = %d, res = %d, rc = %d, errno = %d, cc = %d\n",
fd, res, rc, errno, cc);
}


Sample run:

Quote:
rm *
/tmp/t
fd = 3, res = 4, rc = 0, errno = 0, cc = 0
ls -l
total 1

-rw-r--r-- 1 peter nuucp 4 Nov 15 14:06 dummy.txt
Quote:
ls
/tmp/t fsync
fd = 3, res = 4, rc = -1, errno = 13, cc = -1
ls -l
total 0

-rw-r--r-- 1 peter nuucp 0 Nov 15 14:06 dummy.txt


Notice how it fails to write out the data to the file if there
is a call to "fsync()" (it also fails with a call to "fdatasync()").

Mount options: "-o sec=krb5" (krb5i or krb5p makes no difference)

Client: IRIX 6.5.28f
Server: Solaris 9.

We tried to bug report this before to SGI support. The only response we
got was stuff like "uh, check /etc/exports on the server" (there is no
such file on Solaris servers...).

Anyone else seen this problem?

- Peter

--
--
Peter Eriksson <peter@ifm.liu.se> Phone: +46 13 28 2786
Computer Systems Manager/BOFH Cell/GSM: +46 705 18 2786
Physics Department, Linköping University Room: Building F, F203
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 1:30 pm | All times are GMT
navigation Forum index » *nix » SGI/IRIX » admin
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Need help getting Sony DAT tape drive to work on Irix 6.5 trebor SGI/IRIX 1 Sun Apr 13, 2008 3:19 am
No new posts jinitiator - how do versions work ? Grumps Oracle 0 Fri Jul 21, 2006 9:05 am
No new posts Work-needing packages report for Jul 21, 2006 wnpp@debian.org devel 0 Fri Jul 21, 2006 6:50 am
No new posts Can anybody help me get a job or work robic0@nirgendwo Perl 5 Fri Jul 21, 2006 5:42 am
No new posts Storing and passing secure passwords to MS Exchange scoomey PHP 0 Thu Jul 20, 2006 2:30 pm

Mortgage Calculator | Loan | Remortgages | Mortgage Calculator | Internet Advertising
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1449s ][ Queries: 20 (0.0676s) ][ GZIP on - Debug on ]