Code ifdef'd any of AFS_MACH_ENV, AFS_GFS_ENV, AFS_DEC_ENV dies
Code ifdef'd AFS_SUN_ENV either becomes AFS_SUN5_ENV or dies as appropriate,
in the kernel only. The database servers etc are probably still buildable,
and I still have a SunOS 4.1.4 machine. ;-) But the Solaris vnops get all
SunOS 4 code nuked.
Uses of AFS_ALPHA_ENV which secretly meant OSF/1,D/UX,Tru64 become
AFS_OSF_ENV.
Bozon lock use gets its own ifdef. OSF and Solaris define it. Darwin and any
BSDs have bozon lock usage removed: note that only OSF and Solaris were
bothering to *init* the bozon lock during NewVCache. Bozon locks are for
platforms where basically we could end up deadlocking ourselves because of
how locks are handled.
Some nonsensical ifdefs removed.
Some if 0'd code removed.
Some obsolete code (hpux pre-10, for instance) removed.
FIXES 16765
All of AFSVolListOneVolume, AFSVolXListOneVolume, AFSVolListVolumes,
AFSVolXListVolumes currrently attach each volume to be listed with
V_READONLY. This makes the fileserver update and sync the volume header
before releasing the volume to the volserver. The result is that volume
list operations are slow, and generate lots of fileserver load, as Jimmy
pointed out during his talk this afternoon.
The attached patch introduces a new attach mode, V_PEEK, which is like a
cross between V_READONLY and V_SECRETLY. It can be used for read-only
operations on the volume header, where it is not necessary to inform the
fileserver that the volume is being accessed. The patch also changes
the above-named RPC's to use the new mode.
When you have a 64bit big endian machine with a 64bit off_t in the stat
the salvager won't work.
Malloc takes an "unsigned long" and a implicit cast will be almost
always zero :-).
Add trailing semicolons to _LOCK and _UNLOCK macros and re-indent.
This should've been in fix-indent-bug-with-lock-macros-20030729
but somehow it slipped by and I've only found it now.
Make sure that we do not alter the FD_SETSIZE on Windows.
On Windows this is an array of FD_SETSIZE. FD_SETSIZE does
not define the maximum socket handle value.
to deal simply with /usr/include/linux potentially having 2.6 kernel headers
in newer linuxes. given that we might not have ext2 as root, this check
probably wasn't sufficient anyway.
TICKET 2618
flexelint patches for prototype handling from Joe Beuhler
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
This patch adds a bunch of missing prototypes, makes various
corrections to global prototypes, and removes global declarations that
are not needed.
One set of added prototypes is commented out because it applies to
some printf-like functions that are implemented the way it used to be
done before varargs existed, and they need to be unprototyped or the
code will fail to compile. (There are a number of functions in the
OpenAFS code that need to be converted to use varargs...)
There is one place of note in src/WINNT/afsd/fs.c where typedefs for
afs_int32 and afs_uint32 conflict with afs/stds.h. I just added a
note to that effect.
Prototypes in src/WINNT/afsd/fs.c are incorrect for Windows NT. I
don't know whether the return type involved changes from platform to
platform -- they come from .xg files.
Some prototypes are now commented out or #ifdef'd to match the code
that uses them.
Some global variables conflict between modules and have been made static.
The bufferBlock variable was of two completely different types...
In src/config/stds.h, I changed the declaration of afs_intmax_t to
reflect the fact that the Windows platform supports 64 bit integers.
This may be incorrect semantically, but I believe it is needed for the
%llx format to match afs_intmax_t arguments (for printing of inodes
mainly, I believe).
There were two different declarations for the rxkad_stats structure --
I synced them up.
- Joe
Removed the conflicting typedefs from src/WINNT/afsd/fs.c
Removed the changes to src/config/stds.h. Added declaration of
AFS_64BIT_CLIENT to src/config/NTMakefile.i386_nt40 instead.
Do not remove unused variables which are defintions of data type
values. Instead comment them out to avoid space utilization and
warnings.
This patch covers bugs found by running flexelint on
the CVS code on Windows NT.
- incorrect enum used in al_creds.cpp and various other files
- use of local after it goes out of scope in al_wizard.cpp
- uninitialized class members in afsclass/*
- cm_config.c looks like it has code commented out accidentally
- useless statement in alert.cpp
- no default case handling in problems.cpp
- strange use of & on booleans in set_clone.cpp
- fgets() and fclose() on closed stream in cellconfig.c
- memory leak in cellconfig.c
- *scanf into variables of unknown length in cellconfig.c
- incorrect pointer passed to getAFSServer() in cellconfig.c
- possible buffer overflows in userok.c
- address of array in bos.c
- too many arguments for printf() in commands.c
- return code not saved in bucoord/main.c
- bad types for argv arrays in bucoord/main.c
- probably incorrect initializer list in ol_verify.c
- extra argument to TLog() in lwps.c
- memory leak in cmd/cmd.c
- lack of typecast on malloc() in a couple files
- lower-case L for long constant in touch.c (is it a 1 or an l...)
- parentheses nesting error in util_cr.c
- apparently invalid case fall-through in util_cr.c
- various memory leaks in util_cr.c
- macro missing parens in crypt.c
- macro missing parens in quad_cksum.c
- null pointer deref in kpasswd.c (CVS work in progress?)
- Print_bos_ProcessState_p() code does not look correct
- extra argument to printf() in kas.c
- typo in vsprocs.c
- macro missing parens in iomgr.c
- address of array in threadname.c
- storing result of getch() in char type in waitkey.c (may not match EOF constant)
- storing pointer to local car in global in ptserver.c (benign -- it is in main())
- address of array in rx_lwp.c
- macro missing parens in rx_packet.h
- impossible == (signed vs. unsigned?) in rxdebug.c
- bogus constants in xdr.c and xdr_array.c (possible security implications?)
- incorrect test of fd for open file in update/server.c
- dangerous unparenthesized macro in get_krbrlm.c
- buffer overrun in regex.c
- missing comma causes string concat and bad array init in vlclient.c
- comparison of string < 0 in ntops.c
- default case has no code in vos.c
--
Joe Buehler
>>>>
Comments: Several comments for FIXME left in the code - unaddressed
This patch addresses a number of problems with printf-like functions.
Most of them are %x formats applied to pointers (which could be a
problem depending on the architecture I would assume). There is a
%p format for pointers on many machines but I don't know if it
applies to all supported OpenAFS platforms so I didn't go that route.
There is a buffer overflow fix to ktime.c
There are a couple places where incorrect format characters were used.
One call had two arguments swapped.
Other fixes include the use of PrintInode() and %s formats for
printing inode numbers. The code was inconsistent in this regard -- sometimes
PrintInode() was used, sometimes it was side-stepped.
There is one place where a local shadowed another variable, so I renamed
the local.
The last segment points out that an fdset need not be anything printable
with an integer format.
--
Joe Buehler
Comments - The fdset comment relates to a WinSock only file on which
the size is a pointer to int. Modified the source to use a %p instead
of %x as it is supported on Windows.
Added an assert(p != NULL) to src/rx/rx_packet.c
This patch mainly makes explicit some initializations that were implicit.
There are several places where it looks like the missing initialization
may be a bug, and I have inserted comments to that effect in the
relevant patches. Someone needs to look at them and supply
whatever is missing (if anything is).
In make_keyperm.c, an array was sized too large.
--
Joe Buehler
This massive patch contains changes in several significant areas for Windows:
- the ability to specify the mount point to be something other than /afs
- functionality to assist debugging of the NT Services
- support for languages other than English (NTLang.bat)
- revisions to the Build system to support separate trees for src, obj,
dest and free or checked; allow any MS compiler to be used
- updates to NSIS installer build
- mutex locking added to critical locations
- updates to IS5 directory tree creation
- update to afswsNetscape_config.sh
FIXES 2518
namei_dec now logs if you have open ihandles when you unlink a file
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 2518
flush all dir buffers we have cached when rewriting a volume from a restore
avoids holding an ihandle which has an open fdhandle for an unlinked file
====================
FIXES 2518
remove logging code for now. it appears to trigger on some possibly legitimate operations.
FIXES 1774
thanks to nneul@umr.edu for providing a script to do this.
gnu indent 2.2.9 options:
-npro -nbad -bap -nbc -bbo -br -ce -cdw -brs -ncdb -cp1 -ncs -di2 -ndj -nfc1
-nfca -i4 -lp -npcs -nprs -psl -sc -nsob -ts8
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 1774
fix subst mistake