[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] need help with cygwin port
Matthias Andree schrieb am 2001-05-05, 4:09:
> "Gerrit P. Haase" <gerrit.haase@xxxxxxxxxxx> writes:
>
> > Now I start fetchnews again and it contacts the server to
> > fetch the message ID's, it sorts out what is too old.
> > Now it tries to store the messages at disk, but it fails.
>
> leafnode *HEAVILY* relies on several POSIX file system semantics that do
> not map onto Windows semantics. The most important that come to my mind
> right now are:
>
> - hard links
LN(1) FSF LN(1)
NAME
ln - make links between files
SYNOPSIS
ln [OPTION]... TARGET [LINK_NAME]
ln [OPTION]... TARGET... DIRECTORY
DESCRIPTION
Create a link to the specified TARGET with optional
LINK_NAME. If there is more than one TARGET, the last
argument must be a directory; create links in DIRECTORY
to each TARGET. Create hard links by default, symbolic
links with --symbolic. When creating hard links, each
TARGET must exist.
-b, --backup
make a backup of each existing destination file
-d, -F, --directory
hard link directories (super-user only)
-f, --force
remove existing destination files
-n, --no-dereference
treat destination that is a symlink to a directory
as if it were a normal file
-i, --interactive
prompt whether to remove destinations
-s, --symbolic
make symbolic links instead of hard links
-S, --suffix=SUFFIX
override the usual backup suffix
-v, --verbose
print name of each file before linking
-V, --version-control=WORD
override the usual version control
--help display this help and exit
--version
output version information and exit
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUF-
FIX. The version control may be set with VERSION_CONTROL,
values are:
t, numbered
make numbered backups
nil, existing
numbered if numbered backups exist, simple other-
wise
never, simple
always make simple backups
REPORTING BUGS
Report bugs to <bug-fileutils@xxxxxxx>.
SEE ALSO
The full documentation for ln is maintained as a Texinfo
manual. If the info and ln programs are properly
installed at your site, the command
info ln
should give you access to the complete manual.
GNU fileutils 4.0 November 1998 1
> - atomicity of link(2)
..Hmmm, i'm missing that on my box...
> - atomicity of rename(2)
rename(3) rename(3)
NAME
rename - rename a file
ANSI_SYNOPSIS
#include <stdio.h>
int rename(const char * old, const char * new);
int _rename_r(void * reent,
const char * old, const char * new);
TRAD_SYNOPSIS
#include <stdio.h>
int rename( old, new)
char * old;
char * new;
int _rename_r( reent, old, new)
char * reent;
char * old;
char * new;
DESCRIPTION
Use rename to establish a new name (the string at new) for
a file now known by the string at old. After a successful
rename, the file is no longer accessible by the string at
old.
If rename fails, the file named *<[old>> is unaffected.
The conditions for failure depend on the host operating
system.
The alternate function _rename_r is a reentrant version.
The extra argument reent is a pointer to a reentrancy
structure.
RETURNS
The result is either 0 (when successful) or -1 (when the
file could not be renamed).
PORTABILITY
ANSI C requires rename, but only specifies that the result
on failure be nonzero. The effects of using the name of an
existing file as *<[new>> may vary from one implementation
to another.
Supporting OS subroutines required: link, unlink, or
rename.
SOURCE
src/newlib/libc/stdio/rename.c
1
> - filename "suffix" does not carry a meaning or associations
No problem on cygwin. Programs are running with .exe or without.
> - availability of external access control software such as tcpd (for use
> with inetd), or super-servers with access control such as g2s,
> ucspi-tcp's tcpserver, xinetd (alphabetical order); for firing up
> nntpd aka. leafnode.
I'm running 'inetd'. leafnode is started, i get the first header...
> Note also that VFAT stores long names very inefficiently, so the
> performance may be awful (this is a speculation however).
WinNT uses NTFS. But it will be a big problem on Win98.
> There may be more issues not covered here. You would need to review the
> entire project and plan it before you decide if you really want to port
> it.
Yep, some problems with setuid. It is handled in another way at cygwin.
I'll need to rewrite the function belonging on setuid.
> Since Windows FAT file systems and 9x/ME in general don't give a penny
> on security and access permissions, don't bother with permissions for
> Win 9x, any user can trash the entire system and see everybody else's
> files. You could consider encapsulating the entire WinNT/2k specific
> permission stuff into a separate module that can be exchanged for fake
> functions that always return success on Win 9x/ME.
Yes, i thought it will run at these systems, i tried to unset all
security on my NT-box, to emulate, but fetchnews is not writing to disk.
> Still, I think, porting leafnode to a non-POSIX system will require
> rewrites of major parts, and I'm wondering if rewriting a similar
> program from scratch instead would be worthwhile and less of an effort.
Nope, Cygwin is a nearly complete posix-layer, it should work.
Rewriting will be also a big deal, i think there are only few parts
to change.
> Did you evaluate "Hamster"?
No, i'm not able to build it myself, because it is pascal, i don't
like delphi/pascal.
>
> (I'm always wondering why people even remotely consider deploying any
> server software on Win 9x/ME when there are a lot of good and easy to
> set up, localized distributions of Linux and BSD around and 486- or
> pentium-class machineswith like 8..32 MB RAM and 500...1000 MB hard
> disks are readily available second hand, often for free; not few of them
> come with leafnode as binary package, ready to install.)
I'm on WinNT 4.0 and i don't use Win98, it sucks...
NT sucks, too, but less.
I need to run my NT Server the whole time, so i'm not able to run
Linux in parallel, only way to survive is NT with cygwin on top.
I will take a look at leafnode 2.
Thanks a lot,
gph
--
=^..^=
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list